No javac.exe

Using the Java SDK with TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
Doug1

No javac.exe

Post by Doug1 »

I'm new to java, in fact I'm currently enrolled in a java course for the first time. However, I'm not new to computers....been in the business for about 30 years. First time to log onto any forum so you know I'm desparate.

All of a sudden, I have no javac.exe file on my computer. I've reinstalled both the j2se (latest ver) and textpad (latest version). In fact, I've re-installed them several times and even went back to the sites to download them again...just in case.

Still no results. I've reinstalled them j2se first and textpad 2nd and then uninstalled them and reversed the process. I've done default installations and custom. I reboot after each install and/or uninstall.

I've checked the computers at school and they have the javac.exe file. I've checked this forum and have tried everything that I found even remotely related to the subject...no good.

I would appreciate any and all suggestions. Please forgive the length of this post....my first time and I'm desperate.
Randall

Re: No javac.exe

Post by Randall »

Looks like you'll have to edit your classpath.

If u have winXP, right click on "my computer" and click on "properties"

then click on "Advanced" tab and then theres an "environment variables" button, click on it.

then you'll have to add a new variable "classpath" with a value of:
C:\j2sdk1.4.1_01\jre\lib\rt.jar;

or wherever is ur rt.jar directory.


And then add another variable "path" with a value of:

C:\j2sdk1.4.1_01\bin;

and again, it depends on where is ur java bin folder is at.

Hope it works

Randall
User avatar
jeffy
Posts: 323
Joined: Mon Mar 03, 2003 9:04 am
Location: Philadelphia

Re: No javac.exe

Post by jeffy »

Randall wrote:Looks like you'll have to edit your classpath.
Actually, CLASSES are searched via the classpath. javac.exe is searched via the PATH. Follow the instructions just as listed above, but do so for the PATH environment variable, not CLASSPATH.
Garrett

DO modify PATH, DON'T modify CLASSPATH

Post by Garrett »

Yeah, jeffy's right. Don't screw around with your CLASSPATH environment variable, and certainly don't ever point it at rt.jar. Doing that slaves you in the future to ONE SINGLE JDK installed on your system at any given time. The java.exe and javac.exe executables automatically include in their classpaths all .jar and .zip files located at:

C:\%JAVA_HOME\jre\lib
and
C:\%JAVA_HOME%\jre\lib\ext

So don't f*** around with that.

It seems that the PATH system variable is not right, so in the second part of Randall's post, (and all of Jeffy's,) they are right.

To test, try opening a command prompt NOT inside of %JAVA_HOME%\bin, (anywhere else,) and just type in:

> java -version

If you get info printed out about which version of java you're using, it's in the path, if not, then you need to set the PATH system variable as they said.
tedder
Posts: 2
Joined: Wed Mar 12, 2003 3:21 am

Also no Javac.exe

Post by tedder »

I cannot get TextPad to compile because it claims that my Javac.exe is in C:\Windows, and it cannot find it. I have edited the path variable as suggested above to no avail. The strange thing is that from the command line, java -version gives correct information in every directory I tried but Windows.

My other java editor/compiler, BlueJay, works fine, but I like the IDE of TextPad and I hope to get it working. I would appreciate any help here.
Post Reply