thanks student04... heres my simple code im trying to run
import java.awt.*;
import java.awt.event.*;
class Jc_app extends Frame {
public Jc_app() {
addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
dispose();
System.exit(0);
}
});
}
public static void main(String args[]) {
System.out.println("Starting Jc_app...");
Jc_app mainFrame = new Jc_app();
mainFrame.setSize(400, 400);
mainFrame.setTitle("Jc_app");
mainFrame.setVisible(true);
}
}//end of class
im not really sure about my problem, the code compiled succesfully with no error
and its very simple. maybe its in my compiler. when i installed my j2sdk1.4.1, it
seem to just have extracted itself. my installer was a bin file, after i run it
and accepted the term of use (agreement) i got this files extracted,
[robert@localhost robert]$ cd /home/robert/progfiles/j2sdk1.4.1_01
[robert@localhost j2sdk1.4.1_01]$ ls
bin/ COPYRIGHT* demo/ include/ jre/ lib/ LICENSE* man/ README* README.html* src.zip*
[robert@localhost j2sdk1.4.1_01]$ ls -l
total 10420
drwxr-xr-x 2 robert robert 4096 Sep 30 2002 bin/
-rwxr--r-- 1 robert robert 4431 Sep 30 2002 COPYRIGHT*
drwxr-xr-x 6 robert robert 4096 Sep 30 2002 demo/
drwxr-xr-x 3 robert robert 4096 Sep 30 2002 include/
drwxr-xr-x 5 robert robert 4096 Sep 30 2002 jre/
drwxr-xr-x 2 robert robert 4096 Sep 30 2002 lib/
-rwxr--r-- 1 robert robert 16955 Sep 30 2002 LICENSE*
drwxr-xr-x 4 robert robert 4096 Sep 30 2002 man/
-rwxr--r-- 1 robert robert 8729 Sep 30 2002 README*
-rwxr--r-- 1 robert robert 15639 Sep 30 2002 README.html*
-rwxr--r-- 1 robert robert 10568782 Sep 30 2002 src.zip*
[robert@localhost j2sdk1.4.1_01]$
its like the ones i have in my WindowsXP installation, then i changed my .bashrc
as instructed in the installation guide
# .bashrc
# User specific aliases and functions
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# ------------------ start of my JRE path
PATH=$PATH:/home/robert/progfiles/j2sdk1.4.1_01/jre/bin:
JAVA_HOME=/home/robert/progfiles/j2sdk1.4.1_01/jre/bin
export PATH
export JAVA_HOME
export PATH=/home/robert/progfiles/j2sdk1.4.1_01/bin/:$PATH
# ------------------ end of JRE path
after doing that i assumed that everything is fine and in place
so i started programming... i tried running some applet demos in the
demo directory of my java installation and nothing wont run. i thought maybe
doing things as root will work, then i was able to run some of the applets but i
cant run any apps within the demo/jfc directory using java -jar <app.jar>
and im thinking that maybe the previous or existing installation of kaffe made
those applets to run. i really dont know.
so here i am. i created a couple of snapshots and the program im trying to run in the
following URL, by the way im using Mandrake 9.2. Thank You!!!
http://m.1asphost.com/amacss/linux/java_err.htm