-
Notifications
You must be signed in to change notification settings - Fork 155
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
Native Library jawt.dll already loaded in another classloader #317
Comments
Original comment by Simon Haisz (Bitbucket: sihaisz, GitHub: sihaisz). This issue happens because another classloader already loaded jawt.dll for some purpose. We ran into this issue because the Java Access Bridge (used for accessibility) loaded the dll first. Likely IDEA itself that is doing it. This is the work around that we ended up using:
Something like this should probably be promoted to master. We didn't create a PR because we have other changes around initialization that only apply to our application. |
Original comment by Nol Moonen (Bitbucket: nolmoonen, GitHub: nolmoonen). Hello, I am having the exact same issue with IDEA. However, I stumbled upon a way to check if the library is loaded, without relying on this exception message flow. It basically comes down to: try {
java.lang.reflect.Field libraryNames;
libraryNames = ClassLoader.class.getDeclaredField("loadedLibraryNames");
libraryNames.setAccessible(true);
Vector<String> libraries = (Vector<String>) libraryNames.get(ClassLoader.getSystemClassLoader());
if (!libraries.contains("jawt")) {
System.loadLibrary("jawt");
}
} catch (NoSuchFieldException | IllegalAccessException e) {
e.printStackTrace();
} I am quite unsure whether this is something you'd want on the master branch, since it seems like a hack. However, it is still a serious issue to me. Should I make a pull request for this? |
Original comment by Max Senft (Bitbucket: Max Senft). Hmhm, as there’s a pull request (https://bitbucket.org/chromiumembedded/java-cef/pull-requests/39/fix-loading-already-loaded-native-library/diff) now, I wonder if this is actually the correct solution. It looks more like a workaround to me, as the Java documentation states that subsequent calls of I tested this problem by myself, by loading the "jawt" library immediately in |
I believe applications should now be able to work around this issue with the SystemBootstrap class added in fbfa9202 (bb). |
If SystemBootstrap is insufficient we can re-open. |
|
Original report by Leah (Bitbucket: Leah, GitHub: Leah).
I'm trying to write a plugin for IDEA which integrates chromium as a webview, not sure if this error is on me, but any help would be appreciated
It's loaded from here
https://bitbucket.org/chromiumembedded/java-cef/src/d64cd6c266d5a9fc485bdfb6d5b672201dc5dfc7/java/org/cef/CefApp.java?at=master#lines-138
The text was updated successfully, but these errors were encountered: