Install openJDK+openJFX 8 on Ubuntu 20

允我心安 提交于 2020-05-16 22:38:31

问题


I'm trying to install OpenJDK 8 and OpenJFX 8 on Ubuntu 20.10.

Installing openJFX 8 has always been a little tricky on Ubuntu, but I used to be able to do it using the tip from this SO answer: https://stackoverflow.com/a/56166582/2423283 That used to work fine (I think I was using Ubuntu 19.something), however it appears that recently 8u161-b12-1ubuntu2 was removed.

For some more background information, I'm installing this via a docker file in an automated pipeline. Here are the relevant parts of the Dockerfile:

FROM my.company.internal.registry:443/ubuntu:latest

RUN apt -y update && \
    apt -y install \
    openjdk-8-jdk \
    openjfx=8u161-b12-1ubuntu2 \
    libopenjfx-java=8u161-b12-1ubuntu2 \
    libopenjfx-jni=8u161-b12-1ubuntu2

This used to run just fine, but now I get:

E: Version '8u161-b12-1ubuntu2' for 'openjfx' was not found
E: Version '8u161-b12-1ubuntu2' for 'libopenjfx-java' was not found
E: Version '8u161-b12-1ubuntu2' for 'libopenjfx-jni' was not found

What I've tried so far

I've tried changing my ubuntu:latest to ubuntu:19:10 in my FROM line in the Dockerfile, but I still got the missing packages errors.

I tried just removing those version restrictions (the =8u161-b12-1ubuntu2) and I didn't see any errors during the installation, but then when I compiled my code, none of the JavaFX classes could be found.

来源:https://stackoverflow.com/questions/61783369/install-openjdkopenjfx-8-on-ubuntu-20

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!