Peter Gibbons-BU wrote: > Normally, when you run java code, java expects to see a class name, not a file name. Class names have dots, and don't start from the filesystem root. Try this:
$ mkdir javatest $ cat > javatest/test.java package javatest; public class test { public static void main( String args[] ) { System.out.println("Hi"); } } <CTRL-D> $ javac javatest/test.java $ java javatest.test Hi $ I'm using redhat 7 and Blackdown linux, but the java vm works similarly to this on solaris and windows, so I think it should work for you, too. You should be able to figure out the rest from there. > hello there, > I've downloaded a copy of Java 1.3 latest version and installed it ok. I've > set CLASSPATH to where my Java progs are. I can issue simple Java command > ok, i.e. Java -v for the version and Java returns the expected result. > However when I attempt to run any application, i.e. like a simple > HelloWorld.java app I get errors. In addition I have the sample problem > with Java apps like Xalan. > > I am using linux Mandrake latest version which is 8.0. > > here's my error: > > [triple@localhost javaprogs]$ Java -cc /home/triple/javaprogs/HelloWorld > Internal error: caught an unexpected exception. > Please check your CLASSPATH and your installation. > Java/lang/ClassNotFoundException: /home/triple/javaprogs/HelloWorld > at java.lang.Class.forName(Class.java:native) > at java.lang.Class.forName(Class.java:52) > Aborted > [triple@localhost javaprogs]$ > > [triple@localhost javaprogs]$ echo $CLASSPATH > /home/triple/javaprogs:/home/triple/javaprogs/xalan-j_2_2_D14/bin:/usr/X11R6 > /bin:/usr/local/bin:/bin:/usr/bin:/usr/local/bin:/usr/local/bin/java:/usr/lo > cal/bin/java/bin:/usr/X11R6/bin:/usr/games:/home/triple/javaprogs/xalan-j_2_ > 2_D14/bin:/usr/local/bin:/usr/local/bin/java:/usr/local/bin/java/bin:/usr/X1 > 1R6/bin:/usr/games > [triple@localhost javaprogs]$ > > This e-mail, and any attachment, is confidential. If you have received > it in error, please delete it from your system, do not use or disclose > the information in any way, and notify me immediately. The contents of > this message may contain personal views which are not the views of the > BBC, unless specifically stated. > > ---------------------------------------------------------------------- > To UNSUBSCRIBE, email to [EMAIL PROTECTED] > with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED] -- #define SS_USR 6 /* The user is broken. */ ---------------------------------------------------------------------- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]