Closed winezer0 closed 6 months ago
Please help me deal with this problem, thank you very much
@winezer0 Sorry for the late response. I'll fix it asap.
Hi @winezer0, I can't reproduce this issue, I wonder if you could attach or copy&paste the extconf.rb output.
After My analysis, the problem is mainly caused by two reasons:
On windows environment, when I run 'javah-version', the output Chinese result or Or because the output is not captured, I recompiled the rjb code by modifying it
run raw extconf.rb on windows:
run gem install rjb:
run javah -version on windows:
my fix extconf.rb code:
# cversion = (javac -version
=~ /\d+.\d+.\d+/ ) ? $& : nil
javac_output = javac -version 2>&1
match = javac_output.match(/\d+.\d+.\d+/)
cversion = match ? match[0].to_s : nil
# hversion = (javah -version
=~ /\d+.\d+.\d+/ ) ? $& : nil
hversion = cversion
puts "cversion:#{cversion}"
puts "hversion:#{hversion}"
run my new extconf.rb on windows:
Recompile and generate by configuring the environment
ruby setup.rb config ruby setup.rb setup ruby setup.rb install gem build rjb.gemspec gem install rjb-1.6.9-x64-mingw-ucrt.gem
However, there is still a JVM error
How should we deal with this issue? It seems to me that the issue of history has not been dealt with, is it impossible to solve it https://github.com/arton/rjb/issues/34
You can test a windows environment running rjb to see if it works
rjb>cd test
rjb\test>ruby test.rb
start RJB(1.6.9) test
Loaded suite test
Started
E
Error: test_64fixnum(TestRjb): RuntimeError: can't create Java VM
test.rb:21:in `load'
test.rb:21:in `setup'
E
Error: test_CallByNullForArrays(TestRjb): RuntimeError: can't create Java VM
test.rb:21:in `load'
test.rb:21:in `setup'
E
Error: test_CastObjectArray(TestRjb): RuntimeError: can't create Java VM
test.rb:21:in `load'
test.rb:21:in `setup'
E
Error: test_add_jar(TestRjb): RuntimeError: can't create Java VM
test.rb:21:in `load'
test.rb:21:in `setup'
E
Error: test_add_jars(TestRjb): RuntimeError: can't create Java VM
test.rb:21:in `load'
test.rb:21:in `setup'
............
E
Error: test_combination_charcters(TestRjb): RuntimeError: can't create Java VM
test.rb:21:in `load'
test.rb:21:in `setup'
E
Error: test_comparator(TestRjb): RuntimeError: can't create Java VM
test.rb:21:in `load'
test.rb:21:in `setup'
E
............
E
Error: test_fetch_method_without_signature(TestRjb): RuntimeError: can't create Java VM
test.rb:21:in `load'
test.rb:21:in `setup'
E
Error: test_fetch_static_method_signature(TestRjb): RuntimeError: can't create Java VM
test.rb:21:in `load'
test.rb:21:in `setup'
E
Error: test_field(TestRjb): RuntimeError: can't create Java VM
test.rb:21:in `load'
test.rb:21:in `setup'
E
Error: test_fornamehook(TestRjb): RuntimeError: can't create Java VM
test.rb:21:in `load'
test.rb:21:in `setup'
E
Error: test_generics_map(TestRjb): RuntimeError: can't create Java VM
test.rb:21:in `load'
test.rb:21:in `setup'
E
Error: test_impl(TestRjb): RuntimeError: can't create Java VM
test.rb:21:in `load'
test.rb:21:in `setup'
E
Error: test_import_and_instanciate(TestRjb): RuntimeError: can't create Java VM
test.rb:21:in `load'
test.rb:21:in `setup'
E
Error: test_importobj(TestRjb): RuntimeError: can't create Java VM
test.rb:21:in `load'
test.rb:21:in `setup'
E
Error: test_importobjarray(TestRjb): RuntimeError: can't create Java VM
test.rb:21:in `load'
test.rb:21:in `setup'
E
............
E
Error: test_underscored_constant(TestRjb): RuntimeError: can't create Java VM
test.rb:21:in `load'
test.rb:21:in `setup'
Finished in 0.399002 seconds.
------------------------------------------------------------------------------------------------------------------------70 tests, 0 assertions, 0 failures, 70 errors, 0 pendings, 0 omissions, 0 notifications
0% passed
------------------------------------------------------------------------------------------------------------------------175.44 tests/s, 0.00 assertions/s
wait for your
I will test in windows environment, please wait
Very good, thank you very much,
now rjb is running successfully on windows
OS: windows 10 Lang: Chinese
BUG 1:
In a Chinese Env, the 'javah -version' invoked by the rjb installation cannot be matched with a normal RE, indicating an encoding error
BUG1 Cause::rjb/ext/extconf.rb does not support Chinese encoding matching, please modify the code.
Temporary fix for BUG1:Change the language of the OS to english.
BUG 2:
After installing rjb with a temporary fix, every time you run the program: