I have been developing a Java program in Netbeans/Ubuntu 12.04 using OpenJdk. I have got this program to run successfully using the .jar in Linux, but when I copy the .jar to my Windows 7 virtual machine I get the following error;
“Could not find the main class: testprogram.Main. Program will exit.”
Also this program uses no external libraries.
My fix to this problem was to use JDK 6 as opposed to JDK 7, still unsure as to why this error was produced, but this change has fixed the problem.