aspose file tools*
The moose likes Beginning Java and the fly likes jdk Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "jdk" Watch "jdk" New topic
Author

jdk

jp staff
Greenhorn

Joined: Sep 10, 2001
Posts: 5
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
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.

------------------
Michael J Bruesch
Codito, ergo sum...
I code, therefore I am.
My Java Games, I'm quite proud


Michael J Bruesch<br /><i>I code, therefore I am.</i>
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9046
    
  10
Some of the info on this page might be helpful.

Also this page.


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
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.

------------------
Michael J Bruesch
Codito, ergo sum...
I code, therefore I am.
My Java Games, I'm quite proud
Fei Ng
Ranch Hand

Joined: Aug 26, 2000
Posts: 1242
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: 9046
    
  10
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
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://aspose.com/file-tools
 
subject: jdk