I’m working on a plugin for the BlueJ IDE. These plugins are packaged as simple JAR files that sit in the BlueJ project. The plugin involves submitting (sometimes fetching) data to a MySQL server. I have it operating using the JDBC connector (as a JAR) from my path. I need the plugin to be an easy install for students where they simply drop it into a folder. Is there a way to keep the JDBC piece with my extension and not have to place it separately on the student’s machine?
I have read a little about ClassLoaders from here http://www.objectsource.com/j2eechapters/Ch21-ClassLoaders_and_J2EE.htm. But I haven’t gleaned a nice way to do what I’m asking. I am using Eclipse, by the way.
This question gets very close to what I want at the very end when the manifest is mentioned:
Deployment Concepts: Packaging JAR Dependencies, When & Why
My only problem now is that I need to know how to edit the manifest file in such a way to point my extension at its own directory to find the JDBC connector.
Hopefully that makes sense. Thanks for any help!
I managed to get my problem solved by editing the manifest file of my extension. When building, I followed directions from here
http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Ftasks%2Ftasks-35.htm
After an initial packaging, I edited the generated file to include a line for my JDBC JAR. The steps for this were taken from this site:
http://download.oracle.com/javase/tutorial/deployment/jar/downman.html