Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Error compiling with command line javac!!

1 view
Skip to first unread message

Layne

unread,
Jan 25, 2002, 11:59:40 PM1/25/02
to
Does anyone know what this message means? I'm new to this!


C:\jdk\corejavabook\v1ch2\Welcome>javac welcome.java

C:\jdk\corejavabook\v1ch2\Welcome>java welcome
Exception in thread "main" java.lang.NoClassDefFoundError: welcome (wrong
name:
Welcome)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:493)
at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:11
1)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)

C:\jdk\corejavabook\v1ch2\Welcome>


Thanks for your help!!!!
Layne


Frank

unread,
Jan 26, 2002, 2:09:15 AM1/26/02
to
Java (in order to run on unix) is a very case sensative language, even if
windows isn't.
Check that your .java class definition reads something like:

public class Welcome

and try to run using:

java Welcome

(not "java welcome").
Hope this helps!

Frank


"Layne" <laynea...@usa.net> wrote in message
news:KZq48.34110$bv.28...@twister.kc.rr.com...

gg

unread,
Jan 26, 2002, 8:15:48 PM1/26/02
to
the command java is case sensitvie even in MS Windows. the name of the file
(welcome in your case) must match eaclty with the name of the class. So if
your class is defined as
public clss Welcome...
then you must name your java file as Welcome.java not welcome.java.

Hope this help.


"Layne" <laynea...@usa.net> wrote in message
news:KZq48.34110$bv.28...@twister.kc.rr.com...

Roedy Green

unread,
Jan 27, 2002, 7:12:14 PM1/27/02
to
On Fri, 25 Jan 2002 22:59:40 -0600, "Layne" <laynea...@usa.net>
wrote or quoted :

>Exception in thread "main" java.lang.NoClassDefFoundError: welcome (wrong
>name:

see "error messages" in the Java glossary


--
eagerly seeking telecommuting programming work.
canadian mind products, roedy green
the java glossary is at
http://www.mindprod.com/gloss.html
or http://209.139.205.39

gg

unread,
Jan 26, 2002, 8:15:48 PM1/26/02
to
the command java is case sensitvie even in MS Windows. the name of the file
(welcome in your case) must match eaclty with the name of the class. So if
your class is defined as
public clss Welcome...
then you must name your java file as Welcome.java not welcome.java.

Hope this help.
"Layne" <laynea...@usa.net> wrote in message
news:KZq48.34110$bv.28...@twister.kc.rr.com...

========= WAS CANCELLED BY =======:
From: "gg" <nom...@nomail.com>
Control: cancel <8xI48.4172$_F4.12...@news0.telusplanet.net>
Subject: cmsg cancel <8xI48.4172$_F4.12...@news0.telusplanet.net>
Date: Mon, 28 Jan 2002 01:21:41 GMT
Message-ID: <cancel.8xI48.4172$_F4.12...@news0.telusplanet.net>
X-No-Archive: yes
Newsgroups: microsoft.test,alt.flame.niggers,comp.lang.java.help
NNTP-Posting-Host: w088.z064003087.lax-ca.dsl.cnc.net 64.3.87.88
Lines: 1
Path: news.uni-stuttgart.de!cert.uni-stuttgart.de!news.belwue.de!news.uni-ulm.de!rz.uni-karlsruhe.de!blackbush.xlink.net!blackbush.de.kpnqwest.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!fr.clara.net!heighliner.fr.clara.net!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news.stealth.net!msrtrans1!msrnewsc1!cppssbbsa01.microsoft.com!tkmsftngp01!tkmsftngp04!u&n&a&c&anceller
Xref: news.uni-stuttgart.de control:40720895

This message was cancelled from within The Unacanceller's glorious new software, Lotus 1-2-3 For Rogue Cancellers.

Roedy Green

unread,
Jan 27, 2002, 7:12:14 PM1/27/02
to
On Fri, 25 Jan 2002 22:59:40 -0600, "Layne" <laynea...@usa.net>
wrote or quoted :

>Exception in thread "main" java.lang.NoClassDefFoundError: welcome (wrong
>name:


see "error messages" in the Java glossary


--
eagerly seeking telecommuting programming work.
canadian mind products, roedy green
the java glossary is at
http://www.mindprod.com/gloss.html
or http://209.139.205.39

========= WAS CANCELLED BY =======:
From: Roedy Green <ro...@mindprod.com>
Control: cancel <ip595ucc77drana88...@4ax.com>
Subject: cmsg cancel <ip595ucc77drana88...@4ax.com>
Date: Mon, 28 Jan 2002 02:38:55 GMT
Message-ID: <cancel.ip595ucc77dra...@4ax.com>


X-No-Archive: yes
Newsgroups: microsoft.test,alt.flame.niggers,comp.lang.java.help
NNTP-Posting-Host: w088.z064003087.lax-ca.dsl.cnc.net 64.3.87.88
Lines: 1

Path: news.uni-stuttgart.de!cert.uni-stuttgart.de!news.belwue.de!news.uni-ulm.de!rz.uni-karlsruhe.de!blackbush.xlink.net!blackbush.de.kpnqwest.net!newsfeed00.sul.t-online.de!t-online.de!news-lei1.dfn.de!news-nue1.dfn.de!newsfeed.r-kom.de!newsfeed.stueberl.de!news-out.cwix.com!newsfeed.cwix.com!news.maxwell.syr.edu!news.stealth.net!msrtrans1!msrnewsc1!cppssbbsa01.microsoft.com!tkmsftngp01!tkmsftngp04!u&n&a&c&anceller
Xref: news.uni-stuttgart.de control:40719933

Frank

unread,
Jan 26, 2002, 2:09:15 AM1/26/02
to
Java (in order to run on unix) is a very case sensative language, even if
windows isn't.
Check that your .java class definition reads something like:

public class Welcome

and try to run using:

java Welcome

(not "java welcome").
Hope this helps!

Frank


"Layne" <laynea...@usa.net> wrote in message
news:KZq48.34110$bv.28...@twister.kc.rr.com...

========= WAS CANCELLED BY =======:
From: "Frank" <conq...@nospam.prodigy.net>
Control: cancel <vCs48.23129$Ju6.206...@newssvr17.news.prodigy.com>
Subject: cmsg cancel <vCs48.23129$Ju6.206...@newssvr17.news.prodigy.com>
Date: Sun, 27 Jan 2002 23:22:55 GMT
X-Auth-User: 226255806/12938af2e65d582a
X-Post-Time: Mon, 28 Jan 2002 03:00:13 GMT
X-Problems-To: ab...@prodigy.com
Message-ID: <cancel.vCs48.23129$Ju6.206...@newssvr17.news.prodigy.com>


X-No-Archive: yes
Newsgroups: microsoft.test,alt.flame.niggers,comp.lang.java.help
NNTP-Posting-Host: w088.z064003087.lax-ca.dsl.cnc.net 64.3.87.88
Lines: 1

Path: news.uni-stuttgart.de!news.fh-hannover.de!fu-berlin.de!uucp.muenster.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.hanau.net!fr.clara.net!heighliner.fr.clara.net!news.stealth.net!msrtrans1!msrnewsc1!cppssbbsa01.microsoft.com!tkmsftngp01!tkmsftngp04!u&n&a&c&anceller
Xref: news.uni-stuttgart.de control:40720594

0 new messages