Re: opening an eclipse .jar file



If you want the quick and easy solution look at this eclipse plugin :
FatJar ( http://fjep.sourceforge.net/ )

This plugin add a command in the context menu of projet ("build fat
jar" or something like that). this command create a jar file with a
manifest and include all dependencies of your project in the jar. The
plugin has a lot of options but the default one's will be just fine in
your case. (just click next next next ...)

To run a jar by double clicking on it in windows you need to associate
the files *.jar with the command "$JAVA_HOME\bin\javaw.exe" -jar "%1"
%* (replace $JAVA_HOME by the path to your jre)

TrevorBoydSmith@xxxxxxxxx wrote:
I created the tutorial helloworld project that prints text to a
console. I want to make it into a .jar so that I can double-click and
have it automatically run using the Java Runtime Environment. So I
used the export command and created a .jar file. (making sure to: not
compress, export generated class files and resources.) After those
setting I clicked finish. And expected the .jar file to double click
and open a console application. But nothing happened. I also tried
opening the .jar file in the command line. (This is on windows.)

How do you get a .jar file to work when you double-click? (if you know
a good source to read about this please leave a link on it)

.



Relevant Pages

  • Re: [SLE] PID file for java process?
    ... "java -jar jarfile.jar" launches the program, ... You can unpack a JAR file using either the "jar" command or the zip, ... interactively or via a shell script. ...
    (SuSE)
  • Re: jar file wont run
    ... jaf (Java Activation Framework) 1.1.1 ... "The jar file "ProjectName.jar" couldn't be launched. ... Also if I try to use jar command from a terminal to create ... In NetBeans the console is one of the windows in the view - where all the ...
    (comp.lang.java.programmer)
  • Re: Precision: Unable to run a Java jar on iSeries(AS/400) using command JAVA
    ... in javac or java qshell commands ... Created the jar file with the manifest in META-INF (which contains ... Ran the program in jar format with command: ...
    (comp.sys.ibm.as400.misc)
  • Re: Java Hello World running problem
    ... a simple HelloWorld java program and compile and run it, ... Below is the HelloWorld program: ... tried to run it by the below command java HelloWorld and got ... That will be a jar file. ...
    (comp.lang.java.programmer)
  • Re: jar file wont run
    ... jaf (Java Activation Framework) 1.1.1 ... "The jar file "ProjectName.jar" couldn't be launched. ... Where can I finde the "console", what is it, can the solution to the ... From the command line the console is the command window. ...
    (comp.lang.java.programmer)