Hey y'all! Im having a couple of problems at the moment, I've installed Java environment (which worked on my old computer) onto my new laptop. I can compile the files using javac.exe, but when i come to run them using java.exe it throws up a runtime error mentioning the "main" thread. Im not sure what this means as the files ran fine on my university network and old home computer. Please Help! James P.S With the new downloadable Java Environment why isn't there a javac.exe file? This got me very confused!
it throws up a runtime error mentioning the "main" thread.
Well we could guess what the error is (and many here probably have a pretty good idea what it will be). But far easier for all involved is if you tell us what the error actually is. [ June 28, 2004: Message edited by: Paul Sturrock ]
it throws up a runtime error mentioning the "main"
Can you post the entire error message? I'm sure you are referring to "Exception in thread main..." but that is a very general error that just says "something bad happened, read the rest for further details".
I'm guessing that the rest of the error may include "java.lang.NoClassDefFoundError" but without the whole error message, that's a complete stab in the dark. If that is the problem, then it is a CLASSPATH issue - i.e. the class you are trying to execute is not in your CLASSPATH.
P.S With the new downloadable Java Environment why isn't there a javac.exe file? This got me very confused!
You can get "Java" one of 2 ways: 1. Just the JRE - If you do not need to create Java classes, just run them, then this is all you need. It contains the "runtime" libraries. But it does not include the development tools, like javac.exe. This sounds like what you recently downloaded. 2. The full SDK - This includes the JRE and many tools a Java developer needs like javac.exe.
Blake Minghelli<br />SCWCD<br /> <br />"I'd put a quote here but I'm a non-conformist"