i checked it many times 

bec i made the class file when i'm in this folder 


 


Date: Wed, 18 Feb 2009 05:35:23 -0800
From: [email protected]
Subject: [java programming] Re: problem in lab-1003
To: [email protected]; [email protected]





Yasmin,

 This is your problem to begin with.

  "Could not find the main class: FoodMain. Program will exit"

What it means is that your class file is not in the same place where running 
java from.

so setup classpath,  To make it happen check and see FoodMain.class is in  
"c:\foodpackage\fruitpackage>" this place.


--Ravi.Halli



--- On Tue, 2/17/09, yasmin <[email protected]> wrote:

From: yasmin <[email protected]>
Subject: [java programming] Re: problem in lab-1003
To: "Free Java Programming Online Training Course By Sang Shin" 
<[email protected]>
Date: Tuesday, February 17, 2009, 3:44 PM

I have found a new problem
that after creating FoodMain.class and type "java FoodMain"
it shows me this msg
c:\foodpackage\fruitpackage>java FoodMain
Exception in thread "main"
java.lang.NoClassDefFoundError:FoodMain<wrong name: foodpackage/
fruitpackage/FoodMain>
at java.lang.ClassLoader.defineClass1<Native Method>
at java.lang.ClassLoader.defineClass<ClassLoader.java:621>
at java.security.SecureClassLoader.defineClass<SecureClassLoader.java:
124>
at java.net.URLClassLoader.defineClass<URlClassLoader.java:260>
at java.net.URLClassLoader.access$000<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:307>
at
 sun.misc.Launcher$AppClassLoader.loadClass<Launcher.java:301>
at java.lang.ClassLoader.loadClass<ClassLoader.java:252>
at java.lang.ClassLoader.loadClassInternal<ClassLoader.java:320>
Could not find the main class: FoodMain. Program will exit

On Feb 16, 9:32 pm, yasmin <[email protected]> wrote:
> every time i write javac in the command promat
> the system tell me that
> 'javac' is not recognized as internal or external command,operable
> program or batch file
> knowing that i 'm using netbeans IDE and i've done many projects
> thx in advance




     




_________________________________________________________________
Discover the new Windows Vista
http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/javaprogrammingwithpassion?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to