Add java8-to-25 module: legacy Java 8 app run on JDK 8, 17 and 25, tool coverage, JVM flags, libraries, OpenRewrite and the fixed version
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b6vDJ5fWY5uEZaJFNi
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
$ javac -version # JDK 8, no -encoding flag, LANG=C
|
||||
src/main/java/com/ankurm/legacy/Report.java:25: error: unmappable character for encoding ASCII
|
||||
+ "rupee as bytes = " + "???".getBytes().length + " byte(s)";
|
||||
^
|
||||
src/main/java/com/ankurm/legacy/Report.java:25: error: unmappable character for encoding ASCII
|
||||
+ "rupee as bytes = " + "???".getBytes().length + " byte(s)";
|
||||
^
|
||||
src/main/java/com/ankurm/legacy/Report.java:25: error: unmappable character for encoding ASCII
|
||||
+ "rupee as bytes = " + "???".getBytes().length + " byte(s)";
|
||||
^
|
||||
3 errors
|
||||
@@ -0,0 +1,21 @@
|
||||
$ java -version
|
||||
openjdk version "1.8.0_514"
|
||||
OpenJDK Runtime Environment (Temurin)(build 1.8.0_514-b01)
|
||||
OpenJDK 64-Bit Server VM (Temurin)(build 25.514-b01, mixed mode)
|
||||
|
||||
$ java -cp classes-built-by-jdk8 com.ankurm.legacy.App
|
||||
running on java.version 1.8.0_514
|
||||
[ok] jaxb: <order><id>A-1</id><quantity>12</quantity></order>
|
||||
[ok] jaxws: WSDL served
|
||||
[ok] base64: YW5rdXI=
|
||||
[ok] nashorn: BULK
|
||||
[ok] version: major=8
|
||||
[ok] classloader: classpath found=1
|
||||
[ok] reflection: ArrayList capacity=32
|
||||
[ok] securitymanager: blocked: plugins may not exit the JVM
|
||||
[ok] thread.stop: stopped
|
||||
date(en_US) = Mar 5, 2026 2:30 PM
|
||||
date(de_DE) = Donnerstag, 5. M\u00E4rz 2026
|
||||
money(en_IN) = Rs.1,234,567.50
|
||||
defaultCharset = US-ASCII
|
||||
rupee as bytes = 1 byte(s)
|
||||
@@ -0,0 +1,21 @@
|
||||
$ java -version
|
||||
openjdk version "25.0.5.1" 2026-11-17 LTS
|
||||
OpenJDK Runtime Environment Temurin-25.0.5.1+2 (build 25.0.5.1+2-LTS)
|
||||
OpenJDK 64-Bit Server VM Temurin-25.0.5.1+2 (build 25.0.5.1+2-LTS, mixed mode, sharing)
|
||||
|
||||
$ java -cp classes-built-by-jdk8 com.ankurm.legacy.App
|
||||
running on java.version 25.0.5.1
|
||||
[FAIL] jaxb: java.lang.NoClassDefFoundError: javax/xml/bind/JAXBContext
|
||||
[FAIL] jaxws: java.lang.NoClassDefFoundError: javax/xml/ws/Endpoint
|
||||
[FAIL] base64: java.lang.NoClassDefFoundError: sun/misc/BASE64Encoder
|
||||
[FAIL] nashorn: java.lang.NullPointerException: Cannot invoke "javax.script.ScriptEngine.put(String, Object)" because "<local1>" is null
|
||||
[ok] version: major=0
|
||||
[FAIL] classloader: java.lang.ClassCastException: class jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to class java.net.URLClassLoader (jdk.internal.loader.ClassLoaders$AppClassLoader and java.net.URLClassLoader are in module java.base of loader 'bootstrap')
|
||||
[FAIL] reflection: java.lang.reflect.InaccessibleObjectException: Unable to make field transient java.lang.Object[] java.util.ArrayList.elementData accessible: module java.base does not "opens java.util" to unnamed module @355da254
|
||||
[FAIL] securitymanager: java.lang.UnsupportedOperationException: Setting a Security Manager is not supported
|
||||
[FAIL] thread.stop: java.lang.UnsupportedOperationException
|
||||
date(en_US) = Mar 5, 2026, 2:30\u202FPM
|
||||
date(de_DE) = Donnerstag, 5. M\u00E4rz 2026
|
||||
money(en_IN) = \u20B91,234,567.50
|
||||
defaultCharset = UTF-8
|
||||
rupee as bytes = 3 byte(s)
|
||||
@@ -0,0 +1,20 @@
|
||||
$ java -cp classes-built-by-jdk8 com.ankurm.legacy.App # JDK 17, the middle of the staged path
|
||||
running on java.version 17.0.21.1
|
||||
[FAIL] jaxb: java.lang.NoClassDefFoundError: javax/xml/bind/JAXBContext
|
||||
[FAIL] jaxws: java.lang.NoClassDefFoundError: javax/xml/ws/Endpoint
|
||||
[FAIL] base64: java.lang.NoClassDefFoundError: sun/misc/BASE64Encoder
|
||||
[FAIL] nashorn: java.lang.NullPointerException: Cannot invoke "javax.script.ScriptEngine.put(String, Object)" because "<local1>" is null
|
||||
[ok] version: major=0
|
||||
[FAIL] classloader: java.lang.ClassCastException: class jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to class java.net.URLClassLoader (jdk.internal.loader.ClassLoaders$AppClassLoader and java.net.URLClassLoader are in module java.base of loader 'bootstrap')
|
||||
[FAIL] reflection: java.lang.reflect.InaccessibleObjectException: Unable to make field transient java.lang.Object[] java.util.ArrayList.elementData accessible: module java.base does not "opens java.util" to unnamed module @7137feef
|
||||
WARNING: A terminally deprecated method in java.lang.System has been called
|
||||
WARNING: System::setSecurityManager has been called by com.ankurm.legacy.Guard (file:./build/c8/)
|
||||
WARNING: Please consider reporting this to the maintainers of com.ankurm.legacy.Guard
|
||||
WARNING: System::setSecurityManager will be removed in a future release
|
||||
[ok] securitymanager: blocked: plugins may not exit the JVM
|
||||
[ok] thread.stop: stopped
|
||||
date(en_US) = Mar 5, 2026, 2:30 PM
|
||||
date(de_DE) = Donnerstag, 5. M\u00E4rz 2026
|
||||
money(en_IN) = \u20B91,234,567.50
|
||||
defaultCharset = US-ASCII
|
||||
rupee as bytes = 1 byte(s)
|
||||
@@ -0,0 +1,97 @@
|
||||
$ javac -encoding UTF-8 ... # JDK 25
|
||||
src/main/java/com/ankurm/legacy/Order.java:3: error: package javax.xml.bind.annotation does not exist
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
^
|
||||
src/main/java/com/ankurm/legacy/Order.java:4: error: package javax.xml.bind.annotation does not exist
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
^
|
||||
src/main/java/com/ankurm/legacy/Order.java:5: error: package javax.xml.bind.annotation does not exist
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
^
|
||||
src/main/java/com/ankurm/legacy/Order.java:8: error: cannot find symbol
|
||||
@XmlRootElement(name = "order")
|
||||
^
|
||||
symbol: class XmlRootElement
|
||||
src/main/java/com/ankurm/legacy/Order.java:9: error: cannot find symbol
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
^
|
||||
symbol: class XmlAccessorType
|
||||
src/main/java/com/ankurm/legacy/OrderXml.java:4: error: package javax.xml.bind does not exist
|
||||
import javax.xml.bind.JAXBContext;
|
||||
^
|
||||
src/main/java/com/ankurm/legacy/OrderXml.java:5: error: package javax.xml.bind does not exist
|
||||
import javax.xml.bind.Marshaller;
|
||||
^
|
||||
src/main/java/com/ankurm/legacy/SoapCheck.java:6: error: package javax.xml.ws does not exist
|
||||
import javax.xml.ws.Endpoint;
|
||||
^
|
||||
src/main/java/com/ankurm/legacy/StatusService.java:3: error: package javax.jws does not exist
|
||||
import javax.jws.WebMethod;
|
||||
^
|
||||
src/main/java/com/ankurm/legacy/StatusService.java:4: error: package javax.jws does not exist
|
||||
import javax.jws.WebService;
|
||||
^
|
||||
src/main/java/com/ankurm/legacy/StatusService.java:7: error: cannot find symbol
|
||||
@WebService
|
||||
^
|
||||
symbol: class WebService
|
||||
src/main/java/com/ankurm/legacy/Tokens.java:3: error: cannot find symbol
|
||||
import sun.misc.BASE64Encoder;
|
||||
^
|
||||
symbol: class BASE64Encoder
|
||||
location: package sun.misc
|
||||
src/main/java/com/ankurm/legacy/Order.java:9: error: cannot find symbol
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
^
|
||||
symbol: variable XmlAccessType
|
||||
src/main/java/com/ankurm/legacy/StatusService.java:9: error: cannot find symbol
|
||||
@WebMethod
|
||||
^
|
||||
symbol: class WebMethod
|
||||
location: class StatusService
|
||||
src/main/java/com/ankurm/legacy/Guard.java:6: warning: [removal] SecurityManager in java.lang has been deprecated and marked for removal
|
||||
System.setSecurityManager(new SecurityManager() {
|
||||
^
|
||||
src/main/java/com/ankurm/legacy/Guard.java:6: warning: [removal] setSecurityManager(SecurityManager) in System has been deprecated and marked for removal
|
||||
System.setSecurityManager(new SecurityManager() {
|
||||
^
|
||||
src/main/java/com/ankurm/legacy/Guard.java:18: warning: [removal] setSecurityManager(SecurityManager) in System has been deprecated and marked for removal
|
||||
System.setSecurityManager(null);
|
||||
^
|
||||
src/main/java/com/ankurm/legacy/OrderXml.java:9: error: cannot find symbol
|
||||
Marshaller m = JAXBContext.newInstance(Order.class).createMarshaller();
|
||||
^
|
||||
symbol: class Marshaller
|
||||
location: class OrderXml
|
||||
src/main/java/com/ankurm/legacy/OrderXml.java:9: error: cannot find symbol
|
||||
Marshaller m = JAXBContext.newInstance(Order.class).createMarshaller();
|
||||
^
|
||||
symbol: variable JAXBContext
|
||||
location: class OrderXml
|
||||
src/main/java/com/ankurm/legacy/OrderXml.java:10: error: cannot find symbol
|
||||
m.setProperty(Marshaller.JAXB_FRAGMENT, Boolean.TRUE);
|
||||
^
|
||||
symbol: variable Marshaller
|
||||
location: class OrderXml
|
||||
src/main/java/com/ankurm/legacy/SoapCheck.java:11: error: cannot find symbol
|
||||
Endpoint endpoint = Endpoint.publish(address, new StatusService());
|
||||
^
|
||||
symbol: class Endpoint
|
||||
location: class SoapCheck
|
||||
src/main/java/com/ankurm/legacy/SoapCheck.java:11: error: cannot find symbol
|
||||
Endpoint endpoint = Endpoint.publish(address, new StatusService());
|
||||
^
|
||||
symbol: variable Endpoint
|
||||
location: class SoapCheck
|
||||
src/main/java/com/ankurm/legacy/Tokens.java:8: error: cannot find symbol
|
||||
return new BASE64Encoder().encode(raw);
|
||||
^
|
||||
symbol: class BASE64Encoder
|
||||
location: class Tokens
|
||||
src/main/java/com/ankurm/legacy/Watchdog.java:15: warning: [removal] stop() in Thread has been deprecated and marked for removal
|
||||
worker.stop();
|
||||
^
|
||||
Note: Some input files use or override a deprecated API.
|
||||
Note: Recompile with -Xlint:deprecation for details.
|
||||
20 errors
|
||||
4 warnings
|
||||
@@ -0,0 +1,31 @@
|
||||
$ javac --release 8 ... # JDK 25, all sources except Tokens.java and App.java
|
||||
warning: [options] source value 8 is obsolete and will be removed in a future release
|
||||
warning: [options] target value 8 is obsolete and will be removed in a future release
|
||||
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
|
||||
3 warnings
|
||||
exit status: 0
|
||||
|
||||
$ ls r8/com/ankurm/legacy
|
||||
Guard$1.class
|
||||
Guard.class
|
||||
JavaVersion.class
|
||||
Order.class
|
||||
OrderXml.class
|
||||
Peek.class
|
||||
PluginScanner.class
|
||||
Report.class
|
||||
Rules.class
|
||||
SoapCheck.class
|
||||
StatusService.class
|
||||
Watchdog.class
|
||||
|
||||
$ javac --release 8 Tokens.java
|
||||
src/main/java/com/ankurm/legacy/Tokens.java:3: error: package sun.misc does not exist
|
||||
import sun.misc.BASE64Encoder;
|
||||
^
|
||||
src/main/java/com/ankurm/legacy/Tokens.java:8: error: cannot find symbol
|
||||
return new BASE64Encoder().encode(raw);
|
||||
^
|
||||
symbol: class BASE64Encoder
|
||||
location: class Tokens
|
||||
2 errors
|
||||
@@ -0,0 +1,13 @@
|
||||
$ jdeps --jdk-internals legacy.jar
|
||||
legacy.jar -> JDK removed internal API
|
||||
com.ankurm.legacy.Tokens -> sun.misc.BASE64Encoder JDK removed internal API
|
||||
|
||||
Warning: JDK internal APIs are unsupported and private to JDK implementation that are
|
||||
subject to be removed or changed incompatibly and could break your application.
|
||||
Please modify your code to eliminate dependence on any JDK internal APIs.
|
||||
For the most recent update on JDK internal API replacements, please check:
|
||||
https://wiki.openjdk.org/display/JDK8/Java+Dependency+Analysis+Tool
|
||||
|
||||
JDK Internal API Suggested Replacement
|
||||
---------------- ---------------------
|
||||
sun.misc.BASE64Encoder Use java.util.Base64 @since 1.8
|
||||
@@ -0,0 +1,21 @@
|
||||
$ jdeps -verbose:package legacy.jar
|
||||
legacy.jar -> JDK removed internal API
|
||||
legacy.jar -> java.base
|
||||
legacy.jar -> java.scripting
|
||||
legacy.jar -> not found
|
||||
com.ankurm.legacy -> java.io java.base
|
||||
com.ankurm.legacy -> java.lang java.base
|
||||
com.ankurm.legacy -> java.lang.invoke java.base
|
||||
com.ankurm.legacy -> java.lang.reflect java.base
|
||||
com.ankurm.legacy -> java.net java.base
|
||||
com.ankurm.legacy -> java.nio.charset java.base
|
||||
com.ankurm.legacy -> java.security java.base
|
||||
com.ankurm.legacy -> java.text java.base
|
||||
com.ankurm.legacy -> java.util java.base
|
||||
com.ankurm.legacy -> java.util.concurrent java.base
|
||||
com.ankurm.legacy -> javax.jws not found
|
||||
com.ankurm.legacy -> javax.script java.scripting
|
||||
com.ankurm.legacy -> javax.xml.bind not found
|
||||
com.ankurm.legacy -> javax.xml.bind.annotation not found
|
||||
com.ankurm.legacy -> javax.xml.ws not found
|
||||
com.ankurm.legacy -> sun.misc JDK removed internal API
|
||||
@@ -0,0 +1,12 @@
|
||||
$ jdeprscan --release 25 legacy.jar
|
||||
Jar file legacy.jar:
|
||||
class com/ankurm/legacy/Guard$1 extends deprecated class java/lang/SecurityManager (forRemoval=true)
|
||||
class com/ankurm/legacy/Guard$1 uses deprecated class java/lang/SecurityManager (forRemoval=true)
|
||||
class com/ankurm/legacy/Guard uses deprecated method java/lang/System::setSecurityManager(Ljava/lang/SecurityManager;)V (forRemoval=true)
|
||||
error: cannot find class javax/xml/bind/JAXBContext
|
||||
error: cannot find class javax/xml/bind/Marshaller
|
||||
class com/ankurm/legacy/Report uses deprecated method java/util/Locale::<init>(Ljava/lang/String;Ljava/lang/String;)V
|
||||
error: cannot find class javax/xml/ws/Endpoint
|
||||
class com/ankurm/legacy/SoapCheck uses deprecated method java/net/URL::<init>(Ljava/lang/String;)V
|
||||
error: cannot find class sun/misc/BASE64Encoder
|
||||
class com/ankurm/legacy/Watchdog uses deprecated method java/lang/Thread::stop()V (forRemoval=true)
|
||||
@@ -0,0 +1,334 @@
|
||||
################ -XX:MaxPermSize=256m
|
||||
JDK 8 exit=0
|
||||
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
|
||||
JDK 17 exit=1
|
||||
Unrecognized VM option 'MaxPermSize=256m'
|
||||
Error: Could not create the Java Virtual Machine.
|
||||
Error: A fatal exception has occurred. Program will exit.
|
||||
JDK 25 exit=1
|
||||
Unrecognized VM option 'MaxPermSize=256m'
|
||||
Error: Could not create the Java Virtual Machine.
|
||||
Error: A fatal exception has occurred. Program will exit.
|
||||
################ -XX:PermSize=64m
|
||||
JDK 8 exit=0
|
||||
OpenJDK 64-Bit Server VM warning: ignoring option PermSize=64m; support was removed in 8.0
|
||||
JDK 17 exit=1
|
||||
Unrecognized VM option 'PermSize=64m'
|
||||
Error: Could not create the Java Virtual Machine.
|
||||
Error: A fatal exception has occurred. Program will exit.
|
||||
JDK 25 exit=1
|
||||
Unrecognized VM option 'PermSize=64m'
|
||||
Error: Could not create the Java Virtual Machine.
|
||||
Error: A fatal exception has occurred. Program will exit.
|
||||
################ -XX:+UseConcMarkSweepGC
|
||||
JDK 8 exit=0
|
||||
JDK 17 exit=1
|
||||
Unrecognized VM option 'UseConcMarkSweepGC'
|
||||
Error: Could not create the Java Virtual Machine.
|
||||
Error: A fatal exception has occurred. Program will exit.
|
||||
JDK 25 exit=1
|
||||
Unrecognized VM option 'UseConcMarkSweepGC'
|
||||
Error: Could not create the Java Virtual Machine.
|
||||
Error: A fatal exception has occurred. Program will exit.
|
||||
################ -XX:+UseParNewGC
|
||||
JDK 8 exit=0
|
||||
OpenJDK 64-Bit Server VM warning: Using the ParNew young collector with the Serial old collector is deprecated and will likely be removed in a future release
|
||||
JDK 17 exit=1
|
||||
Unrecognized VM option 'UseParNewGC'
|
||||
Error: Could not create the Java Virtual Machine.
|
||||
Error: A fatal exception has occurred. Program will exit.
|
||||
JDK 25 exit=1
|
||||
Unrecognized VM option 'UseParNewGC'
|
||||
Error: Could not create the Java Virtual Machine.
|
||||
Error: A fatal exception has occurred. Program will exit.
|
||||
################ -XX:+CMSParallelRemarkEnabled
|
||||
JDK 8 exit=0
|
||||
JDK 17 exit=1
|
||||
Unrecognized VM option 'CMSParallelRemarkEnabled'
|
||||
Error: Could not create the Java Virtual Machine.
|
||||
Error: A fatal exception has occurred. Program will exit.
|
||||
JDK 25 exit=1
|
||||
Unrecognized VM option 'CMSParallelRemarkEnabled'
|
||||
Error: Could not create the Java Virtual Machine.
|
||||
Error: A fatal exception has occurred. Program will exit.
|
||||
################ -XX:CMSInitiatingOccupancyFraction=70
|
||||
JDK 8 exit=0
|
||||
JDK 17 exit=1
|
||||
Unrecognized VM option 'CMSInitiatingOccupancyFraction=70'
|
||||
Error: Could not create the Java Virtual Machine.
|
||||
Error: A fatal exception has occurred. Program will exit.
|
||||
JDK 25 exit=1
|
||||
Unrecognized VM option 'CMSInitiatingOccupancyFraction=70'
|
||||
Error: Could not create the Java Virtual Machine.
|
||||
Error: A fatal exception has occurred. Program will exit.
|
||||
################ -XX:+UseParallelOldGC
|
||||
JDK 8 exit=0
|
||||
JDK 17 exit=1
|
||||
Unrecognized VM option 'UseParallelOldGC'
|
||||
Did you mean '(+/-)UseParallelGC'? Error: Could not create the Java Virtual Machine.
|
||||
Error: A fatal exception has occurred. Program will exit.
|
||||
JDK 25 exit=1
|
||||
Unrecognized VM option 'UseParallelOldGC'
|
||||
Did you mean '(+/-)UseParallelGC'?
|
||||
Error: Could not create the Java Virtual Machine.
|
||||
Error: A fatal exception has occurred. Program will exit.
|
||||
################ -Xincgc
|
||||
JDK 8 exit=0
|
||||
OpenJDK 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
|
||||
JDK 17 exit=1
|
||||
Unrecognized option: -Xincgc
|
||||
Error: Could not create the Java Virtual Machine.
|
||||
Error: A fatal exception has occurred. Program will exit.
|
||||
JDK 25 exit=1
|
||||
Unrecognized option: -Xincgc
|
||||
Error: Could not create the Java Virtual Machine.
|
||||
Error: A fatal exception has occurred. Program will exit.
|
||||
################ -XX:+PrintGCDetails
|
||||
JDK 8 exit=0
|
||||
Heap
|
||||
PSYoungGen total 28672K, used 983K [0x00000000e0000000, 0x00000000e2000000, 0x0000000100000000)
|
||||
eden space 24576K, 4% used [0x00000000e0000000,0x00000000e00f5da8,0x00000000e1800000)
|
||||
from space 4096K, 0% used [0x00000000e1c00000,0x00000000e1c00000,0x00000000e2000000)
|
||||
JDK 17 exit=0
|
||||
[0.0NNs][warning][gc] -XX:+PrintGCDetails is deprecated. Will use -Xlog:gc* instead.
|
||||
[0.0NNs][info ][gc] Using G1
|
||||
[0.0NNs][info ][gc,init] Version: 17.0.21.1+2 (release)
|
||||
[0.0NNs][info ][gc,init] CPUs: 2 total, 2 available
|
||||
JDK 25 exit=0
|
||||
[0.0NNs][warning][gc] -XX:+PrintGCDetails is deprecated. Will use -Xlog:gc* instead.
|
||||
[0.0NNs][info ][gc,init] CardTable entry size: 512
|
||||
[0.0NNs][info ][gc ] Using G1
|
||||
[0.0NNs][info ][gc,init] Version: 25.0.5.1+2-LTS (release)
|
||||
################ -XX:+PrintGCDateStamps
|
||||
JDK 8 exit=0
|
||||
JDK 17 exit=1
|
||||
Unrecognized VM option 'PrintGCDateStamps'
|
||||
Error: Could not create the Java Virtual Machine.
|
||||
Error: A fatal exception has occurred. Program will exit.
|
||||
JDK 25 exit=1
|
||||
Unrecognized VM option 'PrintGCDateStamps'
|
||||
Error: Could not create the Java Virtual Machine.
|
||||
Error: A fatal exception has occurred. Program will exit.
|
||||
################ -XX:+PrintGCTimeStamps
|
||||
JDK 8 exit=0
|
||||
JDK 17 exit=1
|
||||
Unrecognized VM option 'PrintGCTimeStamps'
|
||||
Error: Could not create the Java Virtual Machine.
|
||||
Error: A fatal exception has occurred. Program will exit.
|
||||
JDK 25 exit=1
|
||||
Unrecognized VM option 'PrintGCTimeStamps'
|
||||
Error: Could not create the Java Virtual Machine.
|
||||
Error: A fatal exception has occurred. Program will exit.
|
||||
################ -XX:+PrintTenuringDistribution
|
||||
JDK 8 exit=0
|
||||
JDK 17 exit=1
|
||||
Unrecognized VM option 'PrintTenuringDistribution'
|
||||
Error: Could not create the Java Virtual Machine.
|
||||
Error: A fatal exception has occurred. Program will exit.
|
||||
JDK 25 exit=1
|
||||
Unrecognized VM option 'PrintTenuringDistribution'
|
||||
Error: Could not create the Java Virtual Machine.
|
||||
Error: A fatal exception has occurred. Program will exit.
|
||||
################ -XX:+PrintGCApplicationStoppedTime
|
||||
JDK 8 exit=0
|
||||
JDK 17 exit=1
|
||||
Unrecognized VM option 'PrintGCApplicationStoppedTime'
|
||||
Error: Could not create the Java Virtual Machine.
|
||||
Error: A fatal exception has occurred. Program will exit.
|
||||
JDK 25 exit=1
|
||||
Unrecognized VM option 'PrintGCApplicationStoppedTime'
|
||||
Error: Could not create the Java Virtual Machine.
|
||||
Error: A fatal exception has occurred. Program will exit.
|
||||
################ -Xloggc:gc.log
|
||||
JDK 8 exit=0
|
||||
JDK 17 exit=0
|
||||
[0.0NNs][warning][gc] -Xloggc is deprecated. Will use -Xlog:gc:gc.log instead.
|
||||
OpenJDK 64-Bit Server VM Temurin-17.0.21.1+2 (build 17.0.21.1+2, mixed mode, sharing)
|
||||
JDK 25 exit=0
|
||||
[0.0NNs][warning][gc] -Xloggc is deprecated. Will use -Xlog:gc:gc.log instead.
|
||||
OpenJDK 64-Bit Server VM Temurin-25.0.5.1+2 (build 25.0.5.1+2-LTS, mixed mode, sharing)
|
||||
################ -XX:+UseGCLogFileRotation
|
||||
JDK 8 exit=0
|
||||
To enable GC log rotation, use -Xloggc:<filename> -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=<num_of_files>
|
||||
where num_of_file > 0
|
||||
GC log rotation is turned off
|
||||
JDK 17 exit=1
|
||||
Unrecognized VM option 'UseGCLogFileRotation'
|
||||
Error: Could not create the Java Virtual Machine.
|
||||
Error: A fatal exception has occurred. Program will exit.
|
||||
JDK 25 exit=1
|
||||
Unrecognized VM option 'UseGCLogFileRotation'
|
||||
Error: Could not create the Java Virtual Machine.
|
||||
Error: A fatal exception has occurred. Program will exit.
|
||||
################ -XX:NumberOfGCLogFiles=5
|
||||
JDK 8 exit=0
|
||||
JDK 17 exit=1
|
||||
Unrecognized VM option 'NumberOfGCLogFiles=5'
|
||||
Error: Could not create the Java Virtual Machine.
|
||||
Error: A fatal exception has occurred. Program will exit.
|
||||
JDK 25 exit=1
|
||||
Unrecognized VM option 'NumberOfGCLogFiles=5'
|
||||
Error: Could not create the Java Virtual Machine.
|
||||
Error: A fatal exception has occurred. Program will exit.
|
||||
################ -XX:+AggressiveOpts
|
||||
JDK 8 exit=0
|
||||
JDK 17 exit=1
|
||||
Unrecognized VM option 'AggressiveOpts'
|
||||
Error: Could not create the Java Virtual Machine.
|
||||
Error: A fatal exception has occurred. Program will exit.
|
||||
JDK 25 exit=1
|
||||
Unrecognized VM option 'AggressiveOpts'
|
||||
Error: Could not create the Java Virtual Machine.
|
||||
Error: A fatal exception has occurred. Program will exit.
|
||||
################ -XX:+UseBiasedLocking
|
||||
JDK 8 exit=0
|
||||
JDK 17 exit=0
|
||||
OpenJDK 64-Bit Server VM warning: Option UseBiasedLocking was deprecated in version 15.0 and will likely be removed in a future release.
|
||||
OpenJDK 64-Bit Server VM Temurin-17.0.21.1+2 (build 17.0.21.1+2, mixed mode, sharing)
|
||||
JDK 25 exit=1
|
||||
Unrecognized VM option 'UseBiasedLocking'
|
||||
Error: Could not create the Java Virtual Machine.
|
||||
Error: A fatal exception has occurred. Program will exit.
|
||||
################ -XX:+UseFastAccessorMethods
|
||||
JDK 8 exit=0
|
||||
JDK 17 exit=1
|
||||
Unrecognized VM option 'UseFastAccessorMethods'
|
||||
Error: Could not create the Java Virtual Machine.
|
||||
Error: A fatal exception has occurred. Program will exit.
|
||||
JDK 25 exit=1
|
||||
Unrecognized VM option 'UseFastAccessorMethods'
|
||||
Error: Could not create the Java Virtual Machine.
|
||||
Error: A fatal exception has occurred. Program will exit.
|
||||
################ -XX:+AggressiveHeap
|
||||
JDK 8 exit=0
|
||||
JDK 17 exit=0
|
||||
OpenJDK 64-Bit Server VM Temurin-17.0.21.1+2 (build 17.0.21.1+2, mixed mode, sharing)
|
||||
JDK 25 exit=0
|
||||
OpenJDK 64-Bit Server VM Temurin-25.0.5.1+2 (build 25.0.5.1+2-LTS, mixed mode, sharing)
|
||||
################ -XX:+UseCGroupMemoryLimitForHeap
|
||||
JDK 8 exit=1
|
||||
Error: VM option 'UseCGroupMemoryLimitForHeap' is experimental and must be enabled via -XX:+UnlockExperimentalVMOptions.
|
||||
Error: Could not create the Java Virtual Machine.
|
||||
Error: A fatal exception has occurred. Program will exit.
|
||||
JDK 17 exit=1
|
||||
Unrecognized VM option 'UseCGroupMemoryLimitForHeap'
|
||||
Error: Could not create the Java Virtual Machine.
|
||||
Error: A fatal exception has occurred. Program will exit.
|
||||
JDK 25 exit=1
|
||||
Unrecognized VM option 'UseCGroupMemoryLimitForHeap'
|
||||
Error: Could not create the Java Virtual Machine.
|
||||
Error: A fatal exception has occurred. Program will exit.
|
||||
################ -XX:+UseStringDeduplication
|
||||
JDK 8 exit=0
|
||||
JDK 17 exit=0
|
||||
OpenJDK 64-Bit Server VM Temurin-17.0.21.1+2 (build 17.0.21.1+2, mixed mode, sharing)
|
||||
JDK 25 exit=0
|
||||
OpenJDK 64-Bit Server VM Temurin-25.0.5.1+2 (build 25.0.5.1+2-LTS, mixed mode, sharing)
|
||||
################ -XX:+DisableExplicitGC
|
||||
JDK 8 exit=0
|
||||
JDK 17 exit=0
|
||||
OpenJDK 64-Bit Server VM Temurin-17.0.21.1+2 (build 17.0.21.1+2, mixed mode, sharing)
|
||||
JDK 25 exit=0
|
||||
OpenJDK 64-Bit Server VM Temurin-25.0.5.1+2 (build 25.0.5.1+2-LTS, mixed mode, sharing)
|
||||
################ -d64
|
||||
JDK 8 exit=0
|
||||
JDK 17 exit=1
|
||||
Unrecognized option: -d64
|
||||
Error: Could not create the Java Virtual Machine.
|
||||
Error: A fatal exception has occurred. Program will exit.
|
||||
JDK 25 exit=1
|
||||
Unrecognized option: -d64
|
||||
Error: Could not create the Java Virtual Machine.
|
||||
Error: A fatal exception has occurred. Program will exit.
|
||||
################ -Xverify:none
|
||||
JDK 8 exit=0
|
||||
JDK 17 exit=0
|
||||
OpenJDK 64-Bit Server VM warning: Options -Xverify:none and -noverify were deprecated in JDK 13 and will likely be removed in a future release.
|
||||
OpenJDK 64-Bit Server VM Temurin-17.0.21.1+2 (build 17.0.21.1+2, mixed mode, sharing)
|
||||
JDK 25 exit=0
|
||||
OpenJDK 64-Bit Server VM warning: Options -Xverify:none and -noverify were deprecated in JDK 13 and will likely be removed in a future release.
|
||||
OpenJDK 64-Bit Server VM Temurin-25.0.5.1+2 (build 25.0.5.1+2-LTS, mixed mode, sharing)
|
||||
################ -Xfuture
|
||||
JDK 8 exit=0
|
||||
JDK 17 exit=0
|
||||
Warning: -Xfuture option is deprecated and may be removed in a future release.
|
||||
OpenJDK 64-Bit Server VM Temurin-17.0.21.1+2 (build 17.0.21.1+2, mixed mode)
|
||||
JDK 25 exit=1
|
||||
Unrecognized option: -Xfuture
|
||||
Error: Could not create the Java Virtual Machine.
|
||||
Error: A fatal exception has occurred. Program will exit.
|
||||
################ --illegal-access=permit
|
||||
JDK 8 exit=1
|
||||
Unrecognized option: --illegal-access=permit
|
||||
Error: Could not create the Java Virtual Machine.
|
||||
Error: A fatal exception has occurred. Program will exit.
|
||||
JDK 17 exit=0
|
||||
OpenJDK 64-Bit Server VM warning: Ignoring option --illegal-access=permit; support was removed in 17.0
|
||||
OpenJDK 64-Bit Server VM Temurin-17.0.21.1+2 (build 17.0.21.1+2, mixed mode, sharing)
|
||||
JDK 25 exit=0
|
||||
OpenJDK 64-Bit Server VM warning: Ignoring option --illegal-access=permit; support was removed in 17.0
|
||||
OpenJDK 64-Bit Server VM Temurin-25.0.5.1+2 (build 25.0.5.1+2-LTS, mixed mode, sharing)
|
||||
################ -XX:+UnlockCommercialFeatures
|
||||
JDK 8 exit=0
|
||||
JDK 17 exit=1
|
||||
Unrecognized VM option 'UnlockCommercialFeatures'
|
||||
Error: Could not create the Java Virtual Machine.
|
||||
Error: A fatal exception has occurred. Program will exit.
|
||||
JDK 25 exit=1
|
||||
Unrecognized VM option 'UnlockCommercialFeatures'
|
||||
Error: Could not create the Java Virtual Machine.
|
||||
Error: A fatal exception has occurred. Program will exit.
|
||||
################ -Djava.security.manager
|
||||
JDK 8 exit=0
|
||||
JDK 17 exit=0
|
||||
WARNING: A command line option has enabled the Security Manager
|
||||
WARNING: The Security Manager is deprecated and will be removed in a future release
|
||||
OpenJDK 64-Bit Server VM Temurin-17.0.21.1+2 (build 17.0.21.1+2, mixed mode, sharing)
|
||||
JDK 25 exit=1
|
||||
Error occurred during initialization of VM
|
||||
java.lang.Error: A command line option has attempted to allow or enable the Security Manager. Enabling a Security Manager is not supported.
|
||||
at java.lang.System.initPhase3([email protected]/System.java:1970)
|
||||
################ -Djava.security.manager=allow
|
||||
JDK 8 exit=1
|
||||
Error occurred during initialization of VM
|
||||
java.lang.InternalError: Could not create SecurityManager: allow
|
||||
at sun.misc.Launcher.<init>(Launcher.java:106)
|
||||
at sun.misc.Launcher.<clinit>(Launcher.java:54)
|
||||
JDK 17 exit=0
|
||||
OpenJDK 64-Bit Server VM Temurin-17.0.21.1+2 (build 17.0.21.1+2, mixed mode, sharing)
|
||||
JDK 25 exit=1
|
||||
Error occurred during initialization of VM
|
||||
java.lang.Error: A command line option has attempted to allow or enable the Security Manager. Enabling a Security Manager is not supported.
|
||||
at java.lang.System.initPhase3([email protected]/System.java:1970)
|
||||
################ -Djava.endorsed.dirs=/tmp
|
||||
JDK 8 exit=0
|
||||
JDK 17 exit=1
|
||||
-Djava.endorsed.dirs=/tmp is not supported. Endorsed standards and standalone APIs
|
||||
in modular form will be supported via the concept of upgradeable modules.
|
||||
Error: Could not create the Java Virtual Machine.
|
||||
Error: A fatal exception has occurred. Program will exit.
|
||||
JDK 25 exit=1
|
||||
-Djava.endorsed.dirs=/tmp is not supported. Endorsed standards and standalone APIs
|
||||
in modular form will be supported via the concept of upgradeable modules.
|
||||
Error: Could not create the Java Virtual Machine.
|
||||
Error: A fatal exception has occurred. Program will exit.
|
||||
################ -Djava.ext.dirs=/tmp
|
||||
JDK 8 exit=0
|
||||
JDK 17 exit=1
|
||||
-Djava.ext.dirs=/tmp is not supported. Use -classpath instead.
|
||||
Error: Could not create the Java Virtual Machine.
|
||||
Error: A fatal exception has occurred. Program will exit.
|
||||
JDK 25 exit=1
|
||||
-Djava.ext.dirs=/tmp is not supported. Use -classpath instead.
|
||||
Error: Could not create the Java Virtual Machine.
|
||||
Error: A fatal exception has occurred. Program will exit.
|
||||
################ -Xbootclasspath/p:/tmp/none.jar
|
||||
JDK 8 exit=0
|
||||
JDK 17 exit=1
|
||||
-Xbootclasspath/p is no longer a supported option.
|
||||
Error: Could not create the Java Virtual Machine.
|
||||
Error: A fatal exception has occurred. Program will exit.
|
||||
JDK 25 exit=1
|
||||
-Xbootclasspath/p is no longer a supported option.
|
||||
Error: Could not create the Java Virtual Machine.
|
||||
Error: A fatal exception has occurred. Program will exit.
|
||||
@@ -0,0 +1,53 @@
|
||||
################ JDK 8, -XX:ActiveProcessorCount=2
|
||||
MaxHeapSize 1610612736
|
||||
UseCompressedOops true
|
||||
UseContainerSupport true
|
||||
UseG1GC false
|
||||
UseParallelGC true
|
||||
UseSerialGC false
|
||||
UseStringDeduplication false
|
||||
################ JDK 8, -XX:ActiveProcessorCount=1
|
||||
MaxHeapSize 1610612736
|
||||
UseCompressedOops true
|
||||
UseContainerSupport true
|
||||
UseG1GC false
|
||||
UseParallelGC false
|
||||
UseSerialGC false
|
||||
UseStringDeduplication false
|
||||
################ JDK 17, -XX:ActiveProcessorCount=2
|
||||
MaxHeapSize 1610612736
|
||||
UseCompressedOops true
|
||||
UseContainerSupport true
|
||||
UseG1GC true
|
||||
UseParallelGC false
|
||||
UseSerialGC false
|
||||
UseStringDeduplication false
|
||||
################ JDK 17, -XX:ActiveProcessorCount=1
|
||||
MaxHeapSize 1610612736
|
||||
UseCompressedOops true
|
||||
UseContainerSupport true
|
||||
UseG1GC false
|
||||
UseParallelGC false
|
||||
UseSerialGC true
|
||||
UseStringDeduplication false
|
||||
################ JDK 25, -XX:ActiveProcessorCount=2
|
||||
MaxHeapSize 1610612736
|
||||
UseCompactObjectHeaders false
|
||||
UseCompressedOops true
|
||||
UseContainerSupport true
|
||||
UseG1GC true
|
||||
UseParallelGC false
|
||||
UseSerialGC false
|
||||
UseStringDeduplication false
|
||||
################ JDK 25, -XX:ActiveProcessorCount=1
|
||||
MaxHeapSize 1610612736
|
||||
UseCompactObjectHeaders false
|
||||
UseCompressedOops true
|
||||
UseContainerSupport true
|
||||
UseG1GC false
|
||||
UseParallelGC false
|
||||
UseSerialGC true
|
||||
UseStringDeduplication false
|
||||
################ JDK 8 with 1 CPU: no UseXxxGC flag is set, so ask for the heap layout
|
||||
def new generation
|
||||
tenured generation
|
||||
@@ -0,0 +1,93 @@
|
||||
################ JDK 8
|
||||
java.version = 1.8.0_514
|
||||
keystore.type = jks
|
||||
protocols = [TLSv1.3, TLSv1.2]
|
||||
cipher suites = 33 enabled, 6 of them TLS_RSA_*
|
||||
jdk.tls.disabledAlgorithms =
|
||||
SSLv3
|
||||
TLSv1
|
||||
TLSv1.1
|
||||
RC4
|
||||
DES
|
||||
MD5withRSA
|
||||
DH keySize < 1024
|
||||
EC keySize < 224
|
||||
3DES_EDE_CBC
|
||||
anon
|
||||
NULL
|
||||
ECDH
|
||||
include jdk.disabled.namedCurves
|
||||
jdk.jar.disabledAlgorithms =
|
||||
MD2
|
||||
MD5
|
||||
RSA keySize < 1024
|
||||
DSA keySize < 1024
|
||||
SHA1 denyAfter 2019-01-01
|
||||
include jdk.disabled.namedCurves
|
||||
[ok] TLSv1.2 default suites -> TLSv1.2 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
|
||||
[FAIL] TLSv1.1 only -> javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)
|
||||
[ok] TLS_RSA_WITH_AES_128_GCM_SHA256 -> TLSv1.2 TLS_RSA_WITH_AES_128_GCM_SHA256
|
||||
################ JDK 17
|
||||
java.version = 17.0.21.1
|
||||
keystore.type = pkcs12
|
||||
protocols = [TLSv1.3, TLSv1.2]
|
||||
cipher suites = 31 enabled, 0 of them TLS_RSA_*
|
||||
jdk.tls.disabledAlgorithms =
|
||||
SSLv3
|
||||
TLSv1
|
||||
TLSv1.1
|
||||
DTLSv1.0
|
||||
RC4
|
||||
DES
|
||||
MD5withRSA
|
||||
DH keySize < 1024
|
||||
EC keySize < 224
|
||||
3DES_EDE_CBC
|
||||
anon
|
||||
NULL
|
||||
ECDH
|
||||
TLS_RSA_*
|
||||
rsa_pkcs1_sha1 usage HandshakeSignature
|
||||
ecdsa_sha1 usage HandshakeSignature
|
||||
dsa_sha1 usage HandshakeSignature
|
||||
jdk.jar.disabledAlgorithms =
|
||||
MD2
|
||||
MD5
|
||||
RSA keySize < 1024
|
||||
DSA keySize < 1024
|
||||
SHA1 denyAfter 2019-01-01
|
||||
[ok] TLSv1.2 default suites -> TLSv1.2 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
|
||||
[FAIL] TLSv1.1 only -> javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)
|
||||
[FAIL] TLS_RSA_WITH_AES_128_GCM_SHA256 -> javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)
|
||||
################ JDK 25
|
||||
java.version = 25.0.5.1
|
||||
keystore.type = pkcs12
|
||||
protocols = [TLSv1.3, TLSv1.2]
|
||||
cipher suites = 31 enabled, 0 of them TLS_RSA_*
|
||||
jdk.tls.disabledAlgorithms =
|
||||
SSLv3
|
||||
TLSv1
|
||||
TLSv1.1
|
||||
DTLSv1.0
|
||||
RC4
|
||||
DES
|
||||
MD5withRSA
|
||||
DH keySize < 1024
|
||||
EC keySize < 224
|
||||
3DES_EDE_CBC
|
||||
anon
|
||||
NULL
|
||||
ECDH
|
||||
TLS_RSA_*
|
||||
rsa_pkcs1_sha1 usage HandshakeSignature
|
||||
ecdsa_sha1 usage HandshakeSignature
|
||||
dsa_sha1 usage HandshakeSignature
|
||||
jdk.jar.disabledAlgorithms =
|
||||
MD2
|
||||
MD5
|
||||
RSA keySize < 1024
|
||||
DSA keySize < 1024
|
||||
SHA1 denyAfter 2019-01-01
|
||||
[ok] TLSv1.2 default suites -> TLSv1.2 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
|
||||
[FAIL] TLSv1.1 only -> javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)
|
||||
[FAIL] TLS_RSA_WITH_AES_128_GCM_SHA256 -> javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)
|
||||
@@ -0,0 +1,10 @@
|
||||
################ JDK 8: jarsigner -verify signed.jar
|
||||
|
||||
The jar will be treated as unsigned, because it is signed with a weak algorithm that is now disabled.
|
||||
|
||||
Re-run jarsigner with the -verbose option for more details.
|
||||
################ JDK 25: jarsigner -verify signed.jar
|
||||
|
||||
The jar will be treated as unsigned, because it is signed with a weak algorithm that is now disabled.
|
||||
|
||||
Re-run jarsigner with the -verbose option for more details.
|
||||
@@ -0,0 +1,25 @@
|
||||
$ java --add-opens java.base/java.util=ALL-UNNAMED -Dfile.encoding=COMPAT -Djava.locale.providers=COMPAT \
|
||||
-cp classes-built-by-jdk8:bridge-jars com.ankurm.legacy.App # JDK 25
|
||||
running on java.version 25.0.5.1
|
||||
[ok] jaxb: <order><id>A-1</id><quantity>12</quantity></order>
|
||||
WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
|
||||
WARNING: sun.misc.Unsafe::objectFieldOffset has been called by com.sun.xml.ws.model.InjectorHelper (file:./bridge/target/dependency/jaxws-rt-2.3.7.jar)
|
||||
WARNING: Please consider reporting this to the maintainers of class com.sun.xml.ws.model.InjectorHelper
|
||||
WARNING: sun.misc.Unsafe::objectFieldOffset will be removed in a future release
|
||||
Dec 03, 2026 11:43:45 PM sun.util.locale.provider.LocaleProviderAdapter <clinit>
|
||||
INFO: Invalid locale provider adapter "COMPAT" ignored.
|
||||
Dec 03, 2026 11:43:45 PM sun.util.locale.provider.LocaleProviderAdapter <clinit>
|
||||
WARNING: COMPAT locale provider has been removed
|
||||
[ok] jaxws: WSDL served
|
||||
[FAIL] base64: java.lang.NoClassDefFoundError: sun/misc/BASE64Encoder
|
||||
[ok] nashorn: BULK
|
||||
[ok] version: major=0
|
||||
[FAIL] classloader: java.lang.ClassCastException: class jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to class java.net.URLClassLoader (jdk.internal.loader.ClassLoaders$AppClassLoader and java.net.URLClassLoader are in module java.base of loader 'bootstrap')
|
||||
[ok] reflection: ArrayList capacity=32
|
||||
[FAIL] securitymanager: java.lang.UnsupportedOperationException: Setting a Security Manager is not supported
|
||||
[FAIL] thread.stop: java.lang.UnsupportedOperationException
|
||||
date(en_US) = Mar 5, 2026, 2:30\u202FPM
|
||||
date(de_DE) = Donnerstag, 5. M\u00E4rz 2026
|
||||
money(en_IN) = \u20B91,234,567.50
|
||||
defaultCharset = US-ASCII
|
||||
rupee as bytes = 1 byte(s)
|
||||
@@ -0,0 +1,22 @@
|
||||
$ java -cp target/classes:target/dependency/* com.ankurm.fixed.App # JDK 25
|
||||
running on java.version 25.0.5.1
|
||||
[ok] jaxb: <order><id>A-1</id><quantity>12</quantity></order>
|
||||
WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
|
||||
WARNING: sun.misc.Unsafe::objectFieldOffset has been called by com.sun.xml.ws.model.InjectorHelper (file:./fixed/target/dependency/jaxws-rt-4.0.5.jar)
|
||||
WARNING: Please consider reporting this to the maintainers of class com.sun.xml.ws.model.InjectorHelper
|
||||
WARNING: sun.misc.Unsafe::objectFieldOffset will be removed in a future release
|
||||
<timestamp> com.sun.xml.ws.server.MonitorBase createMOM
|
||||
INFO: Monitoring is not available, starting up without monitoring.
|
||||
[ok] jaxws: WSDL served
|
||||
[ok] base64: YW5rdXI=
|
||||
[ok] nashorn: BULK
|
||||
[ok] version: major=25
|
||||
[ok] classloader: classpath found=1
|
||||
[ok] reflection: list size=0 (capacity no longer read)
|
||||
[ok] securitymanager: child exit code 3, host still running
|
||||
[ok] thread.stop: stopped
|
||||
date(en_US) = Mar 5, 2026 2:30 PM
|
||||
date(de_DE) = Donnerstag, 5. M\u00E4rz 2026
|
||||
money(en_IN) = Rs.1,234,567.50
|
||||
charset used = UTF-8
|
||||
rupee as bytes = 3 byte(s)
|
||||
@@ -0,0 +1,131 @@
|
||||
pom.xml | 33 +++++++++++++++++++++++++--
|
||||
src/main/java/com/ankurm/legacy/App.java | 8 +++----
|
||||
src/main/java/com/ankurm/legacy/Report.java | 2 +-
|
||||
src/main/java/com/ankurm/legacy/Tokens.java | 4 ++--
|
||||
src/main/java/com/ankurm/legacy/Watchdog.java | 7 +++++-
|
||||
5 files changed, 44 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
index d0fca21..3fae6a0 100644
|
||||
--- a/pom.xml
|
||||
+++ b/pom.xml
|
||||
@@ -8,8 +8,37 @@
|
||||
<version>1.0</version>
|
||||
|
||||
<properties>
|
||||
- <maven.compiler.source>1.8</maven.compiler.source>
|
||||
- <maven.compiler.target>1.8</maven.compiler.target>
|
||||
+ <maven.compiler.source>25</maven.compiler.source>
|
||||
+ <maven.compiler.target>25</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
+ <dependencies>
|
||||
+ <dependency>
|
||||
+ <groupId>jakarta.jws</groupId>
|
||||
+ <artifactId>jakarta.jws-api</artifactId>
|
||||
+ <version>2.1.0</version>
|
||||
+ </dependency>
|
||||
+ <dependency>
|
||||
+ <groupId>jakarta.xml.bind</groupId>
|
||||
+ <artifactId>jakarta.xml.bind-api</artifactId>
|
||||
+ <version>2.3.3</version>
|
||||
+ </dependency>
|
||||
+ <dependency>
|
||||
+ <groupId>jakarta.xml.ws</groupId>
|
||||
+ <artifactId>jakarta.xml.ws-api</artifactId>
|
||||
+ <version>2.3.3</version>
|
||||
+ </dependency>
|
||||
+ <dependency>
|
||||
+ <groupId>com.sun.xml.ws</groupId>
|
||||
+ <artifactId>jaxws-rt</artifactId>
|
||||
+ <version>2.3.7</version>
|
||||
+ <scope>provided</scope>
|
||||
+ </dependency>
|
||||
+ <dependency>
|
||||
+ <groupId>org.glassfish.jaxb</groupId>
|
||||
+ <artifactId>jaxb-runtime</artifactId>
|
||||
+ <version>2.3.9</version>
|
||||
+ <scope>runtime</scope>
|
||||
+ </dependency>
|
||||
+ </dependencies>
|
||||
</project>
|
||||
diff --git a/src/main/java/com/ankurm/legacy/App.java b/src/main/java/com/ankurm/legacy/App.java
|
||||
index a3469e8..308457a 100644
|
||||
--- a/src/main/java/com/ankurm/legacy/App.java
|
||||
+++ b/src/main/java/com/ankurm/legacy/App.java
|
||||
@@ -6,7 +6,7 @@ import java.util.concurrent.Callable;
|
||||
/** Runs every feature of the legacy app and keeps going after a failure. */
|
||||
public final class App {
|
||||
public static void main(String[] args) {
|
||||
- System.out.println("running on java.version " + System.getProperty("java.version"));
|
||||
+ IO.println("running on java.version " + System.getProperty("java.version"));
|
||||
step("jaxb", () -> OrderXml.toXml(new Order("A-1", 12)));
|
||||
step("jaxws", SoapCheck::publishAndReadWsdl);
|
||||
step("base64", () -> Tokens.encode("ankur".getBytes("UTF-8")));
|
||||
@@ -16,15 +16,15 @@ public final class App {
|
||||
step("reflection", () -> "ArrayList capacity=" + Peek.capacity(new ArrayList<>(32)));
|
||||
step("securitymanager", Guard::install);
|
||||
step("thread.stop", Watchdog::kill);
|
||||
- System.out.println(Report.lines());
|
||||
+ IO.println(Report.lines());
|
||||
System.exit(0);
|
||||
}
|
||||
|
||||
private static void step(String name, Callable<Object> work) {
|
||||
try {
|
||||
- System.out.println("[ok] " + name + ": " + work.call());
|
||||
+ IO.println("[ok] " + name + ": " + work.call());
|
||||
} catch (Throwable t) {
|
||||
- System.out.println("[FAIL] " + name + ": " + t);
|
||||
+ IO.println("[FAIL] " + name + ": " + t);
|
||||
}
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/com/ankurm/legacy/Report.java b/src/main/java/com/ankurm/legacy/Report.java
|
||||
index 822000c..59a8485 100644
|
||||
--- a/src/main/java/com/ankurm/legacy/Report.java
|
||||
+++ b/src/main/java/com/ankurm/legacy/Report.java
|
||||
@@ -17,7 +17,7 @@ public final class Report {
|
||||
us.setTimeZone(c.getTimeZone());
|
||||
DateFormat de = DateFormat.getDateInstance(DateFormat.FULL, Locale.GERMANY);
|
||||
de.setTimeZone(c.getTimeZone());
|
||||
- NumberFormat inr = NumberFormat.getCurrencyInstance(new Locale("en", "IN"));
|
||||
+ NumberFormat inr = NumberFormat.getCurrencyInstance(Locale.of("en", "IN"));
|
||||
return "date(en_US) = " + escape(us.format(c.getTime())) + "\n"
|
||||
+ "date(de_DE) = " + escape(de.format(c.getTime())) + "\n"
|
||||
+ "money(en_IN) = " + escape(inr.format(1234567.5)) + "\n"
|
||||
diff --git a/src/main/java/com/ankurm/legacy/Tokens.java b/src/main/java/com/ankurm/legacy/Tokens.java
|
||||
index aff0b93..a78409d 100644
|
||||
--- a/src/main/java/com/ankurm/legacy/Tokens.java
|
||||
+++ b/src/main/java/com/ankurm/legacy/Tokens.java
|
||||
@@ -1,10 +1,10 @@
|
||||
package com.ankurm.legacy;
|
||||
|
||||
-import sun.misc.BASE64Encoder;
|
||||
+import java.util.Base64;
|
||||
|
||||
public final class Tokens {
|
||||
/** sun.misc.BASE64Encoder was never a public API; it left the JDK in Java 9. */
|
||||
public static String encode(byte[] raw) {
|
||||
- return new BASE64Encoder().encode(raw);
|
||||
+ return Base64.getEncoder().encodeToString(raw);
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/com/ankurm/legacy/Watchdog.java b/src/main/java/com/ankurm/legacy/Watchdog.java
|
||||
index d2875aa..df39ab8 100644
|
||||
--- a/src/main/java/com/ankurm/legacy/Watchdog.java
|
||||
+++ b/src/main/java/com/ankurm/legacy/Watchdog.java
|
||||
@@ -12,7 +12,12 @@ public final class Watchdog {
|
||||
worker.setDaemon(true);
|
||||
worker.start();
|
||||
Thread.sleep(100);
|
||||
- worker.stop();
|
||||
+ /*
|
||||
+ * `Thread.stop()` always throws a `new UnsupportedOperationException()` in Java 21+.
|
||||
+ * For detailed migration instructions see the migration guide available at
|
||||
+ * https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/doc-files/threadPrimitiveDeprecation.html
|
||||
+ */
|
||||
+ throw new UnsupportedOperationException();
|
||||
worker.join(1000);
|
||||
return worker.isAlive() ? "still alive" : "stopped";
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
$ mvn clean compile # JDK 25, straight after the recipe
|
||||
[ERROR] src/main/java/com/ankurm/legacy/Watchdog.java:[21,9] unreachable statement
|
||||
[INFO] BUILD FAILURE
|
||||
[ERROR] src/main/java/com/ankurm/legacy/Watchdog.java:[21,9] unreachable statement
|
||||
@@ -0,0 +1,16 @@
|
||||
$ java ... # JDK 25, recipe output plus the one hand edit, runtime classpath
|
||||
running on java.version 25.0.5.1
|
||||
[ok] jaxb: <order><id>A-1</id><quantity>12</quantity></order>
|
||||
[FAIL] jaxws: javax.xml.ws.WebServiceException: Provider com.sun.xml.internal.ws.spi.ProviderImpl not found
|
||||
[ok] base64: YW5rdXI=
|
||||
[FAIL] nashorn: java.lang.NullPointerException: Cannot invoke "javax.script.ScriptEngine.put(String, Object)" because "js" is null
|
||||
[ok] version: major=0
|
||||
[FAIL] classloader: java.lang.ClassCastException: class jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to class java.net.URLClassLoader (jdk.internal.loader.ClassLoaders$AppClassLoader and java.net.URLClassLoader are in module java.base of loader 'bootstrap')
|
||||
[FAIL] reflection: java.lang.reflect.InaccessibleObjectException: Unable to make field transient java.lang.Object[] java.util.ArrayList.elementData accessible: module java.base does not "opens java.util" to unnamed module @1517365b
|
||||
[FAIL] securitymanager: java.lang.UnsupportedOperationException: Setting a Security Manager is not supported
|
||||
[ok] thread.stop: still alive
|
||||
date(en_US) = Mar 5, 2026, 2:30\u202FPM
|
||||
date(de_DE) = Donnerstag, 5. M\u00E4rz 2026
|
||||
money(en_IN) = \u20B91,234,567.50
|
||||
defaultCharset = UTF-8
|
||||
rupee as bytes = 3 byte(s)
|
||||
@@ -0,0 +1,20 @@
|
||||
################ lombok 1.18.20 with -processorpath
|
||||
An annotation processor threw an uncaught exception.
|
||||
Caused by: java.lang.NoSuchFieldException: com.sun.tools.javac.code.TypeTag :: UNKNOWN
|
||||
################ lombok 1.18.36 with -processorpath
|
||||
An annotation processor threw an uncaught exception.
|
||||
Caused by: java.lang.NoSuchFieldException: com.sun.tools.javac.code.TypeTag :: UNKNOWN
|
||||
################ lombok 1.18.38 with -processorpath
|
||||
getter says ankur
|
||||
################ lombok 1.18.40 with -processorpath
|
||||
getter says ankur
|
||||
################ lombok 1.18.48 with -processorpath
|
||||
getter says ankur
|
||||
################ lombok 1.18.48 on the class path only (what a pom with just the dependency does)
|
||||
./probes/libs/LombokBean.java:7: error: constructor LombokBean in class LombokBean cannot be applied to given types;
|
||||
System.out.println("getter says " + new LombokBean("ankur").getName());
|
||||
^
|
||||
required: no arguments
|
||||
found: String
|
||||
reason: actual and formal argument lists differ in length
|
||||
1 error
|
||||
@@ -0,0 +1,9 @@
|
||||
################ mockito-core 2.28.2 (byte-buddy 1.9.10)
|
||||
mocked price 42
|
||||
################ mockito-core 4.11.0 (byte-buddy 1.12.19)
|
||||
mocked price 42
|
||||
################ mockito-core 5.14.2 (byte-buddy 1.15.11)
|
||||
Mockito cannot mock this class: class MockDemo$PriceService.
|
||||
Caused by: java.lang.IllegalArgumentException: Java 25 (69) is not supported by the current version of Byte Buddy which officially supports Java 24 (68) - update Byte Buddy or set net.bytebuddy.experimental as a VM property
|
||||
################ mockito-core 5.25.0 (byte-buddy 1.18.17)
|
||||
mocked price 42
|
||||
@@ -0,0 +1,8 @@
|
||||
################ asm 9.2
|
||||
Exception in thread "main" java.lang.IllegalArgumentException: Unsupported class file major version 69
|
||||
################ asm 9.7.1
|
||||
Exception in thread "main" java.lang.IllegalArgumentException: Unsupported class file major version 69
|
||||
################ asm 9.8
|
||||
parsed AsmRead
|
||||
################ asm 9.11.1
|
||||
parsed AsmRead
|
||||
@@ -0,0 +1,9 @@
|
||||
################ jacoco agent 0.8.11
|
||||
Caused by: java.lang.IllegalArgumentException: Unsupported class file major version 69
|
||||
hello from a Java 25 class
|
||||
################ jacoco agent 0.8.13
|
||||
hello from a Java 25 class
|
||||
################ jacoco agent 0.8.14
|
||||
hello from a Java 25 class
|
||||
################ jacoco agent 0.8.16
|
||||
hello from a Java 25 class
|
||||
@@ -0,0 +1,6 @@
|
||||
################ Spring Boot 2.7.18 on JDK 25, application compiled with --release 8
|
||||
context started
|
||||
################ Spring Boot 2.7.18 on JDK 25, application compiled with --release 25
|
||||
2026-12-03 23:44:39.780 WARN 22340 --- [ main] s.c.a.AnnotationConfigApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to rea
|
||||
org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: file [./build/libs/bt/app/DemoApp.class]; nested exception is org.springframework.core.NestedIOException: ASM ClassReader failed to parse class file - pro
|
||||
Caused by: org.springframework.core.NestedIOException: ASM ClassReader failed to parse class file - probably due to a new Java class file version that isn't supported yet: file [./build/libs/bt/app/DemoApp.class]; nested exception is java.lang.IllegalArgumentE
|
||||
@@ -0,0 +1,11 @@
|
||||
################ maven.compiler.source/target=1.7, JDK 25
|
||||
[ERROR] Source option 7 is no longer supported. Use 8 or later.
|
||||
[ERROR] Target option 7 is no longer supported. Use 8 or later.
|
||||
[INFO] BUILD FAILURE
|
||||
[ERROR] Source option 7 is no longer supported. Use 8 or later.
|
||||
[ERROR] Target option 7 is no longer supported. Use 8 or later.
|
||||
################ maven.compiler.source/target=1.8, JDK 25
|
||||
[WARNING] source value 8 is obsolete and will be removed in a future release
|
||||
[WARNING] target value 8 is obsolete and will be removed in a future release
|
||||
[WARNING] To suppress warnings about obsolete options, use -Xlint:-options.
|
||||
[INFO] BUILD SUCCESS
|
||||
@@ -0,0 +1,12 @@
|
||||
$ gradle compileJava # Gradle 8.14.3, JAVA_HOME = JDK 25
|
||||
exit status: 1
|
||||
FAILURE: Build failed with an exception.
|
||||
* What went wrong:
|
||||
BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 69
|
||||
> Unsupported class file major version 69
|
||||
* Try:
|
||||
> Run with --stacktrace option to get the stack trace.
|
||||
> Run with --info or --debug option to get more log output.
|
||||
> Run with --scan to get full insights.
|
||||
> Get more help at https://help.gradle.org.
|
||||
BUILD FAILED in 4s
|
||||
@@ -0,0 +1,21 @@
|
||||
$ java JavaxMap.java # JDK 25
|
||||
exported javax.* packages in this JDK: 99
|
||||
javax.sql in the JDK, keep javax
|
||||
javax.crypto in the JDK, keep javax
|
||||
javax.net.ssl in the JDK, keep javax
|
||||
javax.naming in the JDK, keep javax
|
||||
javax.management in the JDK, keep javax
|
||||
javax.script in the JDK, keep javax
|
||||
javax.swing in the JDK, keep javax
|
||||
javax.xml.parsers in the JDK, keep javax
|
||||
javax.transaction.xa in the JDK, keep javax
|
||||
javax.annotation.processing in the JDK, keep javax
|
||||
javax.xml.bind not in the JDK
|
||||
javax.xml.ws not in the JDK
|
||||
javax.jws not in the JDK
|
||||
javax.activation not in the JDK
|
||||
javax.annotation not in the JDK
|
||||
javax.transaction not in the JDK
|
||||
javax.servlet not in the JDK
|
||||
javax.persistence not in the JDK
|
||||
javax.validation not in the JDK
|
||||
@@ -0,0 +1,6 @@
|
||||
$ java Mixed # javax annotations on the bean, jakarta JAXB runtime
|
||||
Exception in thread "main" jakarta.xml.bind.MarshalException
|
||||
- with linked exception:
|
||||
[com.sun.istack.SAXException2: unable to marshal type "Mixed$Order" as an element because it is missing an @XmlRootElement annotation]
|
||||
Caused by: com.sun.istack.SAXException2: unable to marshal type "Mixed$Order" as an element because it is missing an @XmlRootElement annotation
|
||||
... 3 more
|
||||
@@ -0,0 +1,16 @@
|
||||
$ java -cp classes-built-by-jdk8:bridge-jars-without-nashorn com.ankurm.legacy.App # JDK 8
|
||||
running on java.version 1.8.0_514
|
||||
[ok] jaxb: <order><id>A-1</id><quantity>12</quantity></order>
|
||||
[ok] jaxws: WSDL served
|
||||
[ok] base64: YW5rdXI=
|
||||
[ok] nashorn: BULK
|
||||
[ok] version: major=8
|
||||
[ok] classloader: classpath found=1
|
||||
[ok] reflection: ArrayList capacity=32
|
||||
[ok] securitymanager: blocked: plugins may not exit the JVM
|
||||
[ok] thread.stop: stopped
|
||||
date(en_US) = Mar 5, 2026 2:30 PM
|
||||
date(de_DE) = Donnerstag, 5. M\u00E4rz 2026
|
||||
money(en_IN) = Rs.1,234,567.50
|
||||
defaultCharset = US-ASCII
|
||||
rupee as bytes = 1 byte(s)
|
||||
Reference in New Issue
Block a user