Skip to main content

Please Do i convert simple program to an executable jar..

4 replies [Last post]
uzodima
Offline
Joined: 2012-09-09
Points: 0

Please i been havin difficulties in deploying an executable jar on my computer
and correct format to write a manifest file.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Lants83
Offline
Joined: 2012-09-09
Points: 0

I am no expert but I have done this already on eclipse. Are you using an IDE? if so which one?
I may be able to help.

in Eclipse- got to File - Export- Java - runnable Jar File - then pick the folder to put it in.

uzodima
Offline
Joined: 2012-09-09
Points: 0

thanks Lants83 ...i m using netbeans....

uzodima
Offline
Joined: 2012-09-09
Points: 0

Please how do run the Jar file on my laptop

jamesharte
Offline
Joined: 2012-09-28
Points: 0

If you are going to run from the command prompt, then you need to ensure that the location of your java executable is in the PATH environment variable, or specify the full path of the java executable. And you will need to ensure that the location of your JAR file is in your CLASSPATH environment variable. Then run the following command substituting [Jar file Name] with your JAR file name.

echo %PATH%
echo %CLASSPATH%
java -jar [Jar file Name]

Show the output of these.

If you get the error:
'java' is not recognized as an internal or external command,
operable program or batch file.

then you likely do not have java in your path and need to add it.

If this does not work, then provide more information such as the outputs of what you got from the 3 lines above.