Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Re: CLI Java Glitch

Reply
Thread Tools

Re: CLI Java Glitch

 
 
Tom Anderson
Guest
Posts: n/a
 
      06-21-2011
On Mon, 20 Jun 2011, Gene Wirchenko wrote:

> Dear Java'ers:
>
> Given
>
> class HelloWorld
> {
> public static void main(String[] args)
> {
> System.out.println("Hello, world!");
> }
> }
>
> is there any way around the following?
>
> C:\cbs2dev\test>java helloworld
> Exception in thread "main" java.lang.NoClassDefFoundError: helloworld
> (wrong nam
> e: HelloWorld)
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClassCond(Unknown Source)
> at java.lang.ClassLoader.defineClass(Unknown Source)
> at java.security.SecureClassLoader.defineClass(Unknow n Source)
> at java.net.URLClassLoader.defineClass(Unknown Source)
> at java.net.URLClassLoader.access$000(Unknown Source)
> at java.net.URLClassLoader$1.run(Unknown Source)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(Unknown Source)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> Could not find the main class: helloworld. Program will exit.


Yes:

http://fedoraproject.org/get-fedora

I'm serious. Your operating system is broken. Get one that isn't.

tom

--
No man ever steps in the same river twice, for it's not the same river
and he's not the same man. -- Heraclitus
 
Reply With Quote
 
 
 
 
Gene Wirchenko
Guest
Posts: n/a
 
      06-21-2011
On Tue, 21 Jun 2011 22:42:26 +0100, Tom Anderson
<> wrote:

[snip]

>Yes:
>
>http://fedoraproject.org/get-fedora
>
>I'm serious. Your operating system is broken. Get one that isn't.


I do not nuke mosquitos. If I switched operating systems every
time that something did not work quite as I wanted, I would waste a
lot of time.

Sincerely,

Gene Wirchenko
 
Reply With Quote
 
 
 
 
Arne Vajhøj
Guest
Posts: n/a
 
      07-22-2011
On 6/21/2011 5:42 PM, Tom Anderson wrote:
> On Mon, 20 Jun 2011, Gene Wirchenko wrote:
>> Dear Java'ers:
>>
>> Given
>>
>> class HelloWorld
>> {
>> public static void main(String[] args)
>> {
>> System.out.println("Hello, world!");
>> }
>> }
>>
>> is there any way around the following?
>>
>> C:\cbs2dev\test>java helloworld
>> Exception in thread "main" java.lang.NoClassDefFoundError: helloworld
>> (wrong nam
>> e: HelloWorld)
>> at java.lang.ClassLoader.defineClass1(Native Method)
>> at java.lang.ClassLoader.defineClassCond(Unknown Source)
>> at java.lang.ClassLoader.defineClass(Unknown Source)
>> at java.security.SecureClassLoader.defineClass(Unknow n Source)
>> at java.net.URLClassLoader.defineClass(Unknown Source)
>> at java.net.URLClassLoader.access$000(Unknown Source)
>> at java.net.URLClassLoader$1.run(Unknown Source)
>> at java.security.AccessController.doPrivileged(Native Method)
>> at java.net.URLClassLoader.findClass(Unknown Source)
>> at java.lang.ClassLoader.loadClass(Unknown Source)
>> at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
>> at java.lang.ClassLoader.loadClass(Unknown Source)
>> Could not find the main class: helloworld. Program will exit.

>
> Yes:
>
> http://fedoraproject.org/get-fedora


He would get a different exception, but still an exception, so ...

Arne

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: CLI Java Glitch Martin Gregorie Java 54 07-25-2011 11:25 AM
Re: CLI Java Glitch Jeff Higgins Java 8 07-22-2011 09:50 PM
Re: CLI Java Glitch Roedy Green Java 9 07-22-2011 09:45 PM
Re: CLI Java Glitch Jeff Higgins Java 9 06-21-2011 09:45 PM
Re: CLI Java Glitch Stefan Ram Java 2 06-21-2011 07:43 AM



Advertisments