Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Beginning Java and the fly likes How to install javac Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How to install javac" Watch "How to install javac" New topic
Author

How to install javac

Matt applewood
Greenhorn

Joined: Sep 16, 2005
Posts: 4
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

Joined: Oct 25, 2000
Posts: 7292

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.


Make visible what, without you, might perhaps never have been seen.
- Robert Bresson
Matt applewood
Greenhorn

Joined: Sep 16, 2005
Posts: 4
what do i type to modify the path
Dustinn Yourstone
Greenhorn

Joined: Sep 16, 2005
Posts: 4
At the end of the path var type the path to your jdk ex "C:\jdk1.4\bin"
Matt applewood
Greenhorn

Joined: Sep 16, 2005
Posts: 4
%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

Joined: Oct 25, 2000
Posts: 7292

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

Joined: Jan 29, 2003
Posts: 8791
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 ]

A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Matt applewood
Greenhorn

Joined: Sep 16, 2005
Posts: 4
thanks it worked
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to install javac
 
Similar Threads
Question about JWebUnit / maven
Referencing classes
running a packaged java class
Javac api
I'm a Java Newbie.