Include jar file in application

If I wish to include a .jar file in my application rather than having it on every users jvm/lib/ext, where do I need to import it in the Package Explorer view?

I am trying to use ojdbc14.jar (which works fine when I put it in my jvm/lib/ext directory) but I wish to place it in the application so it can be rolled out as part of the app - the code that references it is a Java class that is in the src directory in the Package Explorer

TIA

Mike

Subject: Different Approach

We where using the archive to contain our .jat files but if they are large it can knock performance of the app, thats what we noticed. So could I suggest you rather use the “ext” folder as the .jar files load faster. What we did on the client machines was check for the presence of the .jar file in the “ext” folder, if it was not there we deployed to the users machine from the application we where in. We had the .jar file within a notes document and just detached it as needed.

It was a better solution for use,specifically from a performance perspective.

Subject: I like that idea!

Subject: Import jar file

From the menu under the import button choose archive, navigate to the location of the jar file an check the box next to the file and click the Finish button. The jar will be stored under the Archive folder.

Subject: Archive?

Pete

Are you saying to import an “Archive file”? When I do that, it does not create an archive folder - it seems to unpack the jar file

At which level do I import (ie: where do I click “Import”)?

Thanks

Mike

Subject: example inside

Subject: Package rather than Script Library

Jochen

Many thanks for that

My problem is that I am not using a Java script library but a Java package (if you change perspective to Java to see the Package Explorer, I have created a new class under WebContent/WEB-INF)

If I put the jar file in my local jvm/lib/ext directory, it is referenced in the JRE System Library - I would like to import it into the app rather than have it on people’s machines

Mike

Subject: The magic…

  • Create a lib directory under WebContent/WEB-INF, if it’s not already there.- Put any JARs your code needs under the WebContent/WEB-INF/lib directory.

  • If necessary add to the build path by right-clicking the JAR(s) and adding them from the context menu. I don’t recall this last step being strictly necessary to build, but it may be necessary for the JAR (and it’s contents/classes/etc) to appear as a resource in Package Explorer/Referenced Libraries, so you may browse it.

Hope this helps…