You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+25Lines changed: 25 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,31 @@ Inject any JAR file into a running JVM.
12
12
# How to Debug
13
13
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.
14
14
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
+
packagecom.example;
28
+
29
+
publicclassExampleRun {
30
+
publicstaticvoidmain() {
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
+
15
40
# Common Problems
16
41
1.`My Java code does not execute!` - There is likely an error within your code, run the program in verbose mode.
17
42
2.`Nothing injects (not even console)` - There is likely another `javaw.exe` running.
0 commit comments