-
Notifications
You must be signed in to change notification settings - Fork 182
Open
Description
Implementation of Java Loader
This is the issue for the discussion related to the development of the Java Loader.
Proposed Solution
1) Develop the PoC for the proposed idea.
- Implement the bootstrap class implementing some major functions related to the java loader, which include callFunction, LoadFromFile, LoadFromMemory, etc, using the java Compiler API.
- Implement the cpp functions that call the bootstrap function using the java Native Interface.
PoC tested with java 8, java 11, gcc 10, and clang 11.
2) Implementing the metacall core
- Map the functions in PoC to function required in metacall core and create the list of additional functions which are required for the proper functioning of the project. (In Progress)
- Start the initial implementation of java Loader
Proof of Concept
The proof of concept done by @ketangupta34 can be found here -
https://github.com/ketangupta34/JNI/tree/jni-compiler-PoC
To run and compile the PoC -
g++ Caller.cpp \
-I"/usr/lib/jvm/java-11-openjdk-amd64/include" \
-I"/usr/lib/jvm/java-11-openjdk-amd64/include/linux" \
-L"/usr/bin/java" \
-L"/usr/lib/jvm/java-11-openjdk-amd64/lib/server" -ljvm
Above command can be run using java 8+ by replace the version in command to the java version available on your machine.
viferga and giarve
Metadata
Metadata
Assignees
Labels
No labels