-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Error with compiler?
PostPosted: Wed Feb 13, 2008 5:41 am 
Newbie

Joined: Tue Feb 12, 2008 11:57 am
Posts: 1
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.