• Post Reply Bookmark Topic Watch Topic
  • New Topic

javac is not recognized  RSS feed

 
Ron Larson
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
javac is not recognized

Ive read through some of the other threads and still can't seem to figure this out....I'm using windows 7 I set up the variables as follows:

User variable C:\Program Files\java\jdk1.6.0_33\bin
System variable C:\Program Files\java\jdk1.6.0_33\bin
Added to the beginning of the Path variable %JAVA_HOME%\bin;

Not sure what additional information you might need or if you need this for that matter.

Thanks in advance.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 37465
539
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ron,
Welcome to CodeRanch!

The most likely cause for that error is that javac's directory is not in the path. Try opening a new DOS window and printing %JAVA_HOME% and %PATH%. Does this print what is expected?

Also, try typing c:/absolute/path/bin/javac -version. If that works, you definitely have a path issue.
 
Ron Larson
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do I print %JAVA_HOME%?

Thanks,
Ron
 
BalaMurali dhar
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have not set the classpath.
 
Anayonkar Shivalkar
Bartender
Posts: 1558
5
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ron Larson wrote:How do I print %JAVA_HOME%?

echo %JAVA_HOME%
BalaMurali dhar wrote:You have not set the classpath.

I guess the issue is related to PATH variable. CLASSPATH will come into picture during compilation, but currently javac itself is not recognized.
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16059
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ron Larson wrote:User variable C:\Program Files\java\jdk1.6.0_33\bin
System variable C:\Program Files\java\jdk1.6.0_33\bin
Added to the beginning of the Path variable %JAVA_HOME%\bin;

What does this "User variable" and "System variable" mean?

Did you set the variable JAVA_HOME to: C:\Program Files\java\jdk1.6.0_33
(Note: Do not include \bin at the end!)

Ron Larson wrote:How do I print %JAVA_HOME%?

Open a command prompt window and use the command: echo %JAVA_HOME%
 
Gaurangkumar Khalasi
Ranch Hand
Posts: 187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ron Larson wrote:javac is not recognized

Ive read through some of the other threads and still can't seem to figure this out....I'm using windows 7 I set up the variables as follows:

User variable C:\Program Files\java\jdk1.6.0_33\bin
System variable C:\Program Files\java\jdk1.6.0_33\bin
Added to the beginning of the Path variable %JAVA_HOME%\bin;

Not sure what additional information you might need or if you need this for that matter.


For javac to run, there is no need to set JAVA_HOME...

Just add "C:\Program Files\java\jdk1.6.0_33\bin" to the Path variable

javac will definitely runnnnnnnn........or...........recognized.
 
abhishek rathur
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
watch some youtube videos you will get to know how to do.
 
Ron Larson
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Watched this video http://www.youtube.com/watch?v=nv-TQo26NZQ and have it working now. Thanks for the help and suggestions!
 
fred rosenberger
lowercase baba
Bartender
Posts: 12563
49
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Glad you got it working.

As a general note, and because I tend to be didactic, "javac is not recoginized" is actually NOT a java error at all. It is an error from your operating system. You'd get the same kind of error if you tried to run "bibity-bobity-boo" or "javak". It is a message from the operating system telling you "I honestly have no idea what program you want me to run".
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!