0

I am trying to set-up the classpath for a Java application I wrote, and I'm a little stumped as to what I am doing wrong. I've taken a look at the Oracle Java 6 classpath documentation here: http://docs.oracle.com/javase/6/docs/technotes/tools/windows/classpath.html

Here is my command that I am using in a shell script:

/usr/java6/jre/bin/java -classpath .:/usr/home/wasadmin/scripts/AutoEmail.jar:/usr/IBM/WebSphere/AppServer/runtimes/com.ibm.ws.ejb.thinclient_7.0.0.jar:/usr/IBM/WebSphere/AppServer/optionalLibraries/oracle/ojdbc6.jar:/usr/IBM/WebSphere/wp_profile/installedApps/ProdCell/PA_Project.ear/Project.war/WEB-INF/lib/*:/usr/IBM/WebSphere/wp_profile/installedApps/ProdCell/PA_Project.ear/Project.war/WEB-INF/classes:/usr/IBM/WebSphere/wp_profile/installedApps/ProdCell/PA_Project.ear/Project.war/WEB-INF/classes/* com.test.project.Main

My issue is that my project is using Hibernate, but it can't find my Hibernate config file. The config file is located at

/usr/IBM/WebSphere/wp_profile/installedApps/ProdCell/PA_Project.ear/Project.war/WEB-INF/classes/hibernate.cfg.xml, which I believe is covered by the classpath as shown above.

Is there something wrong with my classpath that it can't see it?

Also, just a side-note -- the .ear and .war directories listed in the classpath above are actually directories and not .ear or .war files.

Thanks!

Zeus
  • 6,386
  • 6
  • 54
  • 89
Chatoyancy
  • 143
  • 1
  • 17
  • Not too sure you can use the /* inside the classpath like you are doing. Give the jar names or the folder path. – mikemil Feb 18 '14 at 21:38
  • You can in Java 6 in later; it's pretty nice when you have a lib directory full of .jar files. See the documentation I mentioned in my original post. :) – Chatoyancy Feb 19 '14 at 16:30

1 Answers1

0

Turns out it was a stupid mistake -- I forgot to update my portlet (which was installed in /usr/IBM/WebSphere/wp_profile/installedApps/ProdCell/PA_Project.ear/) with the new version that contained the actual hibernate.cfg.xml. Oops.

Should I delete this question?

Chatoyancy
  • 143
  • 1
  • 17