this code runs on Lucee 5 with java 1.8 on trycf.com (had error saving??)
<cfscript>
Color = createObject("java","java.awt.Color");
bg = Color.init(JavaCast("int",255),JavaCast("int",255),JavaCast("int",255),JavaCast("int",255));
writedump(var="#server.java.version#", label="lucee java");
writedump(var="#bg.toString()#", label="bg");
</cfscript>
But on my server with Java 11.0.8 I get this error: Could not initialize class java.awt.Color
The construct seems to be the same according to this doc
Color (Java SE 11 & JDK 11 )
Anyone know what is going on here?
Servlet Container |
WildFly / Undertow - 2.0.27.Final |
Java |
11.0.8 (AdoptOpenJDK) 64bit |
Host Name |
10.11.8.18 |
OS |
Linux (4.4.59+) 64bit |
Architecture |
64bit |
works for me on windows.

is your linux server headless? [LDEV-2619] - Lucee
can you also post the first 10 lines of the stacktrace?
This is running on a Synology box (linux) with CommandBox 5 running on Docker
lucee.runtime.exp.NativeException: Could not initialize class java.awt.Color at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source) at lucee.runtime.reflection.pairs.ConstructorInstance.invoke(ConstructorInstance.java:53) at lucee.runtime.reflection.Reflector.callConstructor(Reflector.java:835) at lucee.runtime.java.JavaObject.init(JavaObject.java:326) at lucee.runtime.java.JavaObject.call(JavaObject.java:251) at lucee.runtime.java.JavaObject.call(JavaObject.java:287) at lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:785) at lucee.runtime.PageContextImpl.getFunction(PageContextImpl.java:1709) at com.spreadsheetlibrary.spreadsheet_cfc$cf$2n.udfCallh(/com/spreadsheetLibrary/Spreadsheet.cfc:2861) at com.spreadsheetlibrary.spreadsheet_cfc$cf$2n.udfCall(/com/spreadsheetLibrary/Spreadsheet.cfc) at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106) at lucee.runtime.type.UDFImpl._call(UDFImpl.java:342) at lucee.runtime.type.UDFImpl.call(UDFImpl.java:215) at lucee.runtime.type.scope.UndefinedImpl.call(UndefinedImpl.java:779) at lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:785) at lucee.runtime.PageContextImpl.getFunction(PageContextImpl.java:1709) at com.spreadsheetlibrary.spreadsheet_cfc$cf$2n.udfCalle(/com/spreadsheetLibrary/Spreadsheet.cfc:2120) at com.spreadsheetlibrary.spreadsheet_cfc$cf$2n.udfCall(/com/spreadsheetLibrary/Spreadsheet.cfc) at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106) at lucee.runtime.type.UDFImpl._call(UDFImpl.java:342) at lucee.runtime.type.UDFImpl.call(UDFImpl.java:215) at lucee.runtime.type.scope.UndefinedImpl.call(UndefinedImpl.java:779) at lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:785) at lucee.runtime.PageContextImpl.getFunction(PageContextImpl.java:1709) at com.spreadsheetlibrary.spreadsheet_cfc$cf$2n.udfCalld(/com/spreadsheetLibrary/Spreadsheet.cfc:2054) at com.spreads
which version of Lucee and the image extension?
can you test the latest stable or snapshot?
I had to roll back to this version to get cfmail to work.
I will upgrade tomorrow and test…
same issue with 5.3.7.34-RC