views:

133

answers:

1

Hello,

on WIN XP SP3 and Netbeans 6.7.1 IDE,

I have installed Java SDK 6.17 which includes JavaDB. I set the JavaDB directory to ...\Java\JavaDB at the Java installation script with %DERBY_HOME% set accordingly and %PATH% including %DERBY_HOME%\bin

Later on I installed GlassFish-V3 Prelude which - surprise surprise - comes with its own JavaDB and silently installs that into a JavaDB directory under the GlassFish path.

Q's

  1. I don't want to have duplicates. Can I remove one of these installations without spoiling Netbeans.
  2. How can I verify which of the two JavaDB's Netbeans is actually using
  3. Can I eventually configure GlassFish in a way to use the JavaDB I installed as part of the SDK

Thanks for any hints (as on superuser.com I didn't get any replies :-( )

Good luck MikeD

+1  A: 

I don't want to have duplicates. Can I remove one of these installations without spoiling Netbeans.

If really you want to remove one of them, I'd suggest to remove the one that comes with your JDK and to leave the one bundled with GlassFish v3 (GlassFish expects it to be there when using some commands which can be extremely handy, e.g. during development). But honestly, I wouldn't spend too much time for the 4.5 MB extra space used.

How can I verify which of the two JavaDB's Netbeans is actually using

To verify, go to the Services tab, expand the Databases node and right-click on Java DB and select Properties.... You should get the following window:

alt text

As documented in Working with the Java DB (Derby) Database, "If you have the GlassFish Server registered in your NetBeans IDE installation, Java DB will already be registered for you."

Can I eventually configure GlassFish in a way to use the JavaDB I installed as part of the SDK

I don't know, but... why would you do that, why is it such a concern, don't you think you're wasting your time? Now, as I said, if this is really an issue, remove the version bundled with your JDK instead.

PS: GlassFish v3 is out, GlassFish v3 prelude is outdated, you should upgrade.

Pascal Thivent
very helpful answer - thanks a lot. In fact my Netbeans in its infinite wisdom chose to use the DB bundled with the Java SDK - maybe because this was installed before Glassfish. Thanks for the add'l hint on GFv3Prelude being outdated (+1) ... my goodness I have to upgrade quicker than I can write a "Hello World" in Assembler - and YES I care about 4M5 - as a matter of principle - and thanks to all you lovely people I didn't have to waste time :-)))
MikeD