I am using Windows XP Professional.
The java.sun.com site offers a number of 1.4 versions
I downloaded {
j2eesdk-1_4-dr-windows-eval.exe;
j2re-1_4_0_04-windows-i586.exe;
j2re-1_4_1_07-windows-i586.exe;
j2sdk-1_4_1_07-windows-i586.exe;
}
I installed {
j2eesdk-1_4-dr-windows-eval.exe
to C:\JDK1.4}
It turn out to be an Enterprize edition with loads of directiories
and generally completely different from the book.
I consulted the forum and uninstalled it.
I installed {
j2re-1_4_0_04-windows-i586.exe;
}
I made this file and saved it {
C:\JSRC\test\test.java
}
Code:
// test.java
// Carefully copied the form from the book,
// "Beginning Java 2"
// "SDK 1.4 Edition"
// ISBN: 0-7645-4365-2
// page 17.
import javax.swing.JApplet;
import java.awt.Graphics
public class test extends JApplet {
public void paint (Graphics g) {
g.drawString(" This is just a test. ", 20, 90);
}
}
I opened the Command Promt ...
C:\JDEV\test>
C:\JDEV\test>javac -source 1.4 test.java
'javac' is not recognised as an internal or external command,
operable program or batch file.
C:\JDEV\test>
ok, then -lets try this ...
C:\JDEV\test>javac -source 1.4 -classpath . test.java
'javac' is not recognised as an internal or external command,
operable program or batch file.
C:\JDEV\test>
There sure enough is no C:\JDK1.4\bin\javac.exe
But there are: java.exe, javaw.exe, jinstall.exe, keytool.exe, orbd.exe, policytool.exe, rmid.exe, rmiregistry.exe, servertool.exe, tnameserv.exe, beans.ocx, plugincpl140_04.cpl and 43 DLL files.
java.exe looks hopeful ...
C:\JDEV\test>java -source 1.4 test.java
Unrecognized option: -source
Could not create Java virtual machine.
C:\JDEV\test>
Lets try this, then ...
C:\JDEV\test>java -ea -cp . test.java
Exception in thread "main" java.lang.NoClassDefFoundError: test/java
C:\JDEV\test>
Does anybody know which version of Java the book was based on?