classpath

Hi, I have a problem with an execution of my main class.

Exception in thread "main" java.lang.NoClassDefFoundError: GenerateFile (wrong name: package1/package2/package3/GenerateFile)

My classpath is the following:

/package0 (the root of package1/...)

What's the problem?

The compilation is ok, but this error occurs in runtime.

My system is Red Hat.

Thanks in advance

[419 byte] By [javikanina] at [2007-11-27 2:30:43]
# 1
classpath should be one directory back from thereedit: ignore above, didn't read it properly!how are you running your app, and from which directory? looks like you've got it wrongMessage was edited by: georgemc
georgemca at 2007-7-12 2:44:45 > top of Java-index,Java Essentials,Java Programming...
# 2
You already know your problem... there is a class missing from your classpath when you are trying to run your application.
maple_shafta at 2007-7-12 2:44:45 > top of Java-index,Java Essentials,Java Programming...
# 3
My class exists and it is in package3.
javikanina at 2007-7-12 2:44:45 > top of Java-index,Java Essentials,Java Programming...
# 4
my GenerateFile class is in package3, and the steps are the following:export CLASSPATH=.....(In my directory of package3)javac GenareateFile.java okjava GenarateFIle Exception
javikanina at 2007-7-12 2:44:45 > top of Java-index,Java Essentials,Java Programming...
# 5
yeh, you need to take into account packages. compile and run from the root directory, just above the start of the packages, and use fully-qualified names. a brief look on google for a tutorial will explain it far better than I just did!
georgemca at 2007-7-12 2:44:46 > top of Java-index,Java Essentials,Java Programming...
# 6
Many thanks, my problem was I did not compile and run from the root directory... This was my problem.
javikanina at 2007-7-12 2:44:46 > top of Java-index,Java Essentials,Java Programming...