• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Setting up Java

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Sheriff
Posts: 11343
Mac Safari Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.)
 
Mathew Miller
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your help, it seems that I was already set to the /bin directory.
 
Mathew Miller
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 202
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 11343
Mac Safari Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!
 
I child proofed my house but they still get in. Distract them with this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic