Something about CLASSPATH

When I create a blank project,and then add Hibernate support,everything goes well.I put hibernate.properties and hibernate.cfg.xml under the src directory,and Hibernate can recognize them.But when I create a file named import.sql under the src directory,the log shows that hibernate could not find /import.sql.How could I do?
Thanks!

3 comments

SQL files are not copied by default from src to classes.
You can configure that in Settings -> Project Settings -> Compiler

zhangjp wrote:

When I create a blank project,and then add Hibernate support,everything goes well.I put hibernate.properties and hibernate.cfg.xml under the src directory,and Hibernate can recognize them.But when I create a file named import.sql under the src directory,the log shows that hibernate could not find /import.sql.How could I do?
Thanks!

0

Too much thanks for your help!
I could not resolve the problem without your help!and please excuse for my poor English,and I am a Chinese programmer.

Message was edited by:
zhangjp

0

Hello zhangjp,

There is Compiler settings group near the Project Settings. That's it.

I'm sorry,but I could not find Settings -> Project Settings ->
Compiler.My version of intelliJ is 7.0.2,did you mean
Settings->Project Settings->JDKs? I add the src directory to the
classpath along with jdk libraries.and Hibernate could find it! But I
think it's not the right way,and add something to the jdk classpath
feeling not well.

Alexander.


0

Please sign in to leave a comment.