简体   繁体   中英

Error when trying to export to a jar using Eclipse

I have a java file which runs normal in Eclipse but utilizes the apache commons FTP packages for some utilities. The issue I am running into is that after several days, it seems to just stop running with no errors. I believe this may be due to the Eclipse environment it is running in, so following advice of someone else, I tried to export this as a jar, and upon doing so I receive the following error:

Error screenshot: http://i.imgur.com/bHO6wtm.png

My end-goal is that I would like this java program which runs fine in Eclipse to be an executable standalone that I can simply leave running somehow.

  1. The screenshot shows your are compiling a library. I suggest you to use a binary, pre compiled one.
  2. To run a Java program you have to launch java -cp xxx.jar;yyy.jar...

To make the thing simple, you have to compile and package your code into a jar, without its dependencies. This may be done with the Eclipse wizard Export as Jar or with a ANT script .

To manage complex dependencies Maven may be used.

A lot of tutorial exists about Eclipse and how to export a Jar, 5 images follow, to show each step of this process:

启动向导

选择要添加的课程

检查警告并命名

让eclipse产生清单

可能会显示一些警告

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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