Forums | Admin

Discussion Forums: help

Start New Thread Start New Thread

 

By: arton Tajima
RE: why? can't create Java VM (RuntimeError) [ reply ]  
2010-04-10 13:21
You need to specify JAVA_HOME, because Rjb finds javavm dll in the path. But it can do in your script.
i.e)
require 'rjb'
ENV['JAVA_HOME'] = "c:/program files/java/jdk1.6.0_02";
Rjb::load(...)

The first parameter of load method is for your JARs or classes root.
ie)
Rjb::load('/java/lib/foobar.jar;/java/classes')


By: y f
RE: why? can't create Java VM (RuntimeError) [ reply ]  
2010-04-10 13:09
I have another question,please help me !

In my project, I can not set JAVA_HOME Env.
can I use 'Rjb::load()' for it?

And I don't understand the first para of "Rjb::load()",please help me.


for example:

require 'rjb'
Rjb::load(classpath='C:\Program Files\Java\jdk1.6.0_02')

=>`load': can't create Java VM (RuntimeError)



I am from china ,My English is pool,sorry.

By: arton Tajima
RE: why? can't create Java VM (RuntimeError) [ reply ]  
2010-04-10 11:47
Good, but my two cents, it's not required to restart the computer but command prompt (cmd.exe).

Cheers.

By: y f
RE: why? can't create Java VM (RuntimeError) [ reply ]  
2010-04-10 06:37
It's OK ,thanks for arton.
the answer is:
After setting JAVA_HOME,must restart the computer.

By: arton Tajima
RE: why? can't create Java VM (RuntimeError) [ reply ]  
2010-04-10 03:56
Does your JAVA_HOME point right directory?

Please check in a command prompt window as
echo %JAVA_HOME%
dir "%JAVA_HOME%"

Regards

By: y f
why? can't create Java VM (RuntimeError) [ reply ]  
2010-04-10 03:31
#RJB(1.2.0)
#JAVA_HOME=C:\Program Files\Java\jdk1.6.0_02\

require 'rjb'
include Rjb

load('.')




=>error 456.rb:15:in `load': can't create Java VM (RuntimeError)

It's very urgent,please help me,thank you.