PDA

Click to See Complete Forum and Search --> : HELP!!!!


Sophtware
Aug 14th, 2000, 06:57 PM
How in the hell do you compile a javae program with jdk1.2 ??

My book tells me to save the java file then go to the command line (DOS I am thinking) and type

javac First.java


That doesnt work


Then it says try

javac c:\windows\First.java


No luck there..


HELP!!!


i have no idea anymore...

noone
Aug 14th, 2000, 07:23 PM
Do you have the execetubles in the path statement of your autoexec.bat file?

Sophtware
Aug 14th, 2000, 07:54 PM
I had to change the command path to c:\jdk1.2>
The i had to do this to compile it

c:\jdk1.2> c:\jdk1.2\bin\javac first.java


and it compiles fine but then when i run it using this command

c:\jdk1.2> java first

i get a "bad command or file name" error

unless

c:\jdk1.2> start java first


The program displays the message but another DOS window appears and the message shows but the same window disapears .....

any way i can keep the window open without it closing?? like it is supposed too.

Thank you.

noone
Aug 14th, 2000, 09:11 PM
Add "c:\jdk1.2\bin\" to your path in the autoexec.bat file.

Sophtware
Aug 14th, 2000, 11:32 PM
I did add that line to my autoexec..but then when i restarted my computer back up and my autoexec ran i got a message saying

cannot find win.com unable to load windows....

so i dont know.

noone
Aug 15th, 2000, 12:57 PM
That's wierd, did you change anything else in the autoexec.bat file?

parksie
Aug 15th, 2000, 03:53 PM
When setting the PATH variable, use:

SET PATH=%PATH%;C:\JDK_12\BIN

That way you won't wipe out the default.