Skip to content

Java Loader #145

@ketangupta34

Description

@ketangupta34

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions