Warning when FlatLaf is used on the Mac
See original GitHub issueJust 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:
- Created 4 years ago
- Comments:7
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The list already exists 😉 https://github.com/JFormDesigner/FlatLaf#projects-using-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:
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,