How do I go about setting up the Jdk compiler, how do I compile my code where should I save my code to thank you for you help
Michael Bruesch
Ranch Hand
Joined: Sep 23, 2001
Posts: 158
posted
0
Go into DOS, enter: set path = C:\jdk1.3\bin that is of course if you have the jdk 1.3. it should be similar in the other versions. You have to tell DOS where the javac compiler is, which is in that directory. Now if you start building your own packages, you have to include the directory in which your class hierarchy is in in the classpath in DOS: set classpath = C:\Java\YourJavaStuff for example. Others have been saying something else about putting the current directory in your classpath. I don't have it in mine and I've never had a problem. Hope that helps you get started.
JavaBeginnersFaq "Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Michael Bruesch
Ranch Hand
Joined: Sep 23, 2001
Posts: 158
posted
0
Thanks for the links Marilyn, but I'm still confused. I don't have the current directory set in my classpath, but I've never had any problems compiling or running any java files. I hear everyone say that you need it to compile and run anything, but I don't understand. Is it added for me somewhere that I don't know about? I'm on Win ME. I made a batch file that runs after autoexec.bat when you start up DOS, and this current directory is not in either.
Same thing here but i am on win2000. It seems that it set it up on the window system enviornment. But not sure..
Marilyn de Queiroz
Sheriff
Joined: Jul 22, 2000
Posts: 9033
10
posted
0
Originally posted by Michael Bruesch: I don't have the current directory set in my classpath, but I've never had any problems compiling or running any java files.
It used to be required in Java 1.1. They changed it to automatically include the current directory, I don't remember whether it was in Java 1.2 or 1.3, so now you don't need to include it in your classpath, at least theoretically, and in your case, also practically. However many people still include it "just in case".
Michael Bruesch
Ranch Hand
Joined: Sep 23, 2001
Posts: 158
posted
0
Thank you Marilyn, that's the answer I've been looking for . And...lol....I too put it in there recently..."just in case". Thanks! ------------------ Michael J Bruesch Codito, ergo sum... I code, therefore I am. My Java Games, I'm quite proud
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.