Skip to content

Commit aa38fcb

Browse files
committed
README
1 parent 3d2004b commit aa38fcb

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,31 @@ Inject any JAR file into a running JVM.
1212
# How to Debug
1313
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.
1414

15+
# Creating JAR
16+
When creating the JAR, include a resource `run.txt` with one line: the location of your main class.
17+
18+
Example:
19+
```
20+
com.example.ExampleRun
21+
```
22+
23+
This class must have a empty void function `main` (this is the function that will first be called)
24+
25+
Example:
26+
```java
27+
package com.example;
28+
29+
public class ExampleRun {
30+
public static void main() {
31+
System.out.println("Example injected.");
32+
}
33+
34+
}
35+
```
36+
37+
**NOTE:**
38+
The example JAR provided in the [releases](https://github.com/birthdates/java-injector/releases/) will just close the application it injects into.
39+
1540
# Common Problems
1641
1. `My Java code does not execute!` - There is likely an error within your code, run the program in verbose mode.
1742
2. `Nothing injects (not even console)` - There is likely another `javaw.exe` running.

0 commit comments

Comments
 (0)