使用 JDeveloper 构建 Java 整个项目 jar [英] Build Java entire project jar using JDeveloper

查看:21
本文介绍了使用 JDeveloper 构建 Java 整个项目 jar的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 JDeveloper 11g 开发桌面应用程序.我想制作可以在 java 环境中运行的整个项目 jar .. 如果我只使用标准的 Java 库 jar 工作正常但我的项目包含外部库,如 JfreeChart、Comm、Hibernate3 等......当我尝试制作 jar 时它显示了错误,我如何制作我的项目的整个 jar 以及外部库的.

谢谢

解决方案

请按照以下说明操作..

<块引用>

  1. 右键单击项目并选择属性.
  2. 点击部署,通过输入部署配置文件类型和名称来设置新部署.
  3. 现在在屏幕上编辑部署配置文件.
  4. 选择 Jar Options 并指定您的 main 类.

如果您有 3rd 方罐子,请遵循

<块引用>

  1. 选择文件组,然后单击新建.
  2. 选择依赖关系分析并确定.
  3. 然后在您创建的新文件组下选择贡献者.

    1. 文件的文件标签
    2. 库的库选项卡,包括您在项目中使用的库.

  4. 那好吧.

如果你没有 3rd party jar 则忽略上面的

<块引用>

  1. 然后右键单击项目,选择部署下的配置文件.
  2. 然后点击完成开始部署.

完成部署后,您会在项目/部署文件夹中看到 jar.

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

解决方案

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.

这篇关于使用 JDeveloper 构建 Java 整个项目 jar的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆