question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Warning when FlatLaf is used on the Mac

See original GitHub issue

Just to inform you.

When I select FlatLaf 0.26 for my application on a Mac, latest macOS Catalina, latest Java 13.0.2, it works and looks fine, but I get this warning printed on the Terminal I’ve used to start my application:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.formdev.flatlaf.FlatLaf (file:/Users/hussein/Library/Application%20Support/XMLmind/XMLEditor9/addon/flatlaf/flatlaf.jar) to constructor com.apple.laf.AquaLookAndFeel()
WARNING: Please consider reporting this to the maintainers of com.formdev.flatlaf.FlatLaf
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

After looking at your code, this warning may be caused by this excerpt from com/formdev/flatlaf/FlatLaf.java:

	@Override
	public void initialize() {
		getBase().initialize();

		super.initialize();
...

	/**
	 * Get/create base LaF. This is used to grab base UI defaults from different LaFs.
	 * E.g. on Mac from system dependent LaF, otherwise from Metal LaF.
	 */
	private BasicLookAndFeel getBase() {
		if( base == null ) {
			if( SystemInfo.IS_MAC ) {
				// use Mac Aqua LaF as base
				String aquaLafClassName = "com.apple.laf.AquaLookAndFeel";
				try {
					base = (BasicLookAndFeel) Class.forName( aquaLafClassName ).newInstance();
				} catch( Exception ex ) {
					LOG.log( Level.SEVERE, "FlatLaf: Failed to initialize base look and feel '" + aquaLafClassName + "'.", ex );
					throw new IllegalStateException();
				}
			} else
				base = new MetalLookAndFeel();
		}
		return base;
	}

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
DevCharlycommented, Feb 21, 2020
0reactions
hshafiecommented, Feb 21, 2020

@hshafie that’s great! Please let me know when you release a version that uses FlatLaf.

Hello,

XMLmind XML Editor v9.3, https://www.xmlmind.com/xmleditor/, to be released in the next few weeks, will propose a new add-on which will make it easy for a user to try and then probably adopt the FlatLaf Look&Feel.

This add-on will be introduced as follows:

New add-on called “FlatLaf Look and Feel” containing a clean, simple and elegant “Look & Feel” for XMLmind XML Editor. Many thanks to FormDev Software for having implemented such a nice, fast and reliable Look & Feel for Java Swing desktop applications!

This add-on is not installed by default. Feel free to download and install it using “Options|Install Add-ons”. Once this is done, please select “FlatLight” (light theme) or “FlatDark” (dark theme) from Options|Preferences, General section, Style combobox, then restart XMLmind XML Editor as instructed.

This add-on is supported on all platforms. It is especially nice to have on Linux where the default “cross-platform”, Look & Feel (called “Metal”) looks rather outdated. It may also interest Windows and Mac users who want a dark theme or simply prefer how FlatLaf looks compared to the default, “system”, Look & Feel.

Feel free to add XMLmind XML Editor to your list of projects using FlatLaf any time you want.

Many thanks for your hard work. Much appreciated.

Cheers,

Read more comments on GitHub >

github_iconTop Results From Across the Web

FlatLaf/CHANGELOG.md at main - GitHub
A simple UI defaults inspector that shows a window with all UI defaults used in current theme (look and feel). Made disabled text...
Read more >
Properties Files | FlatLaf - Flat Look and Feel - JFormDesigner
Properties files are used in FlatLaf to define UI defaults. ... is preceded by [win] , [mac] or [linux] , then its value...
Read more >
Java questions/thoughts - #22 by trishaduke - General Programming ...
You can also use flatlaf the look and feelfrom formdev software or any other. Swing is really flexible. Your first showed example was...
Read more >
MacOS replace deprecated installer[NEED TEST] - Spark Dev
We must use the single bundle archive, but we need to test this change on Mac OS X and modern MacOS to maintain...
Read more >
[JDK-8274346] Support for additional content in an app-image.
WARNING ITMS-90889: ""Cannot be used with TestFlight because the bundle at “Test.app” is missing a ... --mac-package-identifier "com.formdev.flatlaf.demo.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found