1.

Solve : set path to javac. javac not working?

Answer»

I've installed Java SDK 1.4.2. It has installed properly and working all well. But the problem is that everytime I've a compile a ".java" file, I've to first set the path to the bin folder and after that the "javac" command works and of course all other BUILT in commands of DOS i.e. "edit", "RENAME", stop working and only "javac" works. When I close and reopen MS DOS, the same is the case. i.e. i again have to set the path to the bin library of java.
i opened autoexec.bat but there was nothing written in it... no data.. it was all empty. I am using windows 98 (not sure about the dos version). I also typed the following code in autoexec.bat and saved it:

set path=c:\j2sdk1.4.2_19\bin

saved it and ran it but it didn't work.

There was nothing already in the autoexec.bat.
From where I can permanently set the path to bin folder so that whenever I type "javac filename.java" to compile.. it compiles it without given "bad command or file name"

Thanx in advance.Quote

I am using windows 98 (not sure about the dos version). I also typed the following code in autoexec.bat and saved it:

set path=c:\j2sdk1.4.2_19\bin

saved it and ran it but it didn't work.

You need to reboot Win98 for any changes to either config.sys or autoexec.bat to take effect.

Quote
I've to first set the path to the bin folder and after that the "javac" command works and of course all other built in commands of DOS i.e. "edit", "rename", stop working and only "javac" works. When I close and reopen MS DOS, the same is the case. i.e. i again have to set the path to the bin library of java.

The Java install should have added the bin directory to your path automatically. By setting it yourself, you may have wiped out the EXISTING path. You should have set it as:

Code: [Select]set path=%path%;c:\j2sdk1.4.2_19\bin

Not finding edit would explain that the standard SYSTEM path got wiped, but not finding rename is puzzling as it's an internal command.



Your profile says WinXP in which case this post is rendered obsolete.


Discussion

No Comment Found