Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to install javac

 
Matt applewood
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I intstalled j2sdk1.4.2_09 on my computer but when I go to compile in cmd it says javac is not recognized as a command. How would I go about fixing this.
thanks
 
Michael Ernest
High Plains Drifter
Sheriff
Posts: 7292
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to to make sure the binaries for the kit are in your command execution path.

Start -> Control Panel -> System. Choose the Advanced tab. Click the Environment Variables button. Modify the Path in your System variables so that the directory containing javac and the other tools is included.

That's the way it is on XP, anyway. If you were using an actual operating system you would have been instructed on which file to go to and edit.
 
Matt applewood
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what do i type to modify the path
 
Dustinn Yourstone
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
At the end of the path var type the path to your jdk ex "C:\jdk1.4\bin"
 
Matt applewood
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
%SYSTEMROOT%\system32;C:\PROGRA~1\COMMON~1\MICROS~1\MSInfo\;%SYSTEMROOT%;%SYSTEMROOT%\COMMAND;%SYSTEMROOT%\system32\WBEMC:\j2sdk1.4.2_09\bin

I typed this and it still didn't work
 
Michael Ernest
High Plains Drifter
Sheriff
Posts: 7292
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looks like you're missing a semicolon

WBEMC:\j2sdk1.4.2_09\bin

should be:

WBEM;C:\j2sdk1.4.2_09\bin
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, that mgiht be missing a semicolon right before c:\... I set mine by typing something like this:

set path=%path%;c:\progra~1\etc\bin

See if THIS helps. Let me know if it isn't clear so I can fix it up. Thanks!!
[ September 16, 2005: Message edited by: Stan James ]
 
Matt applewood
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks it worked
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic