sunandap / yooreeka

Automatically exported from code.google.com/p/yooreeka
0 stars 0 forks source link

difficulty with path on Vista #8

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. simply starting the beanshell 

What is the expected output? What do you see instead?

C:\iWeb2\deploy\bin>bsc.bat
C:\iWeb2\deploy\bin>echo off

---
Path="C:\Program Files\Java\jdk1.6.0_20"\bin;C:\Program 
Files\Java\jdk1.6.0_20\bin;C:\apache-ant-1.8.1\bin;C:\Windows\system32;C:\Window
s;C:\Windows\S
ystem32\Wbem;C:\Program Files\CyberLink\Power2Go\;C:\Program 
Files\MATLAB\R2009a\bin;C:\Program Files\MATLAB\R2009a\bin\win32;C:\Program 
Files\MATLAB\
R2008a\bin;C:\Program Files\MATLAB\R2008a\bin\win32;C:\Program 
Files\Perforce\;c:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program 
Files\C
ommon Files\Intuit\QBPOSSDKRuntime;C:\Program 
Files\GnuWin32\bin;C:\gwv5;C:\Program Files\Common Files\Roxio 
Shared\9.0\DLLShared\;C:\Program Files\Qu
ickTime\QTSystem\;C:\Windows\system32\gs\gs7.05\bin;C:\Program 
Files\Graphviz2.26\bin;C:\Program Files\Medsphere\Gtk# Runtime\bin;C:\Program 
Files\GNU
\GnuPG\pub;C:\Program Files\Nmap
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC

---
CLASSPATH=C:\iWeb2\deploy\lib\bsh-2.0b4.jar;;C:\iWeb2\deploy\lib\commons-codec-1
.3.jar;C:\iWeb2\deploy\lib\commons-httpclient-3.1.jar;C:\iWeb2\deploy\
lib\commons-lang-2.3.jar;C:\iWeb2\deploy\lib\commons-logging-1.1.1.jar;C:\iWeb2\
deploy\lib\f2jutil.jar;C:\iWeb2\deploy\lib\jfreechart.jar;C:\iWeb2\dep
loy\lib\jgraph.jar;C:\iWeb2\deploy\lib\jigg-0.1.jar;C:\iWeb2\deploy\lib\rooster.
jar;C:\iWeb2\deploy\lib\junit-4.1.jar;C:\iWeb2\deploy\lib\lucene-analy
zers-2.3.0.jar;C:\iWeb2\deploy\lib\lucene-core-2.3.0.jar;C:\iWeb2\deploy\lib\luc
ene-demos-2.3.0.jar;C:\iWeb2\deploy\lib\lucene-memory-2.3.0.jar;C:\iWe
b2\deploy\lib\nekohtml.jar;C:\iWeb2\deploy\lib\poi-3.0.2-FINAL-20080204.jar;C:\i
Web2\deploy\lib\resolver.jar;C:\iWeb2\deploy\lib\secondstring-20070327
.jar;C:\iWeb2\deploy\lib\serializer.jar;C:\iWeb2\deploy\lib\SuperCSV-1.16.jar;C:
\iWeb2\deploy\lib\tm-extractors-1.0.jar;C:\iWeb2\deploy\lib\xercesImpl
.jar;C:\iWeb2\deploy\lib\xml-apis.jar;C:\iWeb2\deploy\lib\drools-core-4.0.4.jar;
C:\iWeb2\deploy\lib\drools-compiler-4.0.4.jar;C:\iWeb2\deploy\lib\antl
r-runtime-3.0.jar;C:\iWeb2\deploy\lib\janino-2.5.10.jar;C:\iWeb2\deploy\lib\mvel
14-1.2.21.jar;C:\iWeb2\deploy\lib\iweb2.jar;C:\iWeb2\deploy\conf

---
JAVA_HOME=C:\Program Files\Java\jdk1.6.0_20

---
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.

What version of the product are you using? On what operating system?
Yooreeka_20100413 Vista Home Premium

Please provide any additional information below.

Original issue reported on code.google.com by tomtz...@gmail.com on 6 Aug 2010 at 10:02

GoogleCodeExporter commented 9 years ago
The last line in the bsc.bat reads:

%JAVA_HOME%\bin\java -Duser.home=%IWEB2_HOME%\deploy\bin -Xms256M -Xmx1280M -cp 
%CLASSPATH% bsh.Interpreter

given that the PATH is already set up to include %JAVA_HOME%\bin and since that 
line barfs when the jdk sits under C:\Program Files\Java, a quick fix is to 
simply edit it and replace it with the following:

java -Duser.home=%IWEB2_HOME%\deploy\bin -Xms256M -Xmx1280M -cp %CLASSPATH% 
bsh.Interpreter

That works for me and the beanshell starts successfully with the mappings to 
all the jars that the build process generated: Something like this:
...
---
CLASSPATH=C:\iWeb2\deploy\lib\bsh-2.0b4.jar;;C:\iWeb2\deploy\lib\commons-codec-1
.3.jar;C:\iWeb2\deploy\lib\commons-httpclient-3.1.jar;C:\iWeb2\deploy\lib\common
s-lang-2.3.jar;C:\iWeb2\deploy\lib\commons-logging-1.1.1.jar;C:\iWeb2\deploy\lib
\f2jutil.jar;C:\iWeb2\deploy\lib\jfreechart.jar;C:\iWeb2\deploy\lib\jgraph.jar;C
:\iWeb2\deploy\lib\jigg-0.1.jar;C:\iWeb2\deploy\lib\rooster.jar;C:\iWeb2\deploy\
lib\junit-4.1.jar;C:\iWeb2\deploy\lib\lucene-analyzers-2.3.0.jar;C:\iWeb2\deploy
\lib\lucene-core-2.3.0.jar;C:\iWeb2\deploy\lib\lucene-demos-2.3.0.jar;C:\iWeb2\d
eploy\lib\lucene-memory-2.3.0.jar;C:\iWeb2\deploy\lib\nekohtml.jar;C:\iWeb2\depl
oy\lib\poi-3.0.2-FINAL-20080204.jar;C:\iWeb2\deploy\lib\resolver.jar;C:\iWeb2\de
ploy\lib\secondstring-20070327.jar;C:\iWeb2\deploy\lib\serializer.jar;C:\iWeb2\d
eploy\lib\SuperCSV-1.16.jar;C:\iWeb2\deploy\lib\tm-extractors-1.0.jar;C:\iWeb2\d
eploy\lib\xercesImpl.jar;C:\iWeb2\deploy\lib\xml-apis.jar;C:\iWeb2\deploy\lib\dr
ools-core-4.0.4.jar;C:\iWeb2\deploy\lib\drools-compiler-4.0.4.jar;C:\iWeb2\deplo
y\lib\antlr-runtime-3.0.jar;C:\iWeb2\deploy\lib\janino-2.5.10.jar;C:\iWeb2\deplo
y\lib\mvel14-1.2.21.jar;C:\iWeb2\deploy\lib\iweb2.jar;C:\iWeb2\deploy\conf
---
JAVA_HOME=C:\Program Files\Java\jdk1.6.0_20
---
Start ClassPath Mapping
Mapping: Archive: file:/C:/iWeb2/deploy/lib/bsh-2.0b4.jar
Mapping: Archive: file:/C:/iWeb2/deploy/lib/commons-codec-1.3.jar
Mapping: Archive: file:/C:/iWeb2/deploy/lib/commons-httpclient-3.1.jar
Mapping: Archive: file:/C:/iWeb2/deploy/lib/commons-lang-2.3.jar
Mapping: Archive: file:/C:/iWeb2/deploy/lib/commons-logging-1.1.1.jar
Mapping: Archive: file:/C:/iWeb2/deploy/lib/f2jutil.jar
Mapping: Archive: file:/C:/iWeb2/deploy/lib/jfreechart.jar
Mapping: Archive: file:/C:/iWeb2/deploy/lib/jgraph.jar
Mapping: Archive: file:/C:/iWeb2/deploy/lib/jigg-0.1.jar
Mapping: Archive: file:/C:/iWeb2/deploy/lib/rooster.jar
Mapping: Archive: file:/C:/iWeb2/deploy/lib/junit-4.1.jar
Mapping: Archive: file:/C:/iWeb2/deploy/lib/lucene-analyzers-2.3.0.jar
Mapping: Archive: file:/C:/iWeb2/deploy/lib/lucene-core-2.3.0.jar
Mapping: Archive: file:/C:/iWeb2/deploy/lib/lucene-demos-2.3.0.jar
Mapping: Archive: file:/C:/iWeb2/deploy/lib/lucene-memory-2.3.0.jar
Mapping: Archive: file:/C:/iWeb2/deploy/lib/nekohtml.jar
Mapping: Archive: file:/C:/iWeb2/deploy/lib/poi-3.0.2-FINAL-20080204.jar
Mapping: Archive: file:/C:/iWeb2/deploy/lib/resolver.jar
Mapping: Archive: file:/C:/iWeb2/deploy/lib/secondstring-20070327.jar
Mapping: Archive: file:/C:/iWeb2/deploy/lib/serializer.jar
Mapping: Archive: file:/C:/iWeb2/deploy/lib/SuperCSV-1.16.jar
Mapping: Archive: file:/C:/iWeb2/deploy/lib/tm-extractors-1.0.jar
Mapping: Archive: file:/C:/iWeb2/deploy/lib/xercesImpl.jar
Mapping: Archive: file:/C:/iWeb2/deploy/lib/xml-apis.jar
Mapping: Archive: file:/C:/iWeb2/deploy/lib/drools-core-4.0.4.jar
Mapping: Archive: file:/C:/iWeb2/deploy/lib/drools-compiler-4.0.4.jar
Mapping: Archive: file:/C:/iWeb2/deploy/lib/antlr-runtime-3.0.jar
Mapping: Archive: file:/C:/iWeb2/deploy/lib/janino-2.5.10.jar
Mapping: Archive: file:/C:/iWeb2/deploy/lib/mvel14-1.2.21.jar
Mapping: Archive: file:/C:/iWeb2/deploy/lib/iweb2.jar
Mapping: Directory C:\iWeb2\deploy\conf
Mapping: Archive: file:/C:/Program%20Files/Java/jdk1.6.0_20/jre/lib/rt.jar
End ClassPath Mapping
BeanShell 2.0b4 - by Pat Niemeyer (pat@pat.net)
bsh %

If there is a better way to get this going, I am interested in doing it the way 
it was intended.

Original comment by tomtz...@gmail.com on 9 Aug 2010 at 11:53

GoogleCodeExporter commented 9 years ago
Looks good to me ... it seems that you resolved the issue.

The problem was not that you run on Vista but (as you mentioned) the fact that 
the JDK was installed in a directory path with a space in it.

Thanks for sharing your fix with the rest of the community.

Original comment by babis.ma...@gmail.com on 19 Aug 2010 at 8:58