0

I'm sure that there is an article on here already about this, but I didn't see it.

I'm trying to make my java application executable so I can share it with friends but whenever I use eclipse to make it a jar or executable jar file and send it to them, but it sayts that it cannot find the main class when they try to run it.

Any ideas or revalations would be greatly appreciated, thanks.

4
Contributors
4
Replies
5
Views
5 Years
Discussion Span
Last Post by reaper1395
0

have you tried to run your jar as an executable locally?
looks to me like you didn't point to the entrypoint (class containing the main method) in your manifest.mf file correctly.

I can share it with friends but whenever I use eclipse to make it a jar or executable jar file and send it to them, but it sayts that it cannot find the main class when they try to run it.

Any ideas or revalations would be greatly appreciated, thanks.

0

How are you invoking the java executable and how are you passing it the JAR file? Are you using the -jar switch? Do you have a Main-Class entry in the manifest file?

0

In eclipse just File/Export select Java/Runnable Jar, fill in all the blanks (including the name of the class that contains your main method) and that should be OK.

0

I have tried

File/Export select Java/Runnable Jar

and the normal jar in eclipse. I do make sure to include the main class every time, and it does work on my own computer and occasionally on another if I move it via flash drive

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.