I dont understnad what the problem is. In order to check my logic, I recreated the same scenario in Netbeans and it works perfectly. Can anyone please suggest something?
I finally managed to compile my FoodMain.java by compiling both the files simulataniously with "javac *.java", but when I try and run FoodMain - its gives me "NoClassDefFoundError". What do you think the problem is? Thanks. On Mar 22, 5:27 pm, Amit <[email protected]> wrote: > Hello, > > I am doing the following homework exercises which asks us to create > two .java files in package foodpackage.fruitpackage. The files are > Food.java and FoodMain.java. > > I created and complied Food.java and when I am doing the same for > FoodMain.java and try to access Food class from it says symbol not > found. > > I am pretty sure that I have done everything correctly. And in any > case they are in the same package, so Food class should be available > to FoodMain class. Both the files are in fruitpackage directory, then > why doesnt it work? Can anyone help me on it? > > Thanks > > With regards. -- 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
