Java 'can't find class' error

Java 'can't find class' error

Post by Sang Le » Sun, 31 Dec 1899 09:00:00



Hello there...

I installed linux and tried to run java class - say 'helloworld', but I
got the 'can't find class' error...
The compiling is fine but 'java' gave me a headache.

It's been a long time with linux  (about 3 yrs ago, yeah~ slackware...)
and I can't remember the setting (as far as I remember, this error is
not come from the java package + installation,  the above error is come
from shell setting. -Correct me if I'm wrong.)

give me some help to find it out...

thanks in advance.

OpenLinux 2.3
sun JDK 1.2

 
 
 

Java 'can't find class' error

Post by Colin Wats » Sun, 31 Dec 1899 09:00:00




>I installed linux and tried to run java class - say 'helloworld', but I
>got the 'can't find class' error...
>The compiling is fine but 'java' gave me a headache.

>It's been a long time with linux  (about 3 yrs ago, yeah~ slackware...)
>and I can't remember the setting (as far as I remember, this error is
>not come from the java package + installation,  the above error is come
>from shell setting. -Correct me if I'm wrong.)

>give me some help to find it out...

>thanks in advance.

>OpenLinux 2.3
>sun JDK 1.2

It's almost certainly a problem with the setting of the $CLASSPATH
environment variable. I'd advise you to use javawrapper (but then I
would :)). You'll probably have an old version in
/usr/src/linux/Documentation/java.txt if you have the source for a 2.2
kernel (or the new version if you have the source for a 2.3 kernel); go
to http://www.anatom.uni-tuebingen.de/~richi/linux/binfmt_misc.html for
the current version and instructions.

(I hope it works with JDK 1.2 ...)

--

"However, most netters acknowledge the offline world's advantages,
 despite the fact that it is slow, clunky, and hogs bandwidth."
  - "Surfing on the Internet", J.C. Herz

 
 
 

Java 'can't find class' error

Post by Sang Le » Sun, 31 Dec 1899 09:00:00



> Hello there...

> I installed linux and tried to run java class - say 'helloworld', but I
> got the 'can't find class' error...
> The compiling is fine but 'java' gave me a headache.

> It's been a long time with linux  (about 3 yrs ago, yeah~ slackware...)
> and I can't remember the setting (as far as I remember, this error is
> not come from the java package + installation,  the above error is come
> from shell setting. -Correct me if I'm wrong.)

> give me some help to find it out...

> thanks in advance.

> OpenLinux 2.3
> sun JDK 1.2

It fixed and thanks for your help.
 
 
 

Java 'can't find class' error

Post by Georg Ortman » Sun, 31 Dec 1899 09:00:00



> Hello there...

> I installed linux and tried to run java class - say 'helloworld', but I
> got the 'can't find class' error...
> The compiling is fine but 'java' gave me a headache.

The name of the compiled Java programm mst be <classname>.class and is
case sensitive.

--
Regards


   To get my PGP key send mail with subject "Send PGP key"

 
 
 

Java 'can't find class' error

Post by Richard Bum » Sun, 31 Dec 1899 09:00:00




>> Hello there...

>> I installed linux and tried to run java class - say 'helloworld', but I
>> got the 'can't find class' error...
>> The compiling is fine but 'java' gave me a headache.
>The name of the compiled Java programm mst be <classname>.class and is
>case sensitive.
>--
>Regards

>   To get my PGP key send mail with subject "Send PGP key"

Which linux?

Which java?

I had the same problem with the java 1.0.x that came with COL2.2.  The
hello.java compiled with no problem, but java could not find the
class.  It seems that either the CLASSPATH is not correctly set, or
the .javawrapper script is not generating a path that includes ".".
You can get it to work by manually setting the "-classpath" option
that is parsed by the real java program after it has been spawned by
.javawrapper.

Also, COL2.2 uses kaffe as its default java, but is not set up to
allow it to run, so I removed it to allow the system to find the other
version.

One more gripe: although the appletviewer includes the sound in the
applets, Netscape doesn't.

--
    R. T. Bumby       ||Amer. Math. Monthly Problems Editor 1992--1996

Telephone: [USA] 732-445-0277                       FAX:  732-445-5530

 
 
 

1. Java Kernel Support can't find class in .class file

I've recompiled for kernel support of Java.  Using a module for Java.
Using Linux 2.0.27

/etc/bashrc:
export CLASSPATH=/usr/local/java/lib/classs:.

I tried to run the HelloWorld.java program from Documentation/java.txt

Any ideas?
--
=============== ==============================================
Paul Cummings   "That's an awful lot of ships." --Ivanova

=Linux=v2.0.27= ==============================================

2. is my modem a win modem? has a Rockwell chip

3. IBM JAVA problem panic: CL: Can't find class java.lang.NoClassDefFoundError IOT

4. What does "segmentation fault" mean?

5. 'Find' 'Updatedb' or find database replacement for Solaris 2.X?

6. DHCPD troubles...

7. Compiler Error -- doesn't find shred library 'libc.so.4'

8. Netscape

9. configure: error: Didn't find the mysql library dir in '' HELP!

10. Error : can't find library 'libXt.so.3'

11. Perl5.001 error msg: can't find library 'libdb.so.1'

12. java/47447: linux-sun-jdk1.4.1: java command can't find java.lang.Object

13. Suse 6.2 Hard Disk Installation Error, 'Can't Find Image !'?