fuse JChem Base jar files in a single jar

User dfeb81947d

23-10-2012 15:37:48

Dear Support,


Because I don't know which functionnallities to use with which jar file, I always use the whole "lib" directory for the classpath in my eclipse environment.


My problem is when I want to execute a single class with main, whether I need to create a single jar with all JChem jar files inside, whether I create a batch file to access the main class.


So whether  I have a huge jar of 120Mo for a small single class, whether I have sometimes error because classpath variable is too long for DOS system.


What do you think if I extract all jar into a file system and I use "jar cvfm" to create a new jar archive with all the jar I need to add in my classpath?


Or, is there a simple way to know which jar I need to add to my classpath for the class I would like to execute using a Batch execution file?


I apologize if this question is in the wrong topic, or if it has already been asked, but after a search on this forum I haven't found the answer.


Thank you very much for your reply.


Kind Regards,


Jacques

ChemAxon aa7c50abf8

23-10-2012 15:49:51

Hi Jacques,


I have sometimes error because classpath variable is too long for DOS system.

Putting jchem.jar on your classpath should take care of having all the jars required by JChem on the classpath as well. jchem.jar declares its dependencies in the JAR META-INF/MANIFEST.FM file.


Peter

ChemAxon 9c0afc9aaf

23-10-2012 15:52:18

Jacques,


You do not have to enumerate all .jar files in the classpath of your application.


All you have to include is the "jchem.jar", it will refer to all other necessary .jar files via its manifest.


Of course their relative position must be kept, so we recommend to to deploy the entire lib directory as it was extracted from the package, no changes.


We do not recommend trying to fuse the jars.


Best regards,


Szilard

User dfeb81947d

23-10-2012 16:07:16

Dear Szilard, Dear Peter,


If I understand clearly, I just need to execute my class using jchem.alone in classpath?


If I would like to use ojdbc6.jar I add this jar in classpath and ommit the "jdbc" directory inside "lib" directory?


That's it?


 


Thank you very much for your answer. It's clearly easier that way, especially when chaging jchem's version


 


Kind Regards,


Jacques

ChemAxon 9c0afc9aaf

23-10-2012 18:27:33

Yes, you only have to refer to jchem.jar.


If I would like to use ojdbc6.jar I add this jar in classpath and ommit the "jdbc" directory inside "lib" directory?

Yes, you can do this - though we endorse to use the supplied JDBC driver, since we also use those during testing.


Could you let us know why do you need the other jar ?


Maybe we could also consider using it in the futre.


Best regards,


Szilard

User dfeb81947d

24-10-2012 13:31:25

Dear Szilard,

Thank you very much for your answer. It helps a lot.

Actually I'm using ojdbc6.jar because under Oracle 11g, and using JDK1.6. According to Oracle that the driver it should be used in that case for optimal performance.

We have to access/update/select millions of data containing LOB, so I wanted to put the best on our side, with enhanced speed and better stability. Actually I felt that it improved a bit. I haven't made any benchmark about it, but I plan to do it, so I'll give you my conclusions with the result of the benchmark once it has been done.

Kind Regards,
Jacques

ChemAxon aa7c50abf8

25-10-2012 10:20:39

Dear Jacques,


Our plans to upgrade the Oracle JDBC driver bundled with JChem has been delayed by an issue with the most recent Oracle JDBC drivers when used with one of the JChem applications (JChem Cartridge). (We have a pending Service Request with Oracle regarding this issue.) We are actively looking for options to move forward on this issue across the matrix of supported JDBC API versions and Oracle database versions.


We'll keep you updated on the developements.


Peter

ChemAxon aa7c50abf8

26-04-2013 20:57:15

Dear Jacques,


With JChem version 5.12, we started bundle the 11.1.0.7 version Oracle JDBC driver that complies with the Java 6 JDBC API (ojdbc6.jar).


Best regards,


Peter