Skip to content

Script that downloads and installs OpenJDK on OpenWrt

Notifications You must be signed in to change notification settings

josedelinux/openwrt-jdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Shell script to get and run musl-based OpenJDK from Alpine package on your OpenWrt router.

This scripts will automatically download musl-based OpenJDK to current directory

The release page provides compressed tar files for offline installation. These tar file are just untar and tar back gzip tarballs

It works on my raspberry pi 3b+ , my Minecraft server(papermc) works fine as well.

Inspired from Reinhart Previano s' blog , update packages links

Get openjdk(optional)

run ./dljdk8.sh or ./dljdk11.sh

Installation

  1. go to Release page to download OpenJDK according to your architecture
  2. Make a directory for the JDK: mkdir -p /usr/lib/jvm
  3. Extract the archive: tar zxvf openjdk-version_arch.tar.gz -C /usr/lib/jvm
  4. add export PATH="/usr/lib/jvm/bin:$PATH" to /etc/profile
  5. reboot and then test java with java --version

Troubleshooting

Compatibility issue

Error relocating /usr/lib/jvm/lib/aarch32/jli/libjli.so: __dlsym_time64: symbol not found
Error relocating /usr/lib/jvm/lib/aarch32/jli/libjli.so: __gettimeofday_time64: symbol not found
Error relocating /usr/lib/jvm/lib/aarch32/jli/libjli.so: __stat_time64: symbol not found

As mentioned in #1, this is probably is because your device is using musl version older than v1.2.0.

in that case you will need to use the alpine package before v3.13, which still uses musl 1.1.

Solution

here is a install script written by Sergey Ponomarev

Better solution(todo)

Packaging it as an OPKG package for easier installation.

Building packages from source


This repo is no longer actively maintained as I stopped tinkering around on my router.

About

Script that downloads and installs OpenJDK on OpenWrt

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages