Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SET permanent java path in win98

Status
Not open for further replies.

wanyez

Technical User
Mar 27, 2003
9
SG
how do i set path=c:\j2sdk1.4.1_02\bin in the autoexec.bat permanentally in win98..? i need help on that. thx
 
You do this through Control Panel -> System - >Advanced -> Environment Variables.

"When you have eliminated the impossible, whatever remains, however
improbable, must be the truth." ~ Arthur Conan Doyle
 
Of course you should probably add this to %CLASSPATH% too, makes compiling more reliable!

if it doesnt exist, create it with the \bin, \lib, \lib\ext from the SDK. Again through System - >Advanced -> Environment Variables.
 
but i cant find advanced menu in system under ctrl panel in win98... so is there any other method to find environment variables in win98SE ?
 
Sure

you'll need to add a line into your autoexec.bat file (create one its its not there and put it in C:\)

SET CLASSPATH=....... (add paths here)

to view the classpath afterwards simply type "set classpath" should give you a printout similar to below (once you've included the paths)

D:\Documents and Settings\Alex>set classpath
CLASSPATH=c:\jdk122;d:\jdk1.3.1_02\bin;d:\jdk1.3.1_02\lib;d:\jdk1.3.1_02\jre;d:jdk1.3.1_02\jre\bin;d:\jdk1.3.1_02\jre\lib;d:\Apache JServ 1.1.2\ApacheJServ.jar
;d:\jsdk2.0\lib\jsdk.jar;d:\gnu.regexp-1.1.4\lib\gnu-regexp-1.1.4.jar;d:\xalan-j
_2_3_1\bin\xml-apis.jar;d:\xalan-j_2_3_1\bin\xercesImpl.jar;d:\xalan-j_2_3_1\bin
\xalan.jar;d:\jdbc\mm.mysql-2.0.4-bin.jar;d:\spe;c:\turtle\turtle.class;.

This needs to be placed in the autoexec.bat file so that the paths are linked on boot every time.

Cheers!

Relisys

 
is it a need to set so many paths? or just set path=c:\j2sdk1.4.1_02\bin will do..?
 
yeah that path setting will do fine - that'll give you access to java, javac and javadoc from any directory.

But you may wish to add the directories of any .jar files u wish to use, be they Java's own or secondary sources, to the CLASSPATH, to make sure that Java knows where to find these classes, without it you may find some methods you use cannot be found, you'll get compile time errors all over the shop!

Cheers!

Relisys
 
but after i set the path, i still will have to set the path in ms dos again, before compiling e program. the set path in autoexec.bat doesnt seem to work.
 
it should work fine

stick a copy of your autoexec.bat in a reply and i'll have a gander

Cheers!

Relisys
 
my autoexec.bat is like as shown below:

SET BLASTER=A220 I7 D1 H7 P330 T6
SET SBPCI=C:\PROGRA~1\CREATIVE\AUDIO\DOSDRV

SET PATH=%PATH%;C:\WINDOWS\Twain_32\SwUSB


PATH=%PATH%;"C:\Program Files\Mts"

SET PATH=%PATH%;C:\J2SDK1.4.1_02\BIN

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top