Unfortunately the bundled Java Version 17 with Col...
# lucee
h
Unfortunately the bundled Java Version 17 with ColdFusion2023 causes an issue in our function to read Java properties files.
Copy code
// create java objects to read bundle
		var oI18N = CreateObject("java", "java.util.PropertyResourceBundle");
		var oFis = CreateObject("java", "java.io.FileInputStream");

		sResourceFilePath = arguments.sBundlePath & arguments.sBundle & "_" & variables.sLang & ".properties";

		if (fileExists(sResourceFilePath)) {
			bIsOk=true;
			oFis.init(sResourceFilePath);
			oI18N.init(oFis);
***			keys=oI18N.getKeys();
            ...
		}
Error: java.lang.reflect.InaccessibleObjectException: Unable to make public sun.util.ResourceBundleEnumeration(java.util.Set,java.util.Enumeration) accessible: module java.base does not "exports sun.util" to unnamed module @62b6c045 I checked also @bdw429s https://www.forgebox.io/view/propertyFile which has another issue: Object Instantiation Exception. Class not found: org.apache.commons.io.input.BOMInputStream The error occurred in D/projekte cf/PropertyFile.cfc line 28 Called from D/projekte cf/test propertyfile.cfm line 2 Called from D/projekte cf/PropertyFile.cfc line 28 Called from D/projekte cf/test propertyfile.cfm line 2
Copy code
26 : 		setPath( arguments.path );
27 : 		var fis = CreateObject( 'java', 'java.io.FileInputStream' ).init( path );
28 : 		var BOMfis = CreateObject( 'java', 'org.apache.commons.io.input.BOMInputStream' ).init( fis );
29 : 		var propertyFile = getJavaPropertyFile();
30 : 		propertyFile.load( BOMfis );
An ugly alternative would be to use ColdFusion, see https://cflib.org/udf/readPropertiesFile But I guess there must be a better way to load properties files with Adobe ColdFusion 2023 and Java 17?
z
this is the lucee channel?
h
Oops
b
I replied to your thread in the Adobe channel
👍 1