• 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

Java Installation

 
Greenhorn
Posts: 17
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi

I would like start learning java.
I just installed JDK 6u24 from sun.com.
When I try to compile Helloworld it says javac is not recognized.
Can anybody please help me how to define the class path and the essentials to compile and run java programs.

thankyou
 
Saloon Keeper
Posts: 15510
363
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You need to set your PATH environment variable.

It's the same process as described here: https://coderanch.com/how-to/java/HowToSetTheClasspath

The difference is that the variable you need to set is PATH, not CLASSPATH; and it needs to point to the directory containing javac.exe
(on my system this is C:\Program Files\Java\jdk1.6.0_20\bin)
 
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

natt walters wrote:...Can anybody please help me how to define the class path...


As Stephan said, it's the PATH that you need to update. Please do NOT set a CLASSPATH.
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have a look over here, it has screenshots for easier understanding.

http://www.mycoding.net/2011/02/218/
 
Marshal
Posts: 79177
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We have an FAQ about that.
 
Ranch Hand
Posts: 448
Eclipse IDE Firefox Browser Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi natt,

welcome to javaranch
 
natt walters
Greenhorn
Posts: 17
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you very much everyone .
I've done as instructed and started compiling and running a few programs.

I've also heard of the IDE(Eclipse) a great tool for programming.

Can you please advise me being a beginner is it good to start with the tool or stick to doing the normal way for now.

Thank you once again
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Eclipse is a very good IDE, but if you're just starting to learn Java, it's better to start with a simple text editing program. Learn the basics of the Java programming language first. It will be overwhelming if you are trying to learn too many things at once - how the IDE works and how Java works.

A nice and simple text editor that has color syntax highlighting for Java is Notepad++.
 
natt walters
Greenhorn
Posts: 17
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you very much
 
He's dead Jim. Grab his tricorder. I'll get his wallet and 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