Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullPointerException in getCompatVersionParameter( #340

BeGe78 opened this issue Oct 10, 2012 · 5 comments

NullPointerException in getCompatVersionParameter( #340

BeGe78 opened this issue Oct 10, 2012 · 5 comments


Copy link

@BeGe78 BeGe78 commented Oct 10, 2012

I am trying to start a simple applet with Jruby 1.7.0 RC1 and get an error with getCompatVersion.
I could not find a solution on the web so it could well be an issue with this RC1 version.
My environment: Linux Fedora 17 and

jruby -v

Picked up _JAVA_OPTIONS: -Xms512m -Xmx1024m -XX:PermSize=64m -XX:MaxPermSize=128m -Dawt.useSystemAAFontSettings=lcd
jruby 1.7.0.RC1 (1.9.3p203) 2012-09-25 8e849de on OpenJDK Server VM 1.7.0_06-icedtea-mockbuild_2012_08_31_14_28-b00 [linux-i386]
My HTML page helloworldapplet.html

<title>Hello World</title>
I have added the because reading the code of, i thought it could be the problem. Anyway removing it gives the same problem.

I launch the applet with

appletviewer helloworldapplet.html

And got the following error
Picked up _JAVA_OPTIONS: -Xms512m -Xmx1024m -XX:PermSize=64m -XX:MaxPermSize=128m -Dawt.useSystemAAFontSettings=lcd
at org.jruby.JRubyApplet.getCompatVersionParameter(
at org.jruby.JRubyApplet.access$800(
at org.jruby.JRubyApplet$1.(
at org.jruby.JRubyApplet.init(
The security policy file has been added due to some problem with JRuby 1.6.8.
This error does not appear if i use the jruby-complete-1.6.8.jar.

Just in case (but i don't think it is problem), here is my simple applet helloworldApplet.rb that i am trying to launch

require "java"
include_class "java.applet.Applet"
include_class 'com.sun.j3d.utils.applet.MainFrame'
java_import java.awt.Button
class Ruby3d
def initialize
$"Hello Button")
JRUBY_APPLET.setSize(500, 500)
def main, 600, 600)

Copy link

@BanzaiMan BanzaiMan commented Oct 12, 2012

I tried getting JRuby applet running in the 1.9 mode in the past, but ultimately unsuccessful.

It is possible to get around the CompatVersion issue you're describing here, but other problems will surface. For example, during the startup, 1.9 attempts to load libraries from the file system by absolute path, which is not allowed in the Java applet environment.

I believe it is possible to run a JRuby 1.7 applet in the 1.8 mode, but I am not convinced that it is in our long-term interest.

Copy link

@BeGe78 BeGe78 commented Oct 12, 2012

Thank you for your time. I will go back to the 1.8 mode then. Do you think it will be improved in a near future ? In my opinion it is a must to go to general shipment.

@BeGe78 BeGe78 closed this Oct 12, 2012
Copy link

@headius headius commented Oct 30, 2012

Support for JRuby in applets has always been somewhat a secondary feature, and so we have not spent a great deal of time on it. But I agree it's something that would be good to support and ensure works, even in 1.9 mode.

If you are willing, we would appreciate further issues (or reopening this and filing additional ones) plus help to get 1.9 mode applets working properly.

@BeGe78 BeGe78 reopened this Oct 31, 2012
Copy link

@BeGe78 BeGe78 commented Oct 31, 2012

Thank you Headius for your proposal and so i re-open the issue. If you tell me where i can opened a bug form with related documentations and test corrections if any. I would really like to run my previously developped jruby applet with the newest versions and really wish to help as far as i can.

Copy link

@headius headius commented Aug 1, 2015

Fixed in 1.7. JRubyApplet no longer exists in 9k.

@headius headius closed this Aug 1, 2015
@headius headius added this to the JRuby 1.7.22 milestone Aug 1, 2015
eregon added a commit that referenced this issue Oct 29, 2016
a2e5952 Specs for Complex explicitly removing positive? and negative?.
d0c8343 Add spec for backtrace from rescue that only captures $!.
197292f Specs for conditionally-assigned variables accessed in closure.
ad581ab Fix Hash#assoc spec to avoid a CRuby >= 2.2 bug
fe9e1d1 Add spec for Range#include? with Time endpoints.
a0a7642 add more spec for ||= and &&=
f06c18d Spec for passing a block to forms of [] method.
e20cc56 Add spec for EAFNOSUPPORT in udp sockets
767d983 Add specs
53466eb Add specs for * and ** coercion of BasicObject types.
f3e2edf Fix typo in socketpair_spec.rb.
a0780cd Fix Socket#socketpair shared spec
048320b Add Socket#socketpair response type spec
5ee05bc This only appears to work on OS X.
1278eb2 Spec for IO#seek > 2^32.
e81f3e5 Fix extra space
a5f6f5e Specs for rb_obj_method_arity.
e990a71 Fix WIN32OLE_METHOD#offset_vtbl spec for 64-bit Windows
aa3697e Split platform-dependent parts in Float#round specs
9d0932f Handle the special case of x64-mingw32 for String#unpack('J') specs
849e1e2 Handle the special case of x64-mingw32 for Array#pack('J') specs
9689d97 Try running on 64-bit Ruby 2.3 on Windows
3a71993 Merge pull request #346 from mjago/fix_encodings
31c3d16 Fix encoding in core/string/shared/codepoints.rb
5191351 Fix encoding in core/string/shared/chars.rb
5213d36 Fix encoding in core/string/scrub_spec.rb
3f70703 Fix encoding in core/string/new_spec.rb
ac1e312 Exclude connect_nonblock raises Errno::EINPROGRESS
25a1538 Merge pull request #344 from mjago/socket_option_on_aix
ba36b85 Merge pull request #345 from mjago/fix_encoding
16b6441 Fix encoding in core/string/gsub_spec.rb
a083778 Fix encoding in core/string/getbyte_spec.rb
769d842 Fix encoding in core/string/fixtures/iso-8859-9-encoding.rb
d5141d5 Fix encoding in core/string/encoding_spec.rb
68d48e7 Fix encoding in core/string/encoding_spec.rb
608140c Fix encoding in core/string/element_set_spec.rb
96ebe46 Avoid use of getsockopt for setsockopt specs on aix
42cfee7 Merge pull request #343 from mjago/fix_encodings
ef14dee Fix encoding in core/string/delete_spec.rb
0325dfb Fix encoding in core/string/count_spec.rb
fc80507 Fix encoding in core/string/comparison_spec.rb
0f1590f Fix encoding in core/regexp/shared/new_ascii.rb
e30e3ab Remove extraneous parenthesis
7ecb1aa Merge pull request #342 from mjago/encoding_fixes
3e60d4c Add back `larger than UTF-8 max codepoints' spec
2c1dd28 Really fix encoding in unicode.rb
b752874 Fix encoding in core/array/pack/shared/unicode.rb
0317231 Merge pull request #341 from mjago/aix_socket_constants
17b07cf Fix encoding in core/array/pack/shared/string.rb
87d371b Fix encoding in core/array/fixtures/encoded_strings.rb
3702273 Fix whitespace
7c0d354 Remove IP_MAX_MEMBERSHIPS check on AIX platform
fa2ec3d Don't check for IPX socket constants on AIX platform
3ea90df Merge pull request #340 from iliabylich/add-more-specs-for-squiggly-heredoc
8fbd1ad More specs for "squiggly" heredoc.
b3b68c7 Merge pull request #339 from mjago/fix_stringscanner_encodings
b21cea4 Fix encoding in stringscanner/shared/get_byte.rb
2964778 Fix encoding in stringscanner/getch_spec.rb
05dbe0e Merge pull request #338 from mjago/fix_unbranch_on_big_endian
201a176 Fix unpack specs with j option on big-endian systems
5605faf Merge pull request #337 from mjago/fix_encodings
c601f85 Fix encodings in core/encoding/replicate_spec.rb
eb1d56d Fix encoding in encoding/invalid_byte_sequence_error/readagain_bytes_spec.rb
26ee43a Accept both possible values for Socket::Option#linger
ff41556 Do not make assumptions on the value of Dir#pos
b4bfa56 Merge pull request #336 from mjago/fix_j_spec_for_big_endian_platforms
864e2e1 Fix specs for Array pack with format J and j specs
151f7c6 Merge pull request #331 from mjago/unpack_option_j_specs
4c8b9b3 Fix encoding/invalid_byte_sequence_error/incomplete_input_spec.rb
626fab3 Fix encoding in encoding/invalid_byte_sequence_error/error_bytes_spec.rb
db30005 Fix encoding in encoding/fixtures/classes.rb
f4b5e0d Fix encoding in encoding/converter/putback_spec.rb
7e99711 Add specs for unpack options J and j
bcb318b Move require to example so unsupported syntax would only fail that example
57c69fc tests squiggly heredoc * See #175 * See [Feature 9098]
ce4eb8f Fix encoding in encoding/converter/primitive_errinfo_spec.rb
ef64e76 Fix encoding in encoding/converter/primitive_convert_spec.rb
8466a28 Fix encoding in encoding/converter/last_error_spec.rb
e0d32ca Fix encoding in encoding/converter/convert_spec.rb
a743e63 Fix encoding in core/string/codepoints_spec.rb
6353bbe Fix encoding in core/string/byteslice_spec.rb
5d1f1cb Revert "Travis: allow ruby-head to fail since it's outdated"
5ec5a10 Array pack with format J and j specs (#320)
6068505 Merge pull request #321 from mjago/fix_encoding_in_recv_spec
fb52aef Fix encoding in recv_spec.rb
96f8e44 Merge pull request #319 from mjago/fix_match_spec_utf8
012827a Fix utf-8 conflicts in Regexp match specs
f3c10d3 Fix magic encoding to avoid utf-8 conflicts
adfb2eb Merge pull request #316 from mjago/avoid_utf8_conflicts_in_io_specs
c6daa63 Fix alignment
044b889 Rename data to write
d259a19 Remove redundant artifact
3a71973 Avoid utf-8 conflicts in IO specs
402b2cb Fix expectation in a zlib spec
bee369d Zlib specs should use binary strings
c77a0e9 Merge pull request #315 from sgarciac/master
1334490 Tests Base64#urlsafe_encode64 and Base64#urlsafe_decode64 * See #175 * See [Feature 10740]
80937d6 Merge pull request #313 from mjago/avoid_utf8_conflicts_with_binary_encoding_in_marshall_specs
6e2efe7 Merge pull request #314 from mjago/fix_utf8_conflict_in_expand_path_spec
4df37ac DRY spec
d96bde0 Fix tests
6d47911 Fix utf-8 conflict in expand_path_spec.rb
7d1e89a Avoid utf8 conflicts in Marshall specs
45f9256 Merge pull request #312 from mjago/avoid_utf8_conflicts_with_binary_encoding_in_digest_specs
1884a0e Avoid utf-8 conflicts in Digest files
c4cabcf Add specs for yielding to a lambda with an Array and the wrong number of arguments
de4fab0 Remove extra encoding comment
c65e5ca Merge pull request #311 from mjago/avoid_problematic_encodings_in_zlib_specs
7b91144 Avoid problematic encodings in Zlib specs
a0a65c7 Fix variable naming style in Thread fixtures
8669cc2 Merge pull request #304 from ruby/fix_parser_warnings
71c4024 Fix most parser warnings (of 317)
bb48acd Fix most parser warnings: the first 200
ddc9372 Remove bad spec potentially changing the global process group
a226ed4 Merge pull request #310 from mjago/remove_problematic_utf_8_encoding
81cbd64 Avoid problematic byte sequence in UTF-8 encoding
292f31f IO#each_codepoint raises an exception at incomplete character before EOF when conversion takes place
94cbe8d SIGTERM is not supported on Windows
2dd2245 Speed up Process.waitpid spec
67f285b Improve spec description from changelog
0c2fe01 Move Hash#inspect specs in the Hash specs
48679fe Fix shared spec name
9a6c6b1 Merge pull request #307 from sgarciac/master
aef521e Hash#inspect doesn't raise error even if its content returns a string which is not compatible with Encoding.default_external as inspected result.
894db53 flatten no longer calls #to_ary method on elements beyond the given level. * See #175 * See [Bug 10748]
8126e53 Add spec for Net::FTP being passive by default from 2.3+
6e58b5f Merge pull request #306 from mjago/setsockopt_spec_test_fail_on_osx
5c232ad getsockopt(2) returns SO_LINGER instead of 1
264f06c Fix most parser warnings: the first 100
2d5aece Fix bad spec: Module#prepend does import constants
309343b Remove usages of eval for common syntax
fc21517 AppVeyor: run only once per PR from the same repo (#305)
0d9b6ff Merge pull request #301 from nobu/suppress-warnings
1c901da Merge pull request #302 from nobu/Enumerable#chunk-without-block
e00328a Update Enumerable#chunk
75fef79 Shadowing variables
c04ce7c Suppress warnings
6852fd4 Simplify guards in pack/unpack for the special case of mingw32 on Windows 64-bit
2fd92c4 Merge pull request #300 from bkutil/test-octal-int-opal
7b19ee9 Spec for Integer("0") parsing as 0
4e37db8 Remove all not_compliant_on and deviates_on guards
66f6ccc Use a simpler limits for spec'ing too big array sizes
5c78608 Remove not_compliant_on :ironruby guards
9e0f660 Remove impl-specific object_id spec
664b4c1 Fixed one TODO
87ae44f Avoid passing RUBY_EXE explicitly
21024e4 Fix link to AppVeyor
7f7430f Mention all types of specs
0099874 Mention being tested in implementation Cis
8a29c71 Update AppVeyor badge
cab9b2f Properly convert an st_index_t to a Fixnum
de08352 Remove trailing spaces
92a66ec Replace tab by spaces
2902648 Remove extra spaces after should/should_not
52e60f4 Merge pull request #299 from backus/conditional-regexp
76f88c1 Add conditional regular expression tests
4ae1346 It seems IO#close_on_exec* was implemented on Windows in MRI 2.3
f5afc1e It seems File::Stat.ino got implemented in MRI 2.3 on Windows
3de35fe Create an empty directory for #zero? specs
d3b01ca skip hanging spec on Windows
9f78b1a Test Ruby 2.3.1 on Windows with AppVeyor
30b9fab Merge pull request #298 from ksss/interrupt
8efd3ef Add spec for inheritance of Interrupt
564a064 Add Interrupt class specs
5309c48 Merge pull request #297 from ksss/signal_exception
a79325b Check a signm value if SignalException rescued
cdd885f Merge pull request #295 from ksss/signame
d416040 Add Signal.signame specs

git-subtree-dir: spec/ruby
git-subtree-split: a2e5952554a7632e5debf0306fbae4e2559b2880
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants