This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes How do i get Java working? 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 "How do i get Java working?" Watch "How do i get Java working?" New topic
Author

How do i get Java working?

Kay Kumar
Greenhorn

Joined: Feb 28, 2005
Posts: 11
Hi there.

Sorry about this very basic question.

I have installed J2sdk1.4.2_04 (don't know if that makes sense.)

It is installed in my C drive. I have edited the path within the enviromental variables. I have also created a classpath pointing to the correct java.exe file and tools.jar file. However, when i run;

javac HelloUser.java

I get a response of;

'javac' is not recognised as an internal or external command, operable program or batch file

Can anyone help???

Thanks in advance!

Vu Pham
Ranch Hand

Joined: May 28, 2005
Posts: 100
set path = .;C:\J2sdk1.4.2_04\bin
set classpath = .;C:\J2sdk1.4.2_04\lib
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

If you're at the point where you're just trying to get javac to run, then it's best to not set CLASSPATH to anything at all! It is not necessary to set it. Java will work fine with the default setting -- but setting CLASSPATH incorrectly will prevent it from doing anything.


[Jess in Action][AskingGoodQuestions]
Layne Lund
Ranch Hand

Joined: Dec 06, 2001
Posts: 3061
Originally posted by Kay Kumar:
Hi there.

Sorry about this very basic question.

I have installed J2sdk1.4.2_04 (don't know if that makes sense.)

It is installed in my C drive. I have edited the path within the enviromental variables. I have also created a classpath pointing to the correct java.exe file and tools.jar file. However, when i run;

javac HelloUser.java

I get a response of;

'javac' is not recognised as an internal or external command, operable program or batch file

Can anyone help???

Thanks in advance!



This error message indicates that the operating system (Windows?) cannot find the javac.exe program. This probably means that you have not set the PATH environment variable correctly. Try typing

and tell us what the output is. This will help us to figure out what you need to get things to work correctly.

Layne


Java API Documentation
The Java Tutorial
 
Don't get me started about those stupid light bulbs.
 
subject: How do i get Java working?
 
Similar Threads
JAVA2 1.2 compiler
Javac Question
cannot execute java command from command prompt
how to run
help me with the installation process