I am running CF2023 with JDK-21 using commandbox. ...
# cfml-general
a
I am running CF2023 with JDK-21 using commandbox. I am getting the following error (see attached screenshot), which doesn't occur for me on prior versions of CF/Java. I added the following to my server.json which my understanding is this should be added by commandbox to the jvm.config file and I had assumed this would have stop the error, but it did not. Any advice/help would be appreciated: "jvm":{ "minHeapSize":"${MINHEAP:1G}", "heapSize":"${MAXHEAP:2G}", "args":[ "-Dcoldfusion.datemask.useDasdayofmonth=true", "-Dcoldfusion.xml.allowPathCharacters=true", "--add-opens=java.desktop/com.sun.awt=ALL-UNNAMED" ], "javaHome":"C:\\Program Files\\Java\\jdk-21" },
r
The support matrix from Adobe only lists Java 17 as supported so I would recommend trying that first.
d
Your issue is more than likely being caused by using an unsupported Java version. Alternatively, you may have disabled access to Java objects in the CF administrator. If that is not disabled then it is probably the Java version. You can find the support matrix here.https://coldfusion.adobe.com/2023/11/oracle-java-support-for-adobe-coldfusion-2021-2023/
j
We have tried with Java 17.0.1 thru 21 with commandbox and still get the errors. If I change to 11.0.11 with commandbox CF2023 setup, it works fine. The full install of CF2023 works with 17.0.6.
With 17.0.6 I get the following when dumping out just printers1 object.
if I add the getPrinters() to the object I get the following
Java 11.0.11 & CB
a
Yes, still not working on 17.0.6 as Jamie indicated. Interestingly enough the com.sun.awt is not in the list of Picked up JDK_JAVA_OPTIONS: that displays when spinning up the server via commandbox, even if I put that into the jvm arguments as listed above. Does anyone know how I can get this in place, I really don't want to have to use Java 11, to circumvent this issue.
User error... "args":[ "--add-opens=java.desktop/sun.awt=ALL-UNNAMED", "-Dcoldfusion.datemask.useDasdayofmonth=true", "-Dcoldfusion.xml.allowPathCharacters=true" ], I originally used java.base/com.sun.awt=ALL-UNNAMED which was incorrect. Adding the correct syntax/string fixed the issue.