Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Illegal reflective access #946

Open
rjahn opened this issue Dec 19, 2024 · 2 comments
Open

Illegal reflective access #946

rjahn opened this issue Dec 19, 2024 · 2 comments

Comments

@rjahn
Copy link

rjahn commented Dec 19, 2024

Got:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.formdev.flatlaf.ui.FlatFileChooserUI$FlatShortcutsPanel (file:/C:/VisionX/lib/flatlaf-3.4.jar) to method sun.awt.shell.Win32ShellFolder2.getIcon(boolean)
WARNING: Please consider reporting this to the maintainers of com.formdev.flatlaf.ui.FlatFileChooserUI$FlatShortcutsPanel
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

Should work with #572 (comment), but maybe it's possible to solve it without reflective access.

@DevCharly
Copy link
Collaborator

...but maybe it's possible to solve it without reflective access

Any idea?

@rjahn
Copy link
Author

rjahn commented Dec 19, 2024

Not without research 😜 and I didn't check your source file.

Google found: https://stackoverflow.com/questions/76845425/why-the-method-geticon-in-class-shellfolder-in-jdk17-always-returns-null

but it's getFileIcon

I'm on macOS and I have no IDE on my windows VM, so I can't search for references of this method easily. Tried to search in source: https://github.com/AdoptOpenJDK/openjdk-jdk11u/blob/master/src/java.desktop/windows/classes/sun/awt/shell/Win32ShellFolder2.java

but.... no.
If there's no public method for accessing the shell folder, we need reflective access.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants