You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@uima.apache.org by Erik-Lân Do Dinh <fa...@hotmail.com> on 2010/11/16 16:44:47 UTC

Problems installing UIMA on W7

Hello everyone,

I want to install UIMA on a Windows 7 (x64) machine, Java version is 1.6 (x86).
I installed UIMA according to http://uima.apache.org/doc-uima-examples.html,
double checked all path entries and install path. Now, when I try to run
"adjustExamplePaths.bat", it outputs an error message and stops.

The message:
------
C:\Program Files (x86)\apache-uima\bin>setlocal
"\Java\jdk1.6.0_22\bin\java)" kann syntaktisch an dieser Stelle nicht verarbeite
t werden.

C:\Program Files (x86)\apache-uima\bin>if "C:\Program Files (x86)\Java\jdk1.6.0_
22"=="" (set UIMA_JAVA_CALL=java) else (set UIMA_JAVA_CALL=C:\Program Files (x86
)\Java\jdk1.6.0_22\bin\java)
------

The first part says: "\Java\jdk1.6.0_22\bin\java)" cannot be processed
syntactically at this place.

The second part is just an output of the line 

if "%JAVA_HOME%"=="" (set UIMA_JAVA_CALL=java) else (set
UIMA_JAVA_CALL=%JAVA_HOME%\bin\java)

from adjustExamplePaths.bat with %JAVA_HOME% replaced by its value.
Now, if I just replace that last line with

set UIMA_JAVA_CALL=%JAVA_HOME%\bin\java

the script runs ok. But when I want to try out documentAnalyzer.bat, the same
error ("cannot be processed ...") occurs, now in runUimaClass.bat (which is
called by documentAnalyzer.bat). I can fix that too, but then another error
crops up, etc.

I also tried putting the apache-uima-directoy directly into C: (changed the env
vars of course), but the same errors keep happening.

Has anybody experienced the same problem and maybe has found a solution? Or can
anyone see where I made a mistake which causes all the hassle?

Help would be much appreciated, thanks for reading this
Erik-Lân Do Dinh


Re: Problems installing UIMA on W7

Posted by Marshall Schor <ms...@schor.com>.
A bit more experimenting on Windows XP confirms that in the script line

    if "%JAVA_HOME%"=="" (set UIMA_JAVA_CALL=java) else (set
UIMA_JAVA_CALL=%JAVA_HOME%\bin\java)

if the value substituted for %JAVA_HOME% in turn contains a ")", that ")" is
taken as the closing paren matching the one in front of the "set".

A general fix for this is to rewrite:
    (set UIMA_JAVA_CALL=%JAVA_HOME%\bin\java)  as
    (set "UIMA_JAVA_CALL=%JAVA_HOME%\bin\java")
which disables recognizing any special chars other than variable substitution, I
think.

I confirmed this issue and tested this fix on Windows XP; it would be great if
someone could test this fix on a Windows 7 machine.

I guess I should put in a requisition for a Windows 7 machine for testing :-).

I'll open a Jira.

-Marshall


On 11/16/2010 11:07 AM, Thilo Götz wrote:
> On 11/16/2010 16:44, Erik-Lân Do Dinh wrote:
>> Hello everyone,
>>
>> I want to install UIMA on a Windows 7 (x64) machine, Java version is 1.6 (x86).
>> I installed UIMA according to http://uima.apache.org/doc-uima-examples.html,
>> double checked all path entries and install path. Now, when I try to run
>> "adjustExamplePaths.bat", it outputs an error message and stops.
>>
>> The message:
>> ------
>> C:\Program Files (x86)\apache-uima\bin>setlocal
>> "\Java\jdk1.6.0_22\bin\java)" kann syntaktisch an dieser Stelle nicht verarbeite
>> t werden.
>>
>> C:\Program Files (x86)\apache-uima\bin>if "C:\Program Files (x86)\Java\jdk1.6.0_
>> 22"=="" (set UIMA_JAVA_CALL=java) else (set UIMA_JAVA_CALL=C:\Program Files (x86
>> )\Java\jdk1.6.0_22\bin\java)
>> ------
>>
>> The first part says: "\Java\jdk1.6.0_22\bin\java)" cannot be processed
>> syntactically at this place.
>>
>> The second part is just an output of the line 
>>
>> if "%JAVA_HOME%"=="" (set UIMA_JAVA_CALL=java) else (set
>> UIMA_JAVA_CALL=%JAVA_HOME%\bin\java)
>>
>> from adjustExamplePaths.bat with %JAVA_HOME% replaced by its value.
>> Now, if I just replace that last line with
>>
>> set UIMA_JAVA_CALL=%JAVA_HOME%\bin\java
>>
>> the script runs ok. But when I want to try out documentAnalyzer.bat, the same
>> error ("cannot be processed ...") occurs, now in runUimaClass.bat (which is
>> called by documentAnalyzer.bat). I can fix that too, but then another error
>> crops up, etc.
>>
>> I also tried putting the apache-uima-directoy directly into C: (changed the env
>> vars of course), but the same errors keep happening.
> I think the problem is not the UIMA install path, but the Java install
> path.  It chokes on the closing paren of the (x86) part (great idea, MS).
>
> I don't have the time to try this now, but try replacing
> if "%JAVA_HOME%"=="" (set UIMA_JAVA_CALL=java) else (set
> UIMA_JAVA_CALL=%JAVA_HOME%\bin\java)
>
> with
>
> if "%JAVA_HOME%"=="" (set UIMA_JAVA_CALL=java) else set
> "UIMA_JAVA_CALL=%JAVA_HOME%\bin\java"
>
> Let us know if this works, and we'll fix it.
>
> --Thilo
>
>> Has anybody experienced the same problem and maybe has found a solution? Or can
>> anyone see where I made a mistake which causes all the hassle?
>>
>> Help would be much appreciated, thanks for reading this
>> Erik-Lân Do Dinh
>>
>

Re: Problems installing UIMA on W7

Posted by Thilo Götz <tw...@gmx.de>.
On 11/16/2010 18:47, Erik-Lân Do Dinh wrote:
> Thilo Götz <tw...@...> writes:
> 
>> I think the problem is not the UIMA install path, but the Java install
>> path.  It chokes on the closing paren of the (x86) part (great idea, MS).
>>
>> I don't have the time to try this now, but try replacing
>> if "%JAVA_HOME%"=="" (set UIMA_JAVA_CALL=java) else (set
>> UIMA_JAVA_CALL=%JAVA_HOME%\bin\java)
>>
>> with
>>
>> if "%JAVA_HOME%"=="" (set UIMA_JAVA_CALL=java) else set
>> "UIMA_JAVA_CALL=%JAVA_HOME%\bin\java"
> 
> Spot on. I changed it in adjustExamplePaths.bat as well as in runUimaClass.bat.
> With apache-uima directly on C:, this works now, and the Document Analyzer GUI
> pops up. Like you mentioned, the (x86) seems to be the culprit - when I have
> apache-uima in the program files (x86) dir installed, I would have to change
> much more in the script files. Alas, it now works from C:, thats all I need.
> 
> Thank you very much for your quick help.
> Erik-Lân
> 

Ok, thanks for trying it out.  I opened an issue:
https://issues.apache.org/jira/browse/UIMA-1942

--Thilo

Re: Problems installing UIMA on W7

Posted by Erik-Lân Do Dinh <fa...@hotmail.com>.
Thilo Götz <tw...@...> writes:

> I think the problem is not the UIMA install path, but the Java install
> path.  It chokes on the closing paren of the (x86) part (great idea, MS).
> 
> I don't have the time to try this now, but try replacing
> if "%JAVA_HOME%"=="" (set UIMA_JAVA_CALL=java) else (set
> UIMA_JAVA_CALL=%JAVA_HOME%\bin\java)
> 
> with
> 
> if "%JAVA_HOME%"=="" (set UIMA_JAVA_CALL=java) else set
> "UIMA_JAVA_CALL=%JAVA_HOME%\bin\java"

Spot on. I changed it in adjustExamplePaths.bat as well as in runUimaClass.bat.
With apache-uima directly on C:, this works now, and the Document Analyzer GUI
pops up. Like you mentioned, the (x86) seems to be the culprit - when I have
apache-uima in the program files (x86) dir installed, I would have to change
much more in the script files. Alas, it now works from C:, thats all I need.

Thank you very much for your quick help.
Erik-Lân


Re: Problems installing UIMA on W7

Posted by Thilo Götz <tw...@gmx.de>.
On 11/16/2010 16:44, Erik-Lân Do Dinh wrote:
> Hello everyone,
> 
> I want to install UIMA on a Windows 7 (x64) machine, Java version is 1.6 (x86).
> I installed UIMA according to http://uima.apache.org/doc-uima-examples.html,
> double checked all path entries and install path. Now, when I try to run
> "adjustExamplePaths.bat", it outputs an error message and stops.
> 
> The message:
> ------
> C:\Program Files (x86)\apache-uima\bin>setlocal
> "\Java\jdk1.6.0_22\bin\java)" kann syntaktisch an dieser Stelle nicht verarbeite
> t werden.
> 
> C:\Program Files (x86)\apache-uima\bin>if "C:\Program Files (x86)\Java\jdk1.6.0_
> 22"=="" (set UIMA_JAVA_CALL=java) else (set UIMA_JAVA_CALL=C:\Program Files (x86
> )\Java\jdk1.6.0_22\bin\java)
> ------
> 
> The first part says: "\Java\jdk1.6.0_22\bin\java)" cannot be processed
> syntactically at this place.
> 
> The second part is just an output of the line 
> 
> if "%JAVA_HOME%"=="" (set UIMA_JAVA_CALL=java) else (set
> UIMA_JAVA_CALL=%JAVA_HOME%\bin\java)
> 
> from adjustExamplePaths.bat with %JAVA_HOME% replaced by its value.
> Now, if I just replace that last line with
> 
> set UIMA_JAVA_CALL=%JAVA_HOME%\bin\java
> 
> the script runs ok. But when I want to try out documentAnalyzer.bat, the same
> error ("cannot be processed ...") occurs, now in runUimaClass.bat (which is
> called by documentAnalyzer.bat). I can fix that too, but then another error
> crops up, etc.
> 
> I also tried putting the apache-uima-directoy directly into C: (changed the env
> vars of course), but the same errors keep happening.

I think the problem is not the UIMA install path, but the Java install
path.  It chokes on the closing paren of the (x86) part (great idea, MS).

I don't have the time to try this now, but try replacing
if "%JAVA_HOME%"=="" (set UIMA_JAVA_CALL=java) else (set
UIMA_JAVA_CALL=%JAVA_HOME%\bin\java)

with

if "%JAVA_HOME%"=="" (set UIMA_JAVA_CALL=java) else set
"UIMA_JAVA_CALL=%JAVA_HOME%\bin\java"

Let us know if this works, and we'll fix it.

--Thilo

> 
> Has anybody experienced the same problem and maybe has found a solution? Or can
> anyone see where I made a mistake which causes all the hassle?
> 
> Help would be much appreciated, thanks for reading this
> Erik-Lân Do Dinh
>