Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 22 Sep 2018, 02:21
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
Manually install JAVA 101.
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [5 Posts]  
Author Message
frenchiveruti

Joined: 15 Feb 2017
Posts: 102

PostPosted: Wed 26 Apr 2017, 09:28    Post subject:  Manually install JAVA 101.
Subject description: needed for running JAR files
 

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 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:
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:
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:
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:
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/viewtopic.php?p=710031#710031
http://murga-linux.com/puppy/viewtopic.php?t=77821&start=17

Last edited by frenchiveruti on Fri 07 Jul 2017, 23:12; edited 4 times in total
Back to top
View user's profile Send private message 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 13012
Location: Arizona USA

PostPosted: Wed 26 Apr 2017, 10:47    Post subject:  

Thanks, that's a very nice How-to. You left out one thing: about how big is the JAVA download?
Back to top
View user's profile Send private message 
B.K. Johnson

Joined: 12 Oct 2009
Posts: 667

PostPosted: Wed 26 Apr 2017, 11:41    Post subject:  

Here you are Flash
java downloads.png
 Description   Linux downloads - sizes
 Filesize   29.34 KB
 Viewed   389 Time(s)

java downloads.png


_________________
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

Back to top
View user's profile Send private message 
Pelo

Joined: 10 Sep 2011
Posts: 12591
Location: Mer méditerrannée (1 kms°)

PostPosted: Fri 28 Apr 2017, 21:29    Post subject: Pets are available  

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 Smile
_________________
Passenger Pelo ! don't ask him to repair the aircraft. Don't use him as a demining dog .... pleeease.
Back to top
View user's profile Send private message Yahoo Messenger 
frenchiveruti

Joined: 15 Feb 2017
Posts: 102

PostPosted: Tue 02 May 2017, 10:24    Post subject: Re: Pets are available  

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 Smile

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.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [5 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » HOWTO ( Solutions )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0988s ][ Queries: 13 (0.0311s) ][ GZIP on ]