Skip to content

.NET library for interfacing with java processes.

Notifications You must be signed in to change notification settings

iliadsh/JNetRemote

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JNetRemote

.NET library for interfacing with java processes (C++/CLI).

Features

  • Fully external. Loads no native or Java bytecode into the target process.
  • Same code format as the JNI C API, but .NET-ified.
  • Written in C++ as a CLI library.

Usage

static void Main(string[] args) 
{
  Process targetProcess = Processes.GetProcessesByName("javaw")[0];
  JNI env;
  if (!JNI.AttachVM(targetProcess, out env) { 
    return; //Process is not a Java process (does not have the jvm module loaded).
  }

  JClass clazz = env.FindClass("fully/qualified/Name");
  JMethodID methodID = env.GetStaticMethodID(clazz, "isThisAFunction", "(IZ)Z"); 
  JBoolean boolean = env.CallStaticBooleanMethod(clazz, methodID, new JInt(54), new JBoolean(true));

  Console.WriteLine(boolean.Value());
  
  env.Dispose();
}

About

.NET library for interfacing with java processes.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages