Skip to content

Commit

Permalink
Add dummy AWT methods to Android launcher (#971)
Browse files Browse the repository at this point in the history
* Add dummy AWT methods to Android launcher

* Add more meaningful comment

* Modify comment

Co-authored-by: jose.pereda <[email protected]>
  • Loading branch information
José Pereda and jperedadnr authored Jul 29, 2021
1 parent 05af1e6 commit ec42d7a
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/main/resources/native/android/c/launcher.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,3 +208,18 @@ void JVM_RawMonitorEnter() {
void JVM_RawMonitorExit() {
fprintf(stderr, "We should never reach here (JVM_RawMonitorExit)\n");
}

// AWT: GraalVM native-image explicitly adds (unresolved) references to libawt
// so we need to make sure the JNI_OnLoad symbols are there.

void Java_java_awt_Toolkit_initIDs() {
fprintf(stderr, "We should never reach here (Java_java_awt_Toolkit_initIDs)\n");
}

void JNI_OnLoad_awt() {
fprintf(stderr, "We should never reach here (JNI_OnLoad_awt)\n");
}

void JNI_OnLoad_awt_headless() {
fprintf(stderr, "We should never reach here (JNI_OnLoad_awt_headless)\n");
}

0 comments on commit ec42d7a

Please sign in to comment.