Re: Newbie Eclipse question: Exported jar file does nothing upon execution



mrstephengross wrote:
Hi all. I'm trying to learn the ropes of how to create an executable
jar from Eclipse. I believe I exported one successfully--I selected
the correct source & main class, and Eclipse reported that the file
was created successfully. However, when I try to execute it, nothing
happens. That is, it acts like some kind of no-op executable.

Any ideas?

Andrew identified the most likely cause.

One way to make error messages visible is to execute the Jar from a command prompt.

In Windows XP: click "Start", "Run", type "cmd" and press enter.

Check the Java runtime is in your path
java -version

Then type a command like
java -jar MyJar.jar



--
RGB
.



Relevant Pages

  • Re: Icon Launcher + .jar file
    ... To the best of my knowledge, you cannot execute a jar the same way that you ... file using the -jar option of the java program. ... > If I use Nautilus to go to the installed directory, ...
    (Ubuntu)
  • Re: File Association for JARS
    ... Ubuntu seems to be set up so that a JAR looks like a ZIP file. ... A java executable runs with the comand line ... add a command to execute the jar. ...
    (Ubuntu)
  • Executible Jar help
    ... As the title says I am trying to make a executible jar. ... Java version 1.4.2 ... When I try through the command prompt with: ... Exception in thread "main" java.util.zip.ZipException: ...
    (comp.lang.java.programmer)
  • Re: How Do I Publish My Working Project (corresponding dot jar doesnt work on others PCs)
    ... Once my NetBeans project is finalized what do I have to do to create an executable others can execute without having NetBeans directly installed on the computer. ... Only this type of project creates the necessary manifest in the project jar for it to be run simply by the java -jar project.jar command. ...
    (comp.lang.java.programmer)
  • Re: Icon Launcher + .jar file
    ... that you would execute a script or an executable program. ... normally execute a jar file using the -jar option of the java ...
    (Ubuntu)