简体   繁体   English

我应该部署为ADF Library Jar来调用函数吗?

[英]Should I deploy as an ADF Library Jar to call functions?

Currently I am using JDeveloper 12c to develop a project in oracle ADF. 目前我正在使用JDeveloper 12c在oracle ADF中开发项目。

My problem is when I deployed the XmlGenerator project as a JAR file and added in the XmlGeneratorApp project View>Project Properties>Libraries and ClassPath>Adf Library it should let me use the functions in the JAR file but it isn't. 我的问题是当我将XmlGenerator项目部署为JAR文件并添加到XmlGeneratorApp项目视图>项目属性>库和类路径> Adf库时,它应该让我使用JAR文件中的函数,但事实并非如此。

I added a similar one as an ADF Library JAR file called CustomComponent it worked very well when I called the functions implemented in the classes from it. 我添加了一个类似的ADF库JAR文件,名为CustomComponent,当我调用类中实现的函数时,它工作得非常好。

My question is it mandatory to deploy it as ADF Library JAR file to use its functions? 我的问题是,必须将其部署为ADF Library JAR文件才能使用其功能吗? If not, and a JAR file is only necessary what should I do to call the functions in the JAR file because I can't deploy the XmlGenerator project as an ADF Library Jar file which is weird. 如果没有,并且只需要一个JAR文件来调用JAR文件中的函数,因为我无法将XmlGenerator项目部署为ADF Library Jar文件,这很奇怪。

Well, I hope my answer to myself will help anyone using oracle adf. 好吧,我希望我对自己的回答能帮助任何使用oracle adf的人。 Here are few steps: 以下是几个步骤:

1-Deploy your application as a jar by right clicking on the view > new deployment profile 1 - 右键单击​​视图>新部署配置文件,将应用程序部署为jar

2-If you can't deploy it as an ADF JAR Library you should deploy as JAR (my problem) 2 - 如果无法将其部署为ADF JAR库,则应将其部署为JAR(我的问题)

3-After creating the new deployment profile you should deploy it 3 - 创建新的部署配置文件后,您应该部署它

4-To add it to another project so you can use the methods in the public classes you should right click in the view and the model of the project you want to add then add it to: Project Properties>Libraries and ClassPath> ADF Library>Edit>Add Entry 4 - 要将其添加到另一个项目以便您可以使用公共类中的方法,您应该在视图和要添加的项目模型中单击鼠标右键,然后将其添加到:项目属性>库和类路径> ADF库>编辑>添加条目

That should do it. 应该这样做。 Hope this was helpful and very clear. 希望这有用而且非常清楚。

NB: If you could deploy it as an ADF JAR Library you could simply add it by right-clicking on it in the IDE Connections and select the project and right-clicking on the jar to add it directly to the project. 注意:如果您可以将其部署为ADF JAR库,只需在IDE Con​​nections中右键单击它即可添加它,然后选择项目并右键单击jar将其直接添加到项目中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM