GithubHelp home page GithubHelp logo

fampat / install-jdk-on-steam-deck Goto Github PK

View Code? Open in Web Editor NEW

This project forked from blackcorsair/install-jdk-on-steam-deck

0.0 0.0 0.0 23 KB

Guide and script to install java jdk 17 on the steam deck

License: GNU General Public License v3.0

Shell 100.00%

install-jdk-on-steam-deck's Introduction

install-jdk-on-steam-deck

How it works

By default, the SteamDeck has a read-only immutable OS file system, which means that you can't simply install anything using the pacman package manager that comes with the OS (arch linux), since it would modify the OS file system.

So in order to install anything outside the Software Center (which installs programs in a way that doesn't affect the OS by using flatpak), you have to modify things in you home directory, which shouldn't mess up with the OS and break the system.

Taking this into account, the script located in the scripts directory of this repository will:

  • Download the official oracle JDK 17 compressed file into your home directory, more specifically into ~/.local/jdk
  • Exec a checksum of the file using the official sha256 checksum
  • Extract the file into ~/.local/jdk/jdk-17.0.4.1
  • Add some environment variables to your ~/.profile and then source it, if it wasn't already sourced, in your bashrc, so your programs / scripts know where java is installed. The variables are:
    • JAVA_HOME: which points to the ~/.local/jdk/jdk-17.0.4.1
    • PATH: which adds the bin directory located in the JAVA_HOME, so every executable is available for you to run

By adding the variables to .profile instead of .bashrc we ensure to be more "shell agnostic", so if you run a script in another shell like sh or launch a graphical program, it should read the environment variables defined there.

.profile is "manually" sourced in .bashrc since bash will try to source first .bash_profile and .bash_login if they exist. To learn about this:

With this, you will have a local installation of java and even better, you can install multiple versions and then point to the one you need.

This script only works (currently) for the jdk-17, since in order to download jdk-11 from oracle's page requires a login.

Usage

git clone https://github.com/BlackCorsair/install-jdk-on-steam-deck.git
./install-jdk-on-steam-deck/scripts/install-jdk.sh

TO-DO

  • If you want anything added, just let me know by opening an issue

install-jdk-on-steam-deck's People

Contributors

blackcorsair avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.