0

I am trying to run a utility class which calls some project specific classes, from .bat file. Utility class runs fine from Eclipse IDE but from command line I get Caused by: java.lang.ClassNotFoundException: org.hibernate.Interceptor.
I assumed that to fix this issue I should find corresponding jar from the project's lib folder and set it explicitly into the bat file's CLASSPATH. But I could not find any jar with class org.hibernate.Interceptor.

What is wrong with my approach? I have following hibernate related jars in my lib folder:

  • hibernate3.jar
  • hibernate-jpa-2.0-api-1.0.0.Final.jar

Batch file has just two commands

@ECHO OFF
java -cp .;D:\Projects\Name\webapps\WEB-INF\classes dbchanges.CreateQuery
2
  • 1
    Can you please share your .bat file's relevant statements? Commented Nov 5, 2012 at 16:31
  • 1
    Do you have everything necessary on your classpath? Commented Nov 5, 2012 at 16:57

1 Answer 1

0

Found the answer. I have to include all the necessary jars into CLASSPATH.

Sorry for stupid question :(

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.