Setting up JavaSDK1.3.1

Redstar7

Member
Jun 6, 2001
33
0
0
Anyone here familiar with programming in Java2? I would like to start learning the language, so I went out, picked up a beginner's book, downloaded the SDK1.3.1, and now I am having problems setting it up to compile and run. What I've done is added a couple of lines in autoexec.bat like I'm supposed to do (that sets a PATH and CLASSPATH), but I still encounter error messages like this:

--When I type (at command prompt)
javac filename.java

-I get 'bad command or file name'.

--When I type
java filename

--or
java filename.java

-I get 'exception in thread "main" java.lang.NoClassDefFoundError: filename'.

I don't have any other java compiling programs to conflict with, and the path I set up in autoexec.bat leads to the folder where my source code is being saved. So I don't understand why the conflict is there. I'm using Win98SE.

Any suggestions?
 

michaelh20

Senior member
Sep 4, 2000
482
0
0
You should post the autoexec.bat...

Both the files you are compiling and the javac.exe need to be in the path, somehow. Sounds like you don't have the actual /sdk-1.3.1/bin dir in your path.
 

vital

Platinum Member
Sep 28, 2000
2,534
1
81
If you're a beginner, you might wanna try coding with a java IDE (integraded development environment). There are some free ones like JCreator and JBuilder. I use JCreator because I like it better, plus since you already downloaded Java SDK, you won't need to download it again with JCreator. JBuilder includes the Java SDK so it's a bigger download.