hi kevin
sure. one who laughs at others never learns and here we are to learn.
i 'll try my way...
steps:
1. consider we have A.java as,
class A {
public static void main(
String[] s) {
System.out.println("Hello World!");
}
}
2. we have it in directory C:\java\programs
3. we have to make sure that we have PATH environment variable set properly so we can run "javac" (which is a compiler for java program) from anywhere. ie. if we have java 1.4.1_02 installed in directory,
c:\j2sdk1.4.1_02 then we must have "c:\j2sdk1.4.1_02\bin" in the PATH variable. now, how to set PATH var?
3.1 as u r on win 98, go to autoexec.bat you have on ur system,
3.2 u might already see PATH variable there getting set to something
3.3 append at the end of it ";c:\j2sdk1.4.1_02\bin;" if you have PATH variable already in the autoexec.bat otherwise just write,
SET PATH=c:\j2sdk1.4.1_02\bin;
3.4 save autoexec.bat file
3.5 execute it to make sure it works for you in the command prompt. i hope you already know how to execute a batch file
4. now, coming to the original problem,
4.1 try to compile your java program as,
c:\java\programs>javac -classpath .;c:\j2sdk1.4.1_02\lib\tools.jar A.java
that should work.
Here, you see -classpath switch? you can also set CLASSPATH env variable just the way you did PATH var in autoexec.bat file to be,
SET CLASSPATH=.;c:\j2sdk1.4.1_02\lib\tools.jar
if you don't want to use -classpath switch (basically its like pre-configuring things).
try to see if this works for you.
on win 98 u might have to reboot computer to apply autoexec.bat settings to all command prompt window u open ...
regards
maulin