db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Knut Anders Hatlen <Knut.Hat...@Sun.COM>
Subject Re: Enabling XML Operations: Setting XALAN in CLASSPATH
Date Sat, 17 Apr 2010 10:45:03 GMT
On 04/17/10 08:22 AM, Nirmal Fernando wrote:
> Hi,
> On Fri, Apr 16, 2010 at 10:37 PM, Rick Hillegas
> <rick.hillegas@oracle.com <mailto:rick.hillegas@oracle.com>> wrote:
>     Hi Nirmal,
>     In my classpath, the tools/java jars are included before the Derby
>     jars. But I don't think that's significant. If I were debugging
>     this from your end, the next experiments I would try would be:
>     o Try running one of the xalan classes as a java program. If you
>     get a ClassNotFoundException, then something is wrong with the
>     classpath. If you get an exception complaining that the class
>     doesn't have a main() entry point, then the classpath is good.
> I checked for this earlier, it was fine --> Xalan works fine. 
>     o If the first experiment shows that the classpath is good, then
>     start looking into why ij is picking up a different classpath than
>     the one you are echoing.
> Yes, I think this is the case. I verified this by deleting the
> classpath variable (ij was still runnable). 
> Then I tried issuing following command:
> java -cp
> C:\OtherNirmal\GSoC\Code\tools\java\xalan.jar;C:\OtherNirmal\GSoC\Code\tools\java\xercesImpl.jar;C:\OtherNirmal\GSoC
> \Code\tools\java\serializer.jar;C:\OtherNirmal\GSoC\Code\tools\java\xml-apis.jar
>  -jar derbyrun.jar ij

Hi Nirmal,

When you give a -jar argument to java, the -cp argument and the
CLASSPATH environment variable are ignored. See here:

It says: "When you use [the -jar] option, the JAR file is the source of
all user classes, and other user class path settings are ignored."

So I think you need to set up your classpath to point to xalan.jar and
derbyrun.jar, and then start ij like this:

java org.apache.derby.tools.ij

Knut Anders

View raw message