• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

pointing JNLP at third party jars

 
Tim McGuire
Ranch Hand
Posts: 820
IntelliJ IDE Tomcat Server VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am doing a simple test to figure out how to tell my web-started application where to find the oracle JDBC driver (ojdbc14.jar) that I have included in my application ( TestJDBC.jar has a total of two files in it Test.class and /lib/ojdbc.jar ). That is my entire app for this test.

The resources part of my jnlp file looks like this:


This has the effect of looking on the server's filesystem for /lib/ojdbc14.jar

It is, of course, not there, but bundled in the TestJDBC.jar file.
How can I tell my webstarted app where to look for ojdbc.jar?

Thanks a bunch.
[ April 05, 2005: Message edited by: Tim McGuire ]
 
Cristian Negresco
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Extract the jar from TestJDBC.jar and put it into the /lib/ojdbc14.jar.

I am not sure about the reasons to have the jar inside another jar.
If you really want to do that, then take a look here:http://www.developer.com/repository/common/content/article/19990118/gm_trose_jarzip2/JarExtract.java
on how to extract files from a Jar. Create a new File to the URL having TestJDBC.jar. After retreiving the classes from the jar load them into you classloader. This last point might prove problematic.

Anyway, I don't see any immediate reasons for having this "jar in jar" hierarchy.

BR,
Cristian
 
Tim McGuire
Ranch Hand
Posts: 820
IntelliJ IDE Tomcat Server VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cristian,

Thanks for your reply. I tried putting the third party jar up on the server on its own and it works great. You are right, there is no reason to put that jar in my other jar.

Tim
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic