*
The moose likes Beginning Java and the fly likes Setting up Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Setting up Java" Watch "Setting up Java" New topic
Author

Setting up Java

Mathew Miller
Greenhorn

Joined: Dec 19, 2005
Posts: 3
I got a book titled "Head First Java" which seems to be a really cool way to learn Java, under the "what you need for this book" section they let you know that you need J2SDK along w/ API documentation. I have these things, however something confuses me. The book says the following:

"You need to add an entry to your PATH enviroment variable that points to the /bin directory inside the main Java directory."

I need this in order to run the javac compiler, and I have no idea how to add this entry. Some insight would be great, thanks.


-Unit
Billybob Marshall
Ranch Hand

Joined: Jan 27, 2004
Posts: 202
It depends on your operating system.
Assuming Windows XP:
Right-click "My Computer" desktop icon, select "Properties" menu item.
On System Properties dialog box, select "Advanced" tab.
Click "Environment Variables" button.
In "System variables" section, find the variable named Path (or PATH). Edit it as desired.
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

Hi Mathew,

Welcome to JavaRanch!

For instructions on setting the PATH variable, see step 5 in Sun's installation instructions. (I'm assuming that you're using Windows.)


"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
Mathew Miller
Greenhorn

Joined: Dec 19, 2005
Posts: 3
Thanks for your help, it seems that I was already set to the /bin directory.
Mathew Miller
Greenhorn

Joined: Dec 19, 2005
Posts: 3
Well the book tells me to only use a text editor (wordpad in my case) until I learn some of the basics. If I'm not using Eclipse or Netbeans, where is this command line that I'm supposed to type %javac into in order to compile stuff? I think I'll be able to float once I figure this out.
Billybob Marshall
Ranch Hand

Joined: Jan 27, 2004
Posts: 202
Again, it depends on your operating system.
Windows XP: Start menu, "Run" item, "cmd"

You really need to become more familiar with your computer and OS to be successful. I'd suggest you do that.
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

You should also be able to find it under "Start / Programs / Accessories / Command Prompt." I suggest making a shortcut to this, since you're going to be using it a lot.
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

And don't type the "%" character -- that's the system prompt on a Macintosh. On your machine, the prompt probably looks like "C:\MYDIR\>" or similar. Mentally substitute!


[Jess in Action][AskingGoodQuestions]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Setting up Java
 
Similar Threads
Download/Install J2SE SDK for learning
Head First Question
Add entry to PATH environment?
Policy Tool
Setting up J2SE development kit