Build Java entire project jar using JDeveloper

我只是一个虾纸丫 提交于 2019-12-17 21:20:14

问题


I am using JDeveloper 11g to develop a desktop application. I want to make entire project jar which is run-able in java environment.. if I use only standard Java library jar works fine but my project contains external library like JfreeChart, Comm, Hibernate3 etc etc... when I try to make jar Its shows errors how can I make entire jar of my projects along with external library's.

thank you


回答1:


Please follow the below instructions..

  1. Right-click project and select properties.
  2. Click on Deployment, setup new Deployment by entering Deployment Profile type and name.
  3. Now edit Deployment profile on screen.
  4. Select Jar Options and specify your main class.

If you have 3rd party jar then follow

  1. Select File group the click on New.
  2. Select Dependency Analysis and Ok.
  3. Then select the Contributors under new file group you have created.
    1. Files tab for Files
    2. Libraries tab for Libraries, Include the Libraries you using in your project.
  4. Then Ok.

If you don't have 3rd party jar then ignore the above

  1. Then right-click on project, select the profile under deploy.
  2. Then Click finish to start deployment.

After finish deployment you see the jar in your project/deployment folder.




回答2:


Yes, you can do so. Have a look here - Java create standalone jar with external jars and also here - Put external library to the JAR?

The simple way is to use a tool, but you can use ant too, to recompile a set of JAR's into one big-fat JAR.



来源:https://stackoverflow.com/questions/10240703/build-java-entire-project-jar-using-jdeveloper

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!