Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Java JVM Verison Question

Status
Not open for further replies.

timtrust123

Programmer
Dec 19, 2003
19
GB
Hi
I'm new to java and have been writing a new java based application. No parts of the application require version 1.5 or greater. I have used version 1.5 and the application works well on my PC. However when I try to run it on a different pc that has version 1.42_09 I get an error message "Could not find the main class".
Does this mean that 1.5.0_06 has to be installed on all PC that need to run my new application? Also , can more than one JVM exist on a single pc ??

I'm confused.. It was all going so well up to this point.

Any help appreciated
Cheers
Tim
 
If you've compiled your application with 1.5, then you'll need a 1.5 version jvm on all machines needing to run it. You can have several versions of Java on a single PC.

Tim
 
If you don't use 1.5 features, you may compile it with
Code:
 javac -source 1.4 -target 1.4 YourClass.java
, but the message "Could not find the main class" means, java doesn't find the class containing 'main'.

A directory/classpath problem.

seeking a job as java-programmer in Berlin:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top