(Answer) (Category) FAQ-O-Matic : (Category) JDataStore :
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.)

2001-Aug-02 8:44am gyles19@visi.com

[Append to This Answer]
2001-Aug-02 8:44am
Previous: (Answer) After installing JBuilder 5 and installing the license for JDataStore I have the following problem. If I start the JDataStore the within JBuilder 5 it starts perfectly for the Tools|JDataStore Server. However if I try and run it from Windows directly: Start|Programs|JBuilder 5|JDataStore Server it doesn't start.
Next: (Answer) I want to deploy JDatastore on a server. What are my licensing options?
This document is: http://www.visi.com/~gyles19/cgi-bin/fom.cgi?file=252
[Search] [Appearance]
This is a Faq-O-Matic 2.709.
This FAQ administered by gyles19@visi.com.

Other JBuilder Links

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
Netring Home - About - Privacy
The
JBuilder Netring Logo
The Borland JBuilder Netring by JBuilder FAQ-O-Matic
[ Join Now | List Sites | Random | << Prev | Next >> ]
[ Previous 5 Sites | Skip Previous | Skip Next | Next 5 Sites ]