Skip to content
This repository was archived by the owner on May 12, 2024. It is now read-only.

Commit ecae3cc

Browse files
committed
Updated README
1 parent e996d2e commit ecae3cc

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Standalone program and library which can downgrade Java classes/programs down to Java 8.
33

44
To use JavaDowngrader as a library in your application, check out the [Usage (As a library)](#usage-as-a-library) section.
5-
If you just want to downgrade .jar files you can check out the [Usage (Standalone)](#usage-standalone) section.
5+
If you just want to downgrade .jar files you can check out the [Usage (Standalone)](#usage-standalonebootstrap) section.
66

77
## Features
88
- Supports up to Java 21 and down to Java 8
@@ -19,12 +19,19 @@ If you want the executable jar file you can download a stable release from [GitH
1919
To use JavaDowngrader with Gradle/Maven you can use this [Maven server](https://maven.lenni0451.net/#/releases/net/raphimc/JavaDowngrader) or [Jitpack](https://jitpack.io/#RaphiMC/JavaDowngrader).
2020
You can also find instructions how to implement it into your build script there.
2121

22-
## Usage (Standalone)
22+
## Usage (Standalone/Bootstrap)
2323
1. Download the latest version from the [Releases section](#executable-jar-file)
2424
2. Run the jar file with `java -jar JavaDowngrader-whateverversion.jar` to see the usage
2525

26+
### Downgrade ahead of time
2627
Here is an example command to convert the jar input.jar to Java 8 and output it to output.jar:
27-
``java -jar JavaDowngrader-whateverversion.jar -i "input.jar" -o "output.jar" -v 8``
28+
``java -jar JavaDowngrader-Standalone-whateverversion.jar -i "input.jar" -o "output.jar" -v 8``
29+
30+
### Downgrade during runtime
31+
Here is an example command to run a jar file and downgrade it during runtime by using the bootstrap java agent:
32+
``java -javaagent:JavaDowngrader-Bootstrap-whateverversion.jar -jar the_real_jar_you_want_to_run.jar``
33+
34+
Additionally, you can set the ``-DspoofJavaVersion=<java version>`` property to bypass application specific checks for the Java version.
2835

2936
## Usage (As a library)
3037
To transform a ``ClassNode`` you can use the ``JavaDowngrader`` class.

0 commit comments

Comments
 (0)