aqa-tests icon indicating copy to clipboard operation
aqa-tests copied to clipboard

Support compiling Java source files with other Java compilers

Open hzongaro opened this issue 7 months ago • 0 comments

Given a particular Java source file, different Java compilers might produce class files containing different, but equivalent, Java bytecode. Assuming the bytecode is correct, a JVM implementation should be able to correctly load and execute the bytecode in those class files. See https://github.com/eclipse-openj9/openj9/issues/21417 for an example of a case in which OpenJ9 crashed running a test that had been compiled with the Eclipse Compiler for Java.

It would be nice to be able to exercise different combinations of Java compilers and JVM implementations using existing tests that would ordinarily be compiled using the javac compiler that is included with a Java SDK.

Obviously that might not scale well, given the number of different combinations of existing tests, JDK versions and JVM implementations would need to be run with different Java compilers.

Another approach that @llxia suggested might be to have a fixed set of tests that are compiled with ECJ or other Java compilers.

hzongaro avatar Mar 20 '25 20:03 hzongaro