Hibernate version:3.2.6.ga
Hi,
I'm new to Hibernate.
I have created a simple example, but I have problem with
java command (bad classpath?).
This is my file and folder (I don't post the source code because it's correct):
Code:
SimpleHibernate
|
|__lib
| |__ hibernate3.jar
|
|__src
| |__it
| | |__html
| | |__hibernate
| | |__ Persona.java // JavaBean with info about a Person
| | |__ PersonaUnitTest.java // Test class for Person (a simple main)
| | |__ Persona.hbm.xml // Descriptor
| |__ hibernate.cfg.xml // Info about DB connection
|
|__ class //The same building as the src, but with .class of course
|__ ...
From SimpleHibernate folder:
javac -classpath .;lib\hibernate3.jar src\it\html\hibernate\*.java -d class
Everything OK, but when I do
java PersonaUnitTest returns the following error:
Exception in thread "main" java.lang.NoClassDefFoundError: class\it\html\hibernate\PersonUnitTest (wrong name: it/html/hibernate/PersonUnitTest)
Why? A bad classpath? I must include another libraries?
Thanks in advance,
Best Regards.
Matteo