You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With current implementation, some legitimate Java calls fail because of access to private methods in Java 17+, where setAccessible doesn't work anymore.
For example, the following fails though the Map class and all the methods are public:
In this case, and in similar cases, you have to resort to .jcall which is cumbersome because you have to remember the actual parameter classes, and the return type.
Error in .jcheck(silent = FALSE) :
java.lang.IllegalAccessException: class RJavaTools cannot access a member of class StreamMOA with modifiers "public static"
Calls: update ... update.DSC_MOA -> J -> .jrcall -> .jcall -> .jcheck
@vpinna80 any hope you have a minute to check? I'm currently swamped so can't really have a look right now :(
Hi @s-u , I could look at it but I need some more info.
Which Java version was used in the test?
Is this bug resulting from a test that's part of the streamMOA unit tests, or was it just a bug discovered by usage?
@vpinna80 Thanks! It is a report from R CMD check streamMOA (that's how CRAN does rev.dep. checks). I think Kurt uses latest Debian Java so probably 21.
Can you confirm that streamMOA isn't working with java 8? I looked at the code and it seems to me that the package isn't compatible with any java > 8. In particular, the Java classes in the package are not public, so their fields aren't accessible; no patch can allow for this accesses on any java > 8.
You said that the reverse dependencies tests were run with java 21. What version did you use before this patch? Go back to it and use this rJava with the same Java version you were using before.
Note that this patch doesn't automatically make all existing packages compatible with java > 8. The purpose of this patch is to allow packages that both require and are already compatible with Java 17 to run without errors.
Activity
Fix s-u#345. Allow J() convenience call on all versions of Java 6+
s-u commentedon Jan 19, 2026
Many thanks!
s-u commentedon Mar 11, 2026
Sorry, this had to be reverted, because it causes failure in reverse-dependencies, so will require more investigation.
s-u commentedon Mar 11, 2026
The failure report (from R CMD check):
streamMOA:
@vpinna80 any hope you have a minute to check? I'm currently swamped so can't really have a look right now :(
Revert d03e1ca (#345) which causes rev.dep. failure
remove #345 from NEWS since it had to be reverted
vpinna80 commentedon Mar 11, 2026
Hi @s-u , I could look at it but I need some more info.
Which Java version was used in the test?
Is this bug resulting from a test that's part of the streamMOA unit tests, or was it just a bug discovered by usage?
s-u commentedon Mar 11, 2026
@vpinna80 Thanks! It is a report from
R CMD check streamMOA(that's how CRAN does rev.dep. checks). I think Kurt uses latest Debian Java so probably 21.Fix s-u#345. Allow J() convenience call on all versions of Java 6+
vpinna80 commentedon Mar 24, 2026
Hi @s-u , sorry to come back to you this late.
Can you confirm that streamMOA isn't working with java 8? I looked at the code and it seems to me that the package isn't compatible with any java > 8. In particular, the Java classes in the package are not public, so their fields aren't accessible; no patch can allow for this accesses on any java > 8.
You said that the reverse dependencies tests were run with java 21. What version did you use before this patch? Go back to it and use this rJava with the same Java version you were using before.
Note that this patch doesn't automatically make all existing packages compatible with java > 8. The purpose of this patch is to allow packages that both require and are already compatible with Java 17 to run without errors.
Patch for s-u/rJava#345
Patch for s-u/rJava#345 (#7)