SitePoint Sponsor |
|
User Tag List
Results 1 to 10 of 10
Thread: Newbie Java / PC problem
-
Oct 8, 2000, 21:13 #1
- Join Date
- Mar 2000
- Location
- Muskegon, MI
- Posts
- 2,328
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I'm not sure if this is the best place to post this question, but since Java is mentioned in the description...
I am attempting to learn Java through a Sam's 'Teach Yourself in 21 Days' book. Day1 they have download the latest JDK from Sun (which is 1.3). Test my computer at the DOS prompt to make sure it is installed correctly. It seems to be configured correctly.
The first program they have me do is 'Hello World' and then compile it. This is where I run into the problem. DOS keeps returning a 'bad command or file' error at the javac command prompt. I double-checked my JDK directory to confirm that I have the javac.exe file.
Please help!
-
Oct 8, 2000, 21:28 #2
- Join Date
- May 2000
- Location
- On some harddisk
- Posts
- 599
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I think the below will solve it:
Look in your autoexec.bat/config.sys file. There should be a line pointing to your JDK folder. Check if the path is correct. Also make sure the path with the 'bin' word is correct.
-
Oct 9, 2000, 06:53 #3
- Join Date
- Mar 2000
- Location
- Muskegon, MI
- Posts
- 2,328
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thanks for the reply.
I am a bit illeterate when it comes to DOS. How do I check those files?
Thanks again.
-
Oct 9, 2000, 08:34 #4
- Join Date
- May 2000
- Location
- On some harddisk
- Posts
- 599
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
You can check those files in Windows too !
Just use your notepad or wordpad to open it up and edit !
-
Oct 9, 2000, 09:39 #5
- Join Date
- Feb 2000
- Location
- where the World once stood
- Posts
- 700
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Hi,
The path command is found in the autoexec.bat file (in your root directory "C:\"). You can peek at by going into DOS and typing the following command: "type c:\autoexec.bat"
The line you need should look something like: "path c:\;c:\windows;...etc...c:\.....jdk___\bin" where "jdk___\bin" is the directory that you installed the jdk.
If it isn't there, you need to use notepad or some other text editor to edit the path line so that the jdk path is included. If you use Word or some other editor, make sure you save the file as a text, not word processor, file. Make a copy of your autoexec.bat file before you try it, just to be safe.
VinnyWhere the World Once Stood
the blades of grass
cut me still
-
Oct 9, 2000, 12:19 #6
- Join Date
- Mar 2000
- Location
- Muskegon, MI
- Posts
- 2,328
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I really appreciate the help thus far, but i don't want to screw up my autoexec file since I know little about this area. I opened the autoexec.bat file with Notepad and I pasteing a copy here -
Code:C:\PROGRA~1\MCAFEE\VIRUSS~1\SCANPM.EXE C:\ /NOEXPIRE @IF ERRORLEVEL 1 PAUSE @ECHO OFF SET BLASTER=A220 I5 D1 \CPQS\TOOLS\DNY E: IF ERRORLEVEL 1 GOTO SKIPE IF EXIST E:\MFG00.BAT CALL E:\MFG00.BAT IF EXIST E:\MFG00.BAT DEL E:\MFG00.BAT IF EXIST E:\CONFIG.BAT E:\CONFIG.BAT :SKIPE \CPQS\TOOLS\DNY D: IF ERRORLEVEL 1 GOTO SKIPED IF EXIST D:\MFG00.BAT CALL D:\MFG00.BAT IF EXIST D:\MFG00.BAT DEL D:\MFG00.BAT IF EXIST D:\CONFIG.BAT D:\CONFIG.BAT :SKIPED \CPQS\TOOLS\CPQSLOG D:>>\CPQS\BACKWEB\USERPROF.DAT :XIT @REM Next 3 Lines are Only Required for 1 Boot but are OK to leave permanently @REM Next Line added by Compaq Service Connection Install - Please do not Remove @REM Next 3 Lines are Only Required for 1 Boot but are OK to leave permanently ECHO bw_workgroup=,"Service Connection">>%DSHD%\CPQS\BACKWEB\USERPROF.DAT IF EXIST \PIPOST.BAT CALL \PIPOST.BAT IF EXIST \PIPOST.BAT DEL \PIPOST.BAT \CPQS\TOOLS\MINIFER2.EXE CREV=,200 LANG=,"EN" IF EXIST D:\PATCHES\PATCHES.BAT CALL D:\PATCHES\PATCHES.BAT IF EXIST D:\SEHCTAP\NUL REN D:\SEHCTAP PATCHES PATH=%PATH%;"C:\Program Files\Mts" MSCDEX /D:MSCD001 /V
Thanks ever so much,
Westmich
-
Oct 10, 2000, 12:36 #7
- Join Date
- Feb 2000
- Location
- where the World once stood
- Posts
- 700
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Hi,
Verrrrry interesting -- I don't see a path command anywhere -- except for the end
PATH=%PATH%;"C:\Program Files\Mts"
and the %PATH%; says to append what follows to the original path. So my guess is your main path is somewhere else. Which means you should be able to modify the above line to read:
PATH=%PATH%;c:\jdk1.3;"C:\Program Files\Mts"
of course you can also change your jdk.bat/pif file (the one that executes the development kit by adding path=c:\jdk1.3 at the top of the file.
Hope this helps
Vinny
Where the World Once Stood
the blades of grass
cut me still
-
Oct 10, 2000, 13:01 #8
- Join Date
- Mar 2000
- Location
- Muskegon, MI
- Posts
- 2,328
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
That doesn't seem to work either. But, no problem. When I need to compile, I change the directory to where my source code is and then type in the full path.
-
Oct 10, 2000, 14:46 #9
- Join Date
- Apr 2000
- Location
- Melbourne, Australia
- Posts
- 2,571
- Mentioned
- 2 Post(s)
- Tagged
- 0 Thread(s)
Indeed, Vincent was on the right track. The line should point to the 'bin' directory, however:
PATH=%PATH%;c:\jdk1.3\bin;"C:\Program Files\Mts"
Also be aware that you'll have to reboot before changes to your AUTOEXEC.BAT take effect.
Kevin Yank
CTO, sitepoint.com
I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
Baby’s got back—a hard back, that is: The Ultimate CSS Reference
-
Oct 10, 2000, 18:55 #10
- Join Date
- Mar 2000
- Location
- Muskegon, MI
- Posts
- 2,328
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Bingo! That did the trick. I changed the line before, but didn't realize I needed to reboot.
Thanks again,
Westmich
Bookmarks