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

Register JNI and Reflection classes for AWT/Swing on Linux #5466

Conversation

AlexanderScherbatiy
Copy link
Contributor

GraalVM provides tracing agent which allows to find JNI and Reflection classes used by an application and store them in configuration files. Using the tracing agent with UI application requires checking non obvious use cases to cover different application code paths: Drag & Drop, file choosers, input dialogs, key strokes, Look & Feels.

Key strokes provide the most vivid use case. AWTKeyStroke.getVKValue(String) method uses reflection to get a key code for for the requested KeyEvent.VK_* string value. It requires pressing all keys used as key strokes in the application during the tracing agent usage.

The proposed fix registers common classes used by AWT/Swing application on Linux System.

L&F UI classes are registered only for Basic and Metal L&Fs as UIManager.setLookAndFeel(String) method directly sets MetalLookAndFeel class. It is necessary to use the tracing agent when an application uses GTK, Nimbus, and other Look & Feels.

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Required At least one contributor does not have an approved Oracle Contributor Agreement. label Nov 18, 2022
@oracle-contributor-agreement
Copy link

Thank you for your pull request and welcome to our community! To contribute, please sign the Oracle Contributor Agreement (OCA).
The following contributors of this PR have not signed the OCA:

To sign the OCA, please create an Oracle account and sign the OCA in Oracle's Contributor Agreement Application.

When signing the OCA, please provide your GitHub username. After signing the OCA and getting an OCA approval from Oracle, this PR will be automatically updated.

If you are an Oracle employee, please make sure that you are a member of the main Oracle GitHub organization, and your membership in this organization is public.

@zakkak
Copy link
Collaborator

zakkak commented Nov 18, 2022

Related to #4921

@alina-yur
Copy link
Member

Hi @AlexanderScherbatiy, sorry for the delay on this PR. Your OCA submission is now approved. Can you please resubmit this PR using your company email so the OCA checks pass? Thank you!

@AlexanderScherbatiy
Copy link
Contributor Author

The PR is resubmitted as #5870

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Required At least one contributor does not have an approved Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants