Java:在 Eclipse 中导出到 .jar 文件 [英] Java: export to an .jar file in eclipse

查看:35
本文介绍了Java:在 Eclipse 中导出到 .jar 文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将 Eclipse 中的程序导出到 jar 文件.

I'm trying to export a program in Eclipse to a jar file.

在我的项目中,我添加了一些图片和 PDF:s.当我导出到 jar 文件时,似乎只有 main 已被编译和导出.

In my project I have added some pictures and PDF:s. When I'm exporting to jar file, it seems that only the main has been compiled and exported.

如果可能的话,我的意愿是将所有内容导出到 jar 文件,因为那样我想将其转换为可引渡的文件,例如 .exe 文件.

My will is to export everything to a jar file if it's possible, because then I want to convert it to an extraditable file, like .exe-file.

但是怎么做?

推荐答案

无需外部插件.在导出 JAR 对话框中,确保选择所有要导出的必要资源.默认情况下,导出其他资源文件(图片、配置文件等)应该没有问题,请参见下面的截图.

No need for external plugins. In the Export JAR dialog, make sure you select all the necessary resources you want to export. By default, there should be no problem exporting other resource files as well (pictures, configuration files, etc...), see screenshot below.

这篇关于Java:在 Eclipse 中导出到 .jar 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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