Andrei,
The Eclipse variables do not expand for me.
I applied your suggestion, and added some print statements in the
jruby.bat file to show what values the bat file sees. It seems that
${env_var:CLASSPATH} is used literally.
CLASSPATH:
${env_var:CLASSPATH};C:\Workspace\ZooGlue\bin
THE_CMD:
"java.exe"
-client -Xmx500m -Xss1024k -Xbootclasspath/a:"\jruby-1.1.4\lib\jruby.jar"
-classpath
"\jruby-1.1.4\bin\lib\bsf.jar;\jruby-1.1.4\lib\jruby.jar;\jruby-1.1.4\lib\profile.jar;${env_var:CLASSPATH};C:\Workspace\ZooGlue\bin"
-Djruby.home="\jruby-1.1.4\bin\.."
-Djruby.lib="\jruby-1.1.4\bin\..\lib"
-Djruby.shell="cmd.exe" -Djruby.script=jruby.bat
org.jruby.Main -KU
-IC:\Workspace\Zuby -r C:\DOCUME~1\mickish\LOCALS~1\Temp\dltk34108.tmp\scripts\sync.rb
C:\Workspace\Zuby\TestTruthiness.rb
Here are my modifications to jruby.bat to generate the above output:
echo CLASSPATH: >> D:\TEMP\cp.txt
echo %CLASSPATH% >> D:\TEMP\cp.txt
set THE_CMD="%_STARTJAVA%" %_VM_OPTS% -Xbootclasspath/a:"%JRUBY_CP%"
-classpath "%CP%;%CLASSPATH%" -Djruby.home="%JRUBY_HOME%"
-Djruby.lib="%JRUBY_HOME%\lib" -Djruby.shell="cmd.exe"
-Djruby.script=jruby.bat org.jruby.Main %JRUBY_OPTS% %_RUBY_OPTS%
echo THE_CMD: >> D:\TEMP\cp.txt
echo %THE_CMD% >> D:\TEMP\cp.txt
if %JRUBY_BAT_ERROR%==0 %THE_CMD%
Andrei Sobolev wrote:
Hi
Andrew,
Append only add new variable if it is not in environment already.
You could use following variable value and replace style:
${env_var:PATH};c:\MyRuby\lib
This will use environment variable PATH available to eclipse and append
appropriate path to it.
Best regards,
Andrei Sobolev.
Thanks for the help launching JRuby. I used
the Environment tab in the launch configuration dialog to set the
CLASSPATH to C:\Workspace\ZooGlue\bin.
However, this only worked when I selected 'Replace native environment
with specified environment'.
When I selected 'Append environment to native environment', I expected
my specified path to be appended to the CLASSPATH variable read by the
jruby.bat file. But it was ignored. I added some print statements to
jruby.bat to illuminate the CLASSPATH variable that it saw, and it was
unaffected by 'Append'.
Is this a bug, or a misunderstanding?
_______________________________________________
dltk-dev mailing list
dltk-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dltk-dev
_______________________________________________
dltk-dev mailing list
dltk-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dltk-dev
|