Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mrjameshamilton/jep457-hello-world
A JEP 457 Class-File API Hello World example
https://github.com/mrjameshamilton/jep457-hello-world
bytecode classfile java jep457 jvm
Last synced: about 2 months ago
JSON representation
A JEP 457 Class-File API Hello World example
- Host: GitHub
- URL: https://github.com/mrjameshamilton/jep457-hello-world
- Owner: mrjameshamilton
- License: mit
- Created: 2023-10-03T19:56:36.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-01-21T08:43:57.000Z (11 months ago)
- Last Synced: 2024-01-21T11:28:06.930Z (11 months ago)
- Topics: bytecode, classfile, java, jep457, jvm
- Language: Java
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# JEP457 Hello World
[JEP 457 Class-File API](https://openjdk.org/jeps/457) is a preview API to provide a standard API for parsing,
generating, and transforming Java class files.The example here shows how easy it is to use to create a
new class that prints "Hello World".https://github.com/mrjameshamilton/jep457-hello-world/blob/ea854cda0e058d728630af907f9ed715d9a081ca/Main.java#L14-L19
# Building
You'll need JDK 22 and easiest way to install this on Linux is with [SDK man](https://sdkman.io/):
```shell
sdk install java 22-open
```If you have Java 22, you can then execute the `run.sh` script which will
compile and execute `Main.java`. `Main` will create a Java class `HelloWorld.class`
which will then be executed.```shell
$ ./run.sh
```# Similar projects
There are many similar projects for parsing,
generating, and transforming Java class files, including:* [ASM](https://asm.ow2.io/)
* [ProGuardCORE](https://github.com/Guardsquare/proguard-core)
* [ByteBuddy](https://bytebuddy.net/#/)