I have a simple application consisting of 3 classes which are PercentIdentity.java, GUI.java and Aligner.java
I am working with Intellij Idea 11.1.3 (I also tried it with Eclipse) and JRE 1.7. My operating system is Win 7 x64.
My program works fine when I double click the jar file I created by using Intellij. Also, it works when I execute the command "java -jar *.jar" where * is the name of my jar file.
Now I want to create an .exe file, so I can run the program on the other computers.
I opened the .jar file with Winrar and i can see the manifest file (MANIFEST.MF) inside the META-INF folder.
My manifest file:
Manifest-Version: 1.0
Main-Class: com.example.PercentIdentity (with an empty line in the end)
After spending a lot of time on Launch4j, JSmooth and IExpress, I managed to create .exe files which are running perfectly on my computer. However, when I run the .exe file on another compuer (again with Win 7 x64) it gives the error:
"Java Virtual Machine Launcher: Could not find the main class: com.example.PercentIdentity. Program will exit."
My JSmooth settings are as follows:
Skeleton Selection: Window Wrapper
Executable: test.exe
Current Directory: . (not sure what to put)
Main Class: com.example.PercentIdentity
Embedded Jar: *.jar
Classpath: *.jar (the same with above)
Min JVM Version: 1.0 Max JVM Version: 1.7
The settings I am using in Launch4j:
Output file: C:\Users\{name}\Desktop\test.exe
Jar: *.jar
(I am not checking the checkbox "Don't wrap the jar")
Manifest: (empty)
Min JRE Version: 1.0
I read an answer in another similar question that the problem may occur because of JRE 1.7, so I tried 1.6 also. However, this time it didn't run even on my own computer.
Anyone have an idea how I can overcome this problem?
Thanks in advance.