|
|
I used the JB5 Archive Wizard to create a jar, selecting "Include Everything" for the JDatastore library. I can run the application with "java -jar dbTest.jar" just fine. However, I want to exclude the JDatastore classes and package those jars separately. I can't get the application to work! |
| Question continued:
I've tried setting the Classpath with $ java -classpath /x/x/jds.jar ... -jar dbTest.jar I've tried adding the JDatastore jars to my CLASSPATH environment variable... Nothing seems to work! Answer: Java's -jar parameter overrides the -classpath parameter: you can't use both parameters at the same time. You must adjust the jar's manifest to include the necessary classpath so that the -jar parameter finds it properly.
Manifest-Version: 1.0 Main-Class: package.MainClass Class-Path: dx.jar jds.jar jdatastore.license Another way to launch the application is to not use the -jar parameter at all.
java \
-classpath dbTest.jar;\
/jbuilder5/lib/jdatastore.license;\
/jbuilder5/lib/dx.jar;\
/jbuilder5/lib/jds.jar\
package.MainClass
Replace "package.MainClass" with the package.class taken from your Manifest.
(I've broken the command up into pieces using unix shell syntax for readability. This would normally all be on one line.) | |
| [Append to This Answer] | |
| 2001-Aug-02 8:44am |
| ||||||||
|
Java Community
Java Tools |
Code Central JB OpenTools |
Community Recent Threads |
Borland Chat Chat FAQ |
||||||||||||||
|
Feature Matrices 3.0 | 3.5 | 4.0 5.0 | 6.0 | 7.0 |
Shop for JBuilder |
JBuilder Downloads and reg keys |
Report Piracy | ||||||||||||||
|
Online Manuals 4.0 | 5.0 | 6.0 7.0 |
Borland DevSupport's Bug/RFE Form Quality Central Client |
JB Patches & Updates |
JBuilder FAQs TIs | ||||||||||||||
|
JBuilder Newsgroups |
Tamaracka's News Archive |
Mr. Haki's JBuilder Machine |
JGuru's JBuilder FAQ |
||||||||||||||
|
Sun's Bug Parade |
|||||||||||||||||
|
|||||||||||||||||