Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community Forumsproblem in user defined order of jar files during exporting
https://www.eclipse.org/forums/index.php/mv/msg/198954/634565/#msg_634565
I am having problem in handling the order of jar files while exporting the eclipse project to runnable jar file.
I have FOP and SAXON external jar files. I wanted saxon.jar to be before FOP.jar. i have set this order in my classpath definition of eclipse. when i export the project to runnable jar file then the order of the jar files are changing and i am having problem in run time.
any suggestions please. Looking forward for your valuable reply.
Regards
Ven]]>ven chowdary2010-10-22T09:16:53-00:00Re: problem in user defined order of jar files during exporting
https://www.eclipse.org/forums/index.php/mv/msg/198954/634607/#msg_634607
the Class-Path: header in the wrong order?
If that's the case 1) open a bug against Eclipse JDT/UI - https://bugs.eclipse.org/bugs and 2) a workaround is for you to supply
the MANIFEST.MF yourself.
In the case when i generate jar file only then it asks me where to generate the manifest file and i selected the placeholder with the name of the manifest but the manifest does not have any classpath information.
Could you please help in guiding me how to generate normal jar file with the classpath order jar files in eclipse and the steps i need to take care.
because when i try to generate the output, what i got is not related to what i want. The order of the jar files in alphabetical order.
Thank you in advance.
Ven]]>ven chowdary2010-10-25T14:17:28-00:00Re: problem in user defined order of jar files during exporting
https://www.eclipse.org/forums/index.php/mv/msg/198954/635097/#msg_635097
Manifest-Version: 1.0
Class-Path: .
../TACommon/libs/avalon-framework-4.2.0.jar
../TACommon/libs/batik-all-1.7.jar
../TACommon/libs/saxon9he.jar
../TACommon/libs/fop.jar
../TACommon/libs/jdom-1.1.jar
../TACommon/libs/junit-4.8.2.jar
../TACommon/libs/serializer.jar
../TACommon/libs/xsltc.jar
../TACommon/libs/xmlgraphics-commons-1.4.jar
../TACommon/libs/xstream-1.3.1.jar
../TACommon/libs/xstream-benchmark-1.3.1.jar
../TACommon/libs/commons-io-1.4.jar
Main-Class: com.ssc.ta.dgc.SampleTest
i could not find the library jar files while running after jar file creation, these library files are mentioned in the manifest. But these library jar files are in TACommon folder outside the project .]]>ven chowdary2010-10-25T15:48:51-00:00Re: problem in user defined order of jar files during exporting
https://www.eclipse.org/forums/index.php/mv/msg/198954/635121/#msg_635121
> i could not find the library jar files while running after jar file
> creation, these library files are mentioned in the manifest. But these
> library jar files are in TACommon folder outside the project .
Supply your own manifest, then it will do what you want.
example in my case . I have project A and project B in eclipse. My building jar file of project B which uses project A and libraries which are in the libs folder of project A. Building of jar file on project B is successful , but when i run project B then it completes that the classes used from libraries in projects A are not found. When i open the project B jar file then i see the libraries are in the jar file.
Could you please help me . I tried all the possible ways which i can think off.
Regards
Ven]]>ven chowdary2010-10-25T18:35:46-00:00Re: problem in user defined order of jar files during exporting
https://www.eclipse.org/forums/index.php/mv/msg/198954/635259/#msg_635259
My building jar file of project B which uses project A and libraries which are in the libs folder of project A. Building of jar file on project B is successful , but when i run project B then it completes that the classes used from libraries in projects A are not found. When i open the project B jar file then i see the libraries are in the jar file.
Could you please help me . I tried all the possible ways which i can think off.
When exporting project B to jar file, i have fed the manually written manifest file as mentioned in the below posting. after exporting project B to jar file , i opened the jar file to check the contents of the jar file. In the project B jar file i can see all the jar files that i have been using from the project A folder structure. But when i run project B it complaints that it could not find the classes from the jar files that are in the project A.
Here is sample exception
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/fop/apps/FopFactory
This exception arised because it could not find the FOP.jar which is mentioned in classpath of project B and the jar file is inside project A folder structure.
]]>ven chowdary2010-10-26T08:19:52-00:00Re: problem in user defined order of jar files during exporting
https://www.eclipse.org/forums/index.php/mv/msg/198954/635341/#msg_635341
PW