Problem to install on linux

Hello ! sorry it’s not the good section but i have a friend ( who dont speak english) who don’t can to install Vassal on LInux. He has this problem code.

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by VASSAL.tools.image.ImageIOImageLoader (file:/home/nico/VASSAL-3.2.17/lib/Vengine.jar) to field sun.java2d.cmm.ProfileDeferralMgr.deferring
WARNING: Please consider reporting this to the maintainers of VASSAL.tools.image.ImageIOImageLoader
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

Anybody have the same problem ? Which answer i can to give him ?

Thank you very much ! :slight_smile:

That’s not a fatal error. We’d need to see the rest of the console output and errorLog to offer help.

Well,
I saw that in my logs as well.

‘Culprit’ : VASSAL.tools.image.ImageIOImageLoader
‘Bad Access’ : sun.java2d.cmm.ProfileDeferralMgr

Situation:
Looking at the Class VASSAL.tools.image.ImageIOImageLoader it seems to consist of a series of Bugfixes / Workarounds Java Related issues. Some dating back to Java 5 (So something 15 years old).
And the issue is confirmed with Java 9 as well.

Dev Link
As the package names starts with ‘sun’ or ‘oracle’ this class does not even officially exist.

Quick Fix suggestion: I would wrap the given calls in a bit of Reflection-Magic to deal with issues more gracefully and allow compiling the code with ANY JDK instead of an official Oracle JDK.

Long run option: JAI as of stackoverflow.com/questions/299 … jpeg-files

That snipplet may provide a convenient means to resolve the issue:

public class ImageIOImageLoader implements ImageLoader {
	// ...  
	static {
		String CLASS_NAME = "sun.java2d.cmm.ProfileDeferralMgr";
		String STATIC_FIELD_DEFERRING = "deferring";
		Boolean TARGET_VALUE = Boolean.FALSE;
		try {
			Class<?> PROFILE_DEFERRAL_MGR_CLASS = Class.forName(CLASS_NAME);
			Field deferring = PROFILE_DEFERRAL_MGR_CLASS.getField(STATIC_FIELD_DEFERRING);
			deferring.set(PROFILE_DEFERRAL_MGR_CLASS, TARGET_VALUE);
		} catch (ClassNotFoundException e) {
			LOG.debug("Patching JDK Bug 6986863 in class {} skipped : {}", CLASS_NAME, e.getClass().getSimpleName());
		} catch (NoSuchFieldException e) {
			LOG.warn("Patching JDK Bug 6986863 in class {} skipped: {}", CLASS_NAME, e.getClass().getSimpleName());
		} catch ( SecurityException | IllegalArgumentException | IllegalAccessException e) {
			LOG.warn("Patching JDK Bug 6986863 in class {} failed : {}", CLASS_NAME, e.getMessage(), e);
		}
	}
}

Thus spake AlisterMcLane via messages:

Well,
I saw that in my logs as well.

‘Culprit’ : VASSAL.tools.image.ImageIOImageLoader
‘Bad Access’ : sun.java2d.cmm.ProfileDeferralMgr

Situation:
Looking at the Class VASSAL.tools.image.ImageIOImageLoader it seems to
consist of a series of Bugfixes / Workarounds Java Related issues. Some
dating back to Java 5 (So something 15 years old).
And the issue is confirmed with Java 9 as well.

Dev Link
As the package names starts with ‘sun’ or ‘oracle’ this class does not
even officially exist.

Quick Fix suggestion: I would wrap the given calls in a bit of
Reflection-Magic to deal with issues more gracefully and allow compiling
the code with ANY JDK instead of an official Oracle JDK.

I fixed the reflection issue in trunk@9260 in October. Reflection is no
longer needed for access to sun.java2d.cmm.ProfileDeferralMgr because
it exists from Java 9 onward, and for VASSAL 3.3 we will start bundling
a JRE with VASSAL so we can be sure that class is present.

I’m not worried about compiling with anything other than OpenJDK nor
about JAI as we’re moving away from Java for V4.


J.

Which version of the distribution is better for a beginner?