[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: Which folder does hibernate.jar, hibernate-annotations.j

ezanih do-not-reply at jboss.com
Wed May 6 04:32:02 EDT 2009


Jaikiran:

Many thanks !!! I cannot thank you enough !!! Thank you !!! Thank you !!! Thank you !!!

I just realized that up till today, I have been WRONGLY copying all the physical files and messing up my JBoss AS server's libraries. Unbelievable!!! I cannot believe how I ended up in this mess and yet got my programs to work thus far by physically copying the files !!!

You are absolutely right !!! The best way is to create a lib folder within Eclipse and copy and paste directly any library or jar files you may need through the Package Explorer IDE.

What happens is that Eclipse will create that lib folder I just created within the Eclipse IDE physically into the Windows file system under the Eclipse workspace and in your relevant application's project folder. So for example you would have all your library files in a folder like this : C:\MyEclipseWorkspace\MyJavaProject\lib.

It can be very confusing ... yes, it can be. I mean, how many lib folders can you see in a typical Java programmer's PC. There's one in the JDK, one the JRE, two lib folders in the JBoss AS server directory and also one lib folder each Hibernate package you download. There are also many common files with the same names splattered everywhere...such as javaassist.jar (there's one in JBoss and one in the JDK.1.5.0_14). Also one can be confused with where to save ojcbd14.jar, for example.

With respect to ojcbd14.jar, if I installed my Oracle client and it saved ojcbd14.jar in Folder A, what would happen if I get an updated version of Oracle (for example 11)? The same with my Hibernate packages I downloaded. What do I do with all the zip and gz.tar files? I have to uncompress and expand them to some folder. So if I want to use hibernate-entitymanager-3.4.0.jar, for example, is it correct do download hibernate-entitymanager-3.4.0.zip from the Hibernate download site and then expand it to C:\hibernate-entitymanager-3.4.0 and then copy the resulting hibernate-entitymanager.jar into my lib folder within Eclipse? I think that's probably the way so that hibernate-entitymanager.jar would be copied into my project's lib folder and not affect others. I guess the downside is there will be a lot of duplicate files for each project setup. I thought just copying the most updated jar ONLY ONCE to the JBoss\server\lib folder would suffice to serve all the Java apps I create which uses JBoss. I was wrong. Anyway, I will have to try to adapt to this new habit right away. Thanks once again!

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4228868#4228868

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4228868




More information about the jboss-user mailing list