Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/flathub/org.freedesktop.sdk.extension.openjdk11


https://github.com/flathub/org.freedesktop.sdk.extension.openjdk11

Last synced: about 2 months ago
JSON representation

Awesome Lists containing this project

README

        

# SDK Extension for OpenJDK 11

This extension contains the OpenJDK 11 Java Runtime Environment (JRE) and Java Developement Kit (JDK).

OpenJDK 11 is the previous long-term support (LTS) version.

For the current LTS version, see the [OpenJDK 21](https://github.com/flathub/org.freedesktop.Sdk.Extension.openjdk21) extension.

For the current latest (non-LTS) version, see the [OpenJDK](https://github.com/flathub/org.freedesktop.Sdk.Extension.openjdk) extension.

## Usage

You can bundle the JRE with your Flatpak application by adding this SDK extension to your Flatpak manifest and calling the install.sh script. For example:

```yaml
app-id: com.example.myapp
runtime: org.freedesktop.Platform
runtime-version: '24.08'
sdk: org.freedesktop.Sdk
sdk-extensions:
- org.freedesktop.Sdk.Extension.openjdk11
command: myapp

finish-args:
- --socket=x11
- --share=ipc
- --env=PATH=/app/jre/bin:/app/bin:/usr/bin
- --env=JAVA_HOME=/app/jre
# ...

modules:
- name: openjdk
buildsystem: simple
build-commands:
- /usr/lib/sdk/openjdk11/install.sh

- name: myapp
buildsystem: simple
build-options:
env:
PATH: /app/bin:/usr/bin:/usr/lib/sdk/openjdk11/bin
JAVA_HOME: /usr/lib/sdk/openjdk11/jvm/openjdk-11
build-commands:
- install -Dm755 -t /app/bin myapp
- install -Dm644 -t /app/share/com.example.myapp myapp.jar
# ...
sources:
- type: archive
url: https://example.com/myapp/download/myapp-1.0.0.tar.gz
# ...
- type: script
dest-filename: myapp
commands:
- exec java -jar /app/share/com.example.myapp/myapp.jar $@
# ...
```