You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by Rick Hillegas <Ri...@Sun.COM> on 2006/08/24 22:22:37 UTC

installation issue: problems caused by spaces in path pointed to by DERBY_HOME or DERBY_INSTALL

The following line in setEmbeddedCP.bat raises errors if there are 
spaces in the path identified by DERBY_HOME or DERBY_INSTALL:

@FOR %%X in ("%DERBY_HOME%") DO SET DERBY_HOME=%%~sX

Is this a known problem? I'm not a DOS expert and I don't know 
understand what "%%~sX" means.

Thanks for your help,
-Rick

Re: Re: installation issue: problems caused by spaces in path pointed to by DERBY_HOME or DERBY_INSTALL

Posted by Andrew McIntyre <mc...@gmail.com>.
On 8/25/06, Andrew McIntyre <mc...@gmail.com> wrote:
> On 8/25/06, Rick Hillegas <Ri...@sun.com> wrote:
> >
> > It does not work correctly on Windows XP SP2. It adds extra characters
> > that are not the DOS 8.3 format and even changes the name of the db
> > directory in the PATH to db0. The error message we get is
>
> Thanks, I just recently got access to an XP SP2 box, I'll do some
> testing there and get back to you.

I just tried this out on an XP SP2 box, and I could not reproduce it
there either. Here's the output minus the 'echo off':

C:\derby-trunk\bin>set DERBY_HOME=C:\Documents and Settings\andrewm

C:\derby-trunk\bin>setEmbeddedCP

C:\derby-trunk\bin>SET DERBY_HOME=C:\DOCUME~1\andrewm

C:\derby-trunk\bin>set CLASSPATH=C:\DOCUME~1\andrewm\lib\derby.jar;C:\DOCUME~1\a
ndrewm\lib\derbytools.jar;myderby.jar;huzzah.foo

I'm not sure how much I can help if I can't reproduce it. Could you
maybe paste the output from your box with the 'echo off' removed?

andrew

Re: Re: installation issue: problems caused by spaces in path pointed to by DERBY_HOME or DERBY_INSTALL

Posted by Andrew McIntyre <mc...@gmail.com>.
On 8/25/06, Rick Hillegas <Ri...@sun.com> wrote:
> Hey  Andrew,
>
> Here's a bit more information on this problem. Regards-Rick
>
> It does not work correctly on Windows XP SP2. It adds extra characters
> that are not the DOS 8.3 format and even changes the name of the db
> directory in the PATH to db0. The error message we get is

Thanks, I just recently got access to an XP SP2 box, I'll do some
testing there and get back to you.

andrew

Re: installation issue: problems caused by spaces in path pointed to by DERBY_HOME or DERBY_INSTALL

Posted by Rick Hillegas <Ri...@Sun.COM>.
Hey  Andrew,

Here's a bit more information on this problem. Regards-Rick

It does not work correctly on Windows XP SP2. It adds extra characters
that are not the DOS 8.3 format and even changes the name of the db
directory in the PATH to db0. The error message we get is

    Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/derby/tools/ij

The problem is the CLASSPATH set by setEmbeddedCP.bat. Once you set
DERBY_INSTALL, then run this batch file, the resulting CLASSPATH is:


CLASSPATH=C:\PROGRA~1\Java\JDK16~1.0\db0\db\lib\derby.jar;C:\PROGRA~1\Java\JDK16~1.0\db0\db\lib\derbytools.jar;.;

which you can clearly see has some strange problems in it. Somehow it
ads the directory db0 and really messes up the name of the jdk1.6.0
directory. However, if you remove that FOR statement, everything works
just fine.




Andrew McIntyre wrote:

> On 8/24/06, Rick Hillegas <Ri...@sun.com> wrote:
>
>> The following line in setEmbeddedCP.bat raises errors if there are
>> spaces in the path identified by DERBY_HOME or DERBY_INSTALL:
>>
>> @FOR %%X in ("%DERBY_HOME%") DO SET DERBY_HOME=%%~sX
>>
>> Is this a known problem? I'm not a DOS expert and I don't know
>> understand what "%%~sX" means.
>
>
> That should convert the value of DERBY_HOME to it's DOS 8.3 short form
> to avoid further problems with the path containing spaces. This is
> working for me on Windows 2000. What version of Windows are you using,
> and what is the error you are getting?
>
> andrew



Re: installation issue: problems caused by spaces in path pointed to by DERBY_HOME or DERBY_INSTALL

Posted by "Lance J. Andersen" <La...@Sun.COM>.
perhaps  it is an XP or Win95 issue?

Andrew McIntyre wrote:
> On 8/24/06, Rick Hillegas <Ri...@sun.com> wrote:
>> The following line in setEmbeddedCP.bat raises errors if there are
>> spaces in the path identified by DERBY_HOME or DERBY_INSTALL:
>>
>> @FOR %%X in ("%DERBY_HOME%") DO SET DERBY_HOME=%%~sX
>>
>> Is this a known problem? I'm not a DOS expert and I don't know
>> understand what "%%~sX" means.
>
> That should convert the value of DERBY_HOME to it's DOS 8.3 short form
> to avoid further problems with the path containing spaces. This is
> working for me on Windows 2000. What version of Windows are you using,
> and what is the error you are getting?
>
> andrew

Re: installation issue: problems caused by spaces in path pointed to by DERBY_HOME or DERBY_INSTALL

Posted by Andrew McIntyre <mc...@gmail.com>.
On 8/24/06, Rick Hillegas <Ri...@sun.com> wrote:
> The following line in setEmbeddedCP.bat raises errors if there are
> spaces in the path identified by DERBY_HOME or DERBY_INSTALL:
>
> @FOR %%X in ("%DERBY_HOME%") DO SET DERBY_HOME=%%~sX
>
> Is this a known problem? I'm not a DOS expert and I don't know
> understand what "%%~sX" means.

That should convert the value of DERBY_HOME to it's DOS 8.3 short form
to avoid further problems with the path containing spaces. This is
working for me on Windows 2000. What version of Windows are you using,
and what is the error you are getting?

andrew