Giter Site home page Giter Site logo

java-injector's Introduction

java-injector

Inject any JAR file into a running JVM.

How to Use

NOTE: This program will most likely trigger your anti-virus

  1. Download the latest release or build it yourself (if you build it yourself, create a libs folder and move runner/Run.java into it)
  2. Move all files into one folder
  3. Compile your JAR and move it into the same folder but rename it to run.jar
  4. Launch your Java application (javaw.exe application)
  5. Run injector.exe and the JAR file should be injected into the JVM (if not, steps were not followed correctly)

How to Debug

You will need to build the program yourself. Head into shared.h and uncomment the line that looks like #define VERBOSE. After this, rebuild the project.

Creating JAR

When creating the JAR, include a resource run.txt with one line: the location of your main class.

Example:

com.example.ExampleRun

This class must have a empty void function main (this is the function that will first be called)

Example:

package com.example;

public class ExampleRun {
    public static void main() {
        System.out.println("Example injected.");
    }

}

NOTE: The example JAR provided in the releases will just close the application it injects into.

Common Problems

  1. My Java code does not execute! - There is likely an error within your code, run the program in verbose mode.
  2. Nothing injects (not even console) - There is likely another javaw.exe running.
  3. ClassNotFoundException - The JVM you injected into does not have this class!
  4. My prints aren't showing even in verbose mode! - Prints from other threads will not show up in verbose mode.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.