Thread: Java not running under Linux

Java not running under Linux

From
wsmeyer@ibest.com.br
Date:
Hi,

   I'm having problem  running  java on Linux. The source code is compiled ok, but when I try to run it with  "java
filename"the follow error message appear: 

    " Exception in thread main java.lang.NoClassDefFoundError "

   Someone that already had this kind of problem......

Thanks


     Wladimr

_________________________________________________
Quer ajudar o Brasil e n�o sabe como?
AjudaBrasil: http://www.ajudabrasil.org/mail.html.

Re: Java not running under Linux

From
Fernando Nasser
Date:
wsmeyer@ibest.com.br wrote:> Hi,
>
>    I'm having problem  running  java on Linux. The source code is compiled ok, but when I try to run it with  "java
filename"the follow error message appear: 
>
>     " Exception in thread main java.lang.NoClassDefFoundError "
>
>    Someone that already had this kind of problem......
>

What is the value of your JAVA_HOME environment variable?

What does `which java` returns?

Where did you install your JDBC driver?



--
Fernando Nasser
Red Hat - Toronto                       E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9


Re: Java not running under Linux

From
Zak McGregor
Date:
On Wed, 27 Aug 2003 22:22:58 -0400
Fernando Nasser <fnasser@redhat.com> wrote:

> wsmeyer@ibest.com.br wrote:> Hi,
> >
> >    I'm having problem  running  java on Linux. The source code is compiled
> >    ok, but when I try to run it with  "java filename" the follow error
> >    message appear:
> >
> >     " Exception in thread main java.lang.NoClassDefFoundError "

Try chopping the .class off the filename bit. In other words if your class is in
the file MyClass.class, run it with "java MyClass" instead of "java
MyClass.class"

HTH

Ciao

Zak

--
========================================================================
http://www.carfolio.com/        Searchable database of 10 000+ car specs
Auctioning motoring-related items at eBay? http://www.carfolio.com/ebay/
========================================================================

Re: Java not running under Linux

From
"Marcus Andree S. Magalhaes"
Date:
This is a way off-topic. The answer: RTFM.

you either:

1- mispelled the Java class name. Note that it's the class name and not the
   class filename that matters. It is case sensitive and you must spell it
   exactly the way it's named internally.

2- you haven't provide the class name complete with packages.

next time, use more your time than ours for off topic questions. You're a
way too far from making questions about PostgreSQL JDBC drivers if you
can't compile a java source file.

Quoting wsmeyer@ibest.com.br:

> Hi,
>
>    I'm having problem  running  java on Linux. The source code is compiled
> ok, but when I try to run it with  "java filename" the follow error message
> appear:
>
>     " Exception in thread main java.lang.NoClassDefFoundError "
>
>    Someone that already had this kind of problem......
>
> Thanks
>
>
>      Wladimr
>
> _________________________________________________
> Quer ajudar o Brasil e não sabe como?
> AjudaBrasil: http://www.ajudabrasil.org/mail.html.
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>




-------------------------------
   http://www.vlinfo.com.br