Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How do i get Java working?

 
Kay Kumar
Greenhorn
Posts: 11
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 100
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
set path = .;C:\J2sdk1.4.2_04\bin
set classpath = .;C:\J2sdk1.4.2_04\lib
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24204
34
Chrome Eclipse IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Layne Lund
Ranch Hand
Posts: 3061
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic