Feature #9686
move FWD to Java 25
100%
Related issues
History
#1 Updated by Greg Shah over 1 year ago
- Related to Feature #9685: move FWD to Java 21 added
#2 Updated by Greg Shah over 1 year ago
- Related to Feature #6692: move FWD to Java 17 added
#3 Updated by Greg Shah over 1 year ago
- Related to Support #5567: move FWD to Java 11 added
#4 Updated by Greg Shah over 1 year ago
- Related to Feature #9684: migrate from libffi (and C heap functions) to the built-in JDK FFM support added
#5 Updated by Greg Shah over 1 year ago
This can't happen until at least September 2025 (when JDK 25 is expected to be released).
#6 Updated by Alexandru Lungu 10 months ago
This can't happen until at least September 2025 (when JDK 25 is expected to be released).
The future is here now :)
#7 Updated by Artur Școlnic 10 months ago
Looking forward to Compact Object Headers, Ahead-of-Time Method Profiling, Improved Garbage Collection and Virtual Threads. I think this is a great update performance-wise.
#8 Updated by Teodor Gorghe 8 months ago
I have tried to run a customer application FWD server with JDK 25.
The main issue that I have encountered first are these ones:
[Fatal Error] :165368:98: JAXP00010003: The length of entity "[xml]" is "100,001" that exceeds the "100,000" limit set by "jdk.xml.maxGeneralEntitySizeLimit" [Fatal Error] :165368:98: JAXP00010004: The accumulated size of entities is "100,001" that exceeded the "100,000" limit set by "jaxp.properties"
This causes some NPEs on ASTs.
Currently, to solve it, I have added -Djdk.xml.maxGeneralEntitySizeLimit=0 -Djdk.xml.totalEntitySizeLimit=0 into JVM args, which made the FWD server and appservers to launch without any other error.
#9 Updated by Teodor Gorghe 7 months ago
- File 9686a.patch
added
I have made some performance testing with a customer application and with hotel_gui project, to test if AOT optimizes lambda function calls (I don't see any noticeable improvement for now).
In order to compile FWD with Java 25, I have used the patch attached in this message.
#10 Updated by Alexandru Lungu 7 months ago
- Related to Feature #11004: Optimizing Java Reflection Method.invoke added
#13 Updated by Teodor Gorghe 6 months ago
- % Done changed from 0 to 90
Created task branch 9686a.
Committed revision 16265 in task branch 9686a:
- Added compatibility for JRE25.
Hotel GUI changes:
=== modified file 'deploy/client/client.sh'
--- old/deploy/client/client.sh 2025-10-13 21:26:26 +0000
+++ new/deploy/client/client.sh 2026-01-23 11:44:49 +0000
@@ -214,6 +214,11 @@
# run the FWD client
java_args="$srvr $dump $wb $dtxt $lpath $cpath"
+
+if [ $jver -ge 240 ]; then
+ java_args+=" --enable-native-access=ALL-UNNAMED"
+fi
+
client_driver_args="$kpasswd $tpasswd $token $host $nio $port $client_driver_type $cfg $batch $procedure $params $remainder"
cmd="$prog $java_args com.goldencode.p2j.main.ClientDriver $client_driver_args"
if [ "$test" == "true" ]; then
=== modified file 'deploy/server/server.sh'
--- old/deploy/server/server.sh 2025-06-24 00:06:03 +0000
+++ new/deploy/server/server.sh 2026-01-23 11:41:46 +0000
@@ -285,6 +285,10 @@
open_api="--add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.naming/javax.naming=ALL-UNNAMED --add-opens java.base/java.net=ALL-UNNAMED"
fi
+if [ $jver -gt 240 ]; then
+ open_api+="--enable-native-access=ALL-UNNAMED"
+fi
+
# final arg prep
cpath="-classpath $cpath"
dport=$((2080 + $instance))
@@ -294,7 +298,7 @@
if [ "$debug" == true ]; then
[ -f "/.dockerenv" ] && daddress="0.0.0.0:${dport}" || daddress="${dport}"
- dtxt="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=${daddress},server=y,suspend=${suspend}"
+ dtxt="-agentlib:jdwp=transport=dt_socket,server=y,suspend=${suspend},address=${daddress}"
fi
perf="-XX:GCTimeRatio=19 -XX:MaxTenuringThreshold=7 -XX:StringTableSize=1000003"
FWD compiles with JDK 25 and Hotel GUI is now fully working.
#14 Updated by Roger Borrello 6 months ago
Teodor Gorghe wrote:
Created task branch 9686a.
Committed revision 16265 in task branch 9686a:
- Added compatibility for JRE25.Hotel GUI changes:
[...]
FWD compiles with JDK 25 and Hotel GUI is now fully working.
Are the Hotel GUI changes backward compatible? If so, they could be added to the current project
#15 Updated by Teodor Gorghe 6 months ago
Yes, they are.
#16 Updated by Teodor Gorghe 6 months ago
Committed revision 422 on hotel_gui project:
- Adjusted client.sh and server.sh to be compatible with Java 25.
#17 Updated by Teodor Gorghe 6 months ago
Committed revision 16266 in task branch 9686a:
- Additional fixes.
- Fix for database import when XML files exceed default JDK 24+ security limits.
- Changed JVM debug parameters in spawn.c because -Xdebug and -Xnoagent are no longer supported. This should be compatible with JDK 1.8+.
Committed revision 16267 in task branch 9686a:
- JVM Debug changes on winspawn.c
#18 Updated by Teodor Gorghe 6 months ago
- Related to Feature #11169: Running Ahead-of-time compilation (AOT) on FWD added
#19 Updated by Teodor Gorghe 5 months ago
- Status changed from New to WIP
I have done some more tests and I have noticed that there is an issue with the testcases harness. This also happens on JDK 21.
The problem is that jsch is no longer maintained and is partial compatible with JDK 21: com.jcraft.jsch.JSchException: Algorithm negotiation fail on.
Luckily, there is a continuation of this project, https://github.com/mwiede/jsch, which supports rsa-sha2-256 and rsa-sha2-512, needed by the algorithm handshake.
I shall update the harness to include the newest version of jsch fork?
#20 Updated by Teodor Gorghe 5 months ago
- Status changed from WIP to Review
- % Done changed from 90 to 100
- reviewer Greg Shah added
#21 Updated by Teodor Gorghe 5 months ago
Created harness task branch 9686a.
Committed revision 40 on harness task branch 9686a:
- Updated jsch dependency to support modern SSH encryption algorithm.
#23 Updated by Teodor Gorghe 5 months ago
yes
#26 Updated by Teodor Gorghe 4 months ago
Branch 9686a was merged into harness trunk as rev. 41 and archived.
#27 Updated by Eugenie Lyzenko 4 months ago
Greg Shah wrote:
Eugenie: Please review the changes in branch FWD 9686a.
Teodor,
What are the changes in 9686a that related to Java 25? I tried to look at 16265 - 16267 as noted in this task above but they seems too old.
May be the correct are: 16365 - 16367?
#28 Updated by Eugenie Lyzenko 4 months ago
Review result for 16365 - 16367.
My only question: have you tested new debug option for spawn.c? Is it confirmed as working?
#29 Updated by Teodor Gorghe 4 months ago
Eugenie Lyzenko wrote:
Let me explain.Greg Shah wrote:
Eugenie: Please review the changes in branch FWD 9686a.
Teodor,
What are the changes in
9686athat related to Java 25? I tried to look at 16265 - 16267 as noted in this task above but they seems too old.May be the correct are: 16365 - 16367?
Prior the changes from
9686a (with latest gradle version upgrade),
- FWD did not fully compile on JDK 25, because the new
java.lang.IOwas introduced, an alternative API for replacingSystem.out/System.in.
Because of that, in our code, there was several conflicts with different.IOAPIs which we are using. To fix this, I have addedimport ...IO, which is a clarification for the compiler that theIO.copyor any other API prior to JDK 25, comes from correct package. I could have just modified anyIOusage, but it is more clean to just add theimportline. - AspectJ version 1.9.23 is not compatible with JDK25, and I have upgraded it to 1.9.25 (it is no longer the latest version).
- Starting with JDK 24+, the default XML security options like
jdk.xml.maxGeneralEntitySizeLimit,jdk.xml.maxParameterEntitySizeLimithas been changed to some lower values, which makes FWD to fail when the XML is huge (like the big ASTs from the conversion). I have bumped these limits back to their old values, prior JDK 24. - Starting with JDK 21+,
-Xdebug -Xnoagenthas became deprecated and marked as being removed on later versions. For JDK 25, using these options were removed and you need to use the JDK 1.9+ debug arguments.
About spawn.c, I have tested it, and it is working. I have already updated the hotel_gui project because we no longer support JDK 1.4.
Yes, the correct changes are between 16365 - 16367, I have 1 digit was wrong, my bad.
#31 Updated by Teodor Gorghe 4 months ago
All the changes should be compatible with JDK17.
#33 Updated by Teodor Gorghe 4 months ago
Yes, these options were introduced long ago, since JDK 1.5.
#34 Updated by Teodor Gorghe 4 months ago
The hotel_gui already has the new JDK debug options.
#35 Updated by Roger Borrello 26 days ago
I've added JDK25 to the Docker development images. These are being pushed to the goldencode Docker Hub for use with dbash.sh. There is a minor update to dbash.sh, but that is only in usage text, because adding the --jdk25 option works fine, it's just not in the usage:
dbash.sh -l --omit-ports --jdk25 Running: docker run -e DBASH=true --name basedev_ubuntu_2404_latest_container -h basedev_ubuntu_2404_latest_container --rm -it -v /home/rfb:/home/rfb -v /etc/passwd:/etc/passwd:ro -v /etc/group:/etc/group:ro -v /etc/shadow:/etc/shadow:ro -v /etc/sudoers:/etc/sudoers --pull never -e JDK_VERSION=25 -e HOST_UID=1000 -e HOST_GID=1000 -e HOME=/home/rfb -e USER=rfb -w /home/rfb/clients/bms/cact_docker basedev_ubuntu_24.04:latest rfb -- bash Setting up sudo permissions for rfb Warning: Running as root. This will affect all users. Switched to JDK 25 rfb@basedev_ubuntu_2404_latest_container:~/clients/bms/cact_docker$ java -version openjdk version "25.0.3" 2026-04-21 OpenJDK Runtime Environment (build 25.0.3+9-2-24.04.2-Ubuntu) OpenJDK 64-Bit Server VM (build 25.0.3+9-2-24.04.2-Ubuntu, mixed mode, sharing)
I wasn't using the right branch for a test... but Show trunk output anyway