Manually install JAVA 101.

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
frenchiveruti
Posts: 120
Joined: Wed 15 Feb 2017, 14:00

Manually install JAVA 101.

#1 Post by frenchiveruti »

Hi, so, I found a plethora of outdated tutorials on how to install java on a puppy linux, I'm using frugal and Tahrpup 6.0.5 and I'm not sure if it changes from puppy to puppy but here are the steps.

1. Download from http://www.java.com the lastest JAVA (~70MB) version tar.gz (the zip things for linux NOT the RPM) for your Architecture (64 for 64bits and 32 for 32 bits, you can check this by using " uname -p " on a terminal, if it displays x86_64 then x64 is for you).
2. Open the terminal (yeah, the one and only)
3. Do this set of commands when your file is DOWNLOADED (sentences next to "#" explain what each command does):

Code: Select all

mkdir /usr/java/ #creates java directory
cd /usr/java/ #sets working directory to the one just created
cp ~/Downloads/jre*.tar.gz /usr/java/ #copies the downloaded file to the folder previously mentioned.
tar zxvf jre*.tar.gz #unpacks the file into a directory
ln -s -v /usr/java/jre*/bin/java /usr/bin/java #makes a link to be able to issue the "java" command on the terminal, you should change the "jre*" bit to the name of the folder that the tar command created
cd /etc/profile.d/ #places terminal on the profile.d directory.
mp java #creates and edits a java file
(Here's the same thing within a single command for the lazy or the very confident people):

Code: Select all

mkdir /usr/java/; cd /usr/java/; cp ~/Downloads/jre*.tar.gz /usr/java/; tar zxvf jre*.tar.gz; ln -s -v /usr/java/jre*/bin/java /usr/bin/java; cd /etc/profile.d/; mp java


4. Now you should have a text editor open, you should paste the following commands:

Code: Select all

JAVA_HOME=$(ls -d /usr/java/jre* | tail -n 1); export JAVA_HOME #Creates the JAVA_HOME env variable for proper jar use
echo $PATH|grep -q "$JAVA_HOME" || export PATH=$PATH:$JAVA_HOME/bin; #adds the JAVA_HOME to the PATH
LD_LIBRARY_PATH=$JAVA_HOME/lib:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH #Adds the libs of java to the libs library
5.Before we finish, make sure to delete the tar.gz file from the "/usr/java/" folder, you can use

Code: Select all

rm "/usr/java/jre-*.tar.gz"
so the "JAVA_HOME" doesn't make a mistake with the "/usr/java/jre*" variable.

And that's it! If you want to know where did I get this information, check this links:

http://www.murga-linux.com/puppy/viewto ... 031#710031
http://murga-linux.com/puppy/viewtopic. ... 1&start=17
Last edited by frenchiveruti on Sat 08 Jul 2017, 03:12, edited 4 times in total.

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#2 Post by Flash »

Thanks, that's a very nice How-to. You left out one thing: about how big is the JAVA download?

B.K. Johnson
Posts: 807
Joined: Mon 12 Oct 2009, 17:11

#3 Post by B.K. Johnson »

Here you are Flash
Attachments
java downloads.png
Linux downloads - sizes
(29.34 KiB) Downloaded 1667 times
[color=blue]B.K. Johnson
tahrpup-6.0.5 PAE (upgraded from 6.0 =>6.0.2=>6.0.3=>6.0.5 via quickpet/PPM=Not installed); slacko-5.7 occasionally. Frugal install, pupsave file, multi OS flashdrive, FAT32 , SYSLINUX boot, CPU-Dual E2140, 4GB RAM[/color]

Pelo

Pets are available

#4 Post by Pelo »

We have pets available for java versions, just to click on.. What is the advantage of writing again in terminal ? What is a dummy ? (sorry i am french, and i suppose you are french too. Musher0 is (quite) an expert of Java, and he speaks french fluently. If you need anything about JRE, il sera heureux to help you :)

frenchiveruti
Posts: 120
Joined: Wed 15 Feb 2017, 14:00

Re: Pets are available

#5 Post by frenchiveruti »

Pelo wrote:We have pets available for java versions, just to click on.. What is the advantage of writing again in terminal ? What is a dummy ? (sorry i am french, and i suppose you are french too. Musher0 is (quite) an expert of Java, and he speaks french fluently. If you need anything about JRE, il sera heureux to help you :)
Hello my friend! Yes indeed, there might be pet files around to be able to install java, but for those like me who don't reaaaally trust PET files as they usually made my puppy break more than help it (aside from the ones that are a must install, those worked fine), having the option to use the terminal is a nice solution.
I'm not french, I'm from argentina and je ne seis pas parler français! It's just a username that is a combination of two guys that were alive during the Independence Day here.

Post Reply