Am having a problem and am hoping someone else has been through this, and can perhaps provide some help.
When the application is compiled
javac SecondApp.java
only the disk prompt is returned, indicating a clean compile.
When the application is run
java SecondApp
The following message indicats three errors.
Registry key 'software\JavaSoft\Java Runtime Environment\CurrentVersion' has value '1.2', but 1.3' is required.
Error: could not find java.dll
Error: could not find Java 2 Runtime Environment.
I have removed Jbuilder3.5 which used JRE 1.2.2.
The JRE resides in this directory C:\JDK1.3\JRE. I am assuming the JDK and JRE are compatible versions. Cannot find anything that actually states what JRE version is used.
Java.dll resides at both
C:\Program Files\JavaSoft\JRE1.3\bin
And
C:\jdk1.3\jre\bin
The java.dll files are the same size, and have the same modification dates.
My autoexec.bat has these paths -
SET PATH=%PATH%;C:\WINDOWS\Twain_32\Scanwiz;C:\WINDOWS\Twain\Scanwiz;c:\jdk1.3;c:\jdk1.3\bin;c:\JavaProjects
SET CLASSPATH=.\;C:\jdk1.3\lib\tools.jar
The CLASSPATH was added this morning, got the same message.
This is the program I am trying to run. It works fine as an application run from Forte 4 java, Community Edition, with a package statement. Original code is from Gilbert�s _SAMS Teach Yourself Java2 Online book
// SecondApp.java - adding a "Quit" button
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class SecondApp
{
JFrame theFrame = new JFrame("Your Second Application");
JButton theQuitter = new JButton(" Quit ");
public SecondApp()
{
Container c = theFrame.getContentPane();
c.add(theQuitter, "South");
theQuitter.addActionListener(new Quitter());
theFrame.setSize(300, 200);
theFrame.show();
}
public class Quitter implements ActionListener
{
public void actionPerformed(ActionEvent ae)
{
System.exit(0);
}
}
public static void main(
String[] args)
{
new SecondApp();
}
}
Once again, any help would really be appreciated.
C. Lindstrom