I'm trying to package my program into a JAR file so it can be used on multiple computers.
My program is composed of start.java
, userinterface.java
and writer.java
.
The program, written in Eclipse, works perfectly on my computer. When exported, it will work on my computer but cause the following error on other computers:
"Could not find the main class: start. Program will exit".
Again, my program runs fine on my computer when I double click on it.
I've tried creating the JAR file via command prompt, and my Manifest file is correct. What is happening?
This is a very strange bug which I've also encountered.
Assuming you are using JRE 1.7
,
The only fix I found to this problem was to change the project's JRE
version from 1.7
down to 1.6
.
Edit: I've also encountered this error on computers with JVM 7.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With