使用Eclipse创建jar文件 [英] Creating jar files using Eclipse

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

问题描述

我需要使用eclipse IDE创建一个jar文件。但是当我使用命令提示符运行它(我使用命令提示符,因为我需要输入一个文件作为一个命令),我在为我的项目创建一个jar之后添加引用jar到我正在创建的jar的问题线条参数)它给出了一个异常,称类未找到,该特定类在引用的jar文件中。

I need to create a jar file using eclipse IDE. But I am facing with a problem of adding referencing jars to the jar I am creating... after creating a jar for my project, when I run it using command prompt (I use command prompt because I need to input a file as a command line argument) it gives an exception saying "class not found" and that particular class is in that referencing jar file...

我试图用方式克服我的问题在以下链接中指示但仍然存在问题...

I tried to overcome my problem using the way instructed in the following link but still the problem exists...

http://www.wikihow.com/Add-JARs-to-Project-Build-Paths-in-Eclipse-(Java

任何人都可以帮助我这个?Thanx提前...

Can anyone please help me with this? Thanx in advance...

推荐答案

您可以使用导出向导创建一个包含所有依赖项的可运行的jar。

You can create a runnable jar that includes all dependencies using the Export wizard.

转到导出> Runnable JAR文件,然后选择库进入生成的JAR。

Go to "Export > Runnable JAR File", and select "Package required libraries into generated JAR".

这篇关于使用Eclipse创建jar文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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