This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I use Netbeans with JDK 1.6 as Default. This file works normally in windows 7 32 bit. But when i try the same with windows 7 64 bit which has JRE 1.7 and try to run the batch file as administrator then i receive the below error message
"could not find or load main class".
i tried to build the app with JDK 1.7 but that too does not work with the 64 bit machine. I am .NET Developer there we have build configuration where we can specify 32 bit or 64 bit. if an application is built against 32 bit it will normally work in 64 bit. But why does this happen here.
Do i need to set any classpath or do i need JRE 6 to run. Please advise.
Mansukhdeep Thind wrote:When the .jar file was created, which JDK did you use, 32 bit or 64 bit?
Whatever the answer to that question is, it doesn't matter. There is no 32-bit or 64-bit in the Java world; bytecode is not 32-bit or 64-bit, and class files compiled with a 32-bit JDK will run on a 64-bit JVM and vice versa without any changes.
The only thing I see that's a bit strange is that you use forward slashes / in your classpath, while Windows expects backslashes \ to separate elements in a path (although sometimes Windows seems to understand forward slashes too). You could try using backslashes: