You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Corda文档Ubuntu下JDK安装指引过时问题反馈及解决方案

Corda Ubuntu Java 8 Installation Guide Outdated (PPA Disabled) - Working Alternative

Hey folks, I recently hit a roadblock following the official Corda guide for setting up Java 8 on Ubuntu. The steps use a PPA (ppa:webupd8team/java) that's no longer functional because Oracle changed their licensing back in April 2019—now you need an account to download JDKs, which broke the old package links. Here's exactly what happens when you try the original steps:

  • Running sudo add-apt-repository ppa:webupd8team/java throws an error saying the PPA is disabled.
  • Trying to install with sudo apt install oracle-java8-installer after that gives a "no installation candidate" message, since the package source is gone.

Working Manual Installation Steps

Instead of relying on the broken PPA, here's a reliable manual installation method that works like the Windows setup process:

  1. Grab the JDK 8 *.tar.gz package from Oracle's official downloads (note: you'll need an Oracle account to access the download).

  2. Create a dedicated directory for your Java installation:

    sudo mkdir /opt/java
    
  3. Extract the downloaded tar.gz file to this directory (replace the file path with your actual download location):

    sudo tar -zxf Downloads/jdk-8u221-linux-x64.tar.gz -C /opt/java
    
  4. Set up environment variables by editing the system profile:
    Open /etc/profile with your favorite editor (e.g., sudo nano /etc/profile) and add these lines at the end:

    export JAVA_HOME=/opt/java/jdk1.8.0_221
    export PATH=$PATH:$JAVA_HOME/bin
    

    Double-check that the JAVA_HOME path matches the exact folder name of your extracted JDK—yours might differ if you downloaded a newer update.

  5. Restart your Ubuntu system to apply the environment changes.

  6. Verify everything works correctly:
    First, check that your PATH includes the Java bin directory:

    echo $PATH
    

    You should see /opt/java/jdk1.8.0_221/bin listed in the output.

    Then confirm the Java version:

    java -version
    

    You should get output similar to this:

    java version "1.8.0_221"
    Java(TM) SE Runtime Environment (build 1.8.0_221-b11)
    Java HotSpot(TM) 64-Bit Server VM (build 25.221-b11, mixed mode)
    

This approach skips the broken PPA entirely and gives you a stable Java 8 installation that works for Corda development.


内容的提问来源于stack exchange,提问作者ChrisW

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.14 07:20:05