File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jdk

 
jp staff
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 158
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Marilyn de Queiroz
Sheriff
Posts: 9059
12
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Some of the info on this page might be helpful.

Also this page.
 
Michael Bruesch
Ranch Hand
Posts: 158
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1244
1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9059
12
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 158
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic