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 20 Dec 2014, 19:02
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
JRE/JDK JAVA PETs/SFSs issues in Puppy <RE-OPENED>
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 3 of 3 [42 Posts]   Goto page: Previous 1, 2, 3
Author Message
musher0


Joined: 04 Jan 2009
Posts: 4463
Location: Gatineau (Qc), Canada

PostPosted: Mon 20 May 2013, 22:03    Post subject:  

Hello, all !

This at the request of gcmartin through a PM. Thanks, gc!

It's a script to do away with the need for a java sfs or pet. I've been doing this for a couple of years now, and it works great. Just copy and paste the script in /root/my-applications/bin as Instl-Java.sh, make executable and run. (That's I n s t l - J a v a . s h, if you care to spell it out.)

It's really a small long-distance course that coaches you on how to do it and waits for you while you do it. Smile Do what? Run it and you'll know! (Setting up a new JAVA, that's what!)

Enjoy!

musher0

PS Make sure you have enough space left in your pup_save file, I'd say at least 250 Mg's, to be safe: more or less 125 Mb's for the java JRE itself, the other 125 Mb's being the minimum wiggle room for the Puppy.

NB Revised script. Sincere thanks to gcmartin for the extra pair of eyes!

Code:
#!/bin/ash
 # ~/my-applications/bin/Instl-Java.sh
 #
 # Save this script as :
 # ----------------
 # Instl-Java.sh
 #
 # in the folder:
 # --------------
 # ~/my-applications/bin
 #
 # and make executable by issuing the command:
 # chmod +rwx Inst-Java.sh
 # in a console in that folder.
 #
 # (c) musher0, 21 mai 2013, Gatineau (Qc), Canada.
 # All rights reserved, but "ad usum privatum" use
 # is allowed for Puppy-ists.
 #
 # Script written at the request of gcmartin, same day.
 ####
 # variables
# See line 85.

 # preparation
 [ -d /opt/java-jre ] && rmdir /opt/java/jre
 # If the above link exists, we can delete it because
 # there is a real JAVA folder in there somewhere as a
 # backup. So we do delete it in view of the new JAVA
 # version we are going to download, to avoid link errors.
 # If it doesn't exist, it doesn't matter! (hehe)

 sleep 0.1s
 clear

 # script proper
 echo "
 # Hi!
 #
 # This is a semi-automatic process for the reason
 # that, for some reason, wget does not recognize
 # the oracle.com site certificate. So...
 #
 # 1) Download the latest java JRE tar.gz package
 # from oracle.com, manually.
 #
 # Note 1: Be sure to choose the correct jre *.tar.gz
 # package for your machine, either 32-bit or 64-bit.
 #
 # The 32-bit archive has a \"86\" in its archive
 # name/title. The 64-bit archive has a \"x64\" in
 # its archive name/title.
 #
 # Note 2: Download to a suitable place, such as
 # /mnt/home/Downloads.
 #
 # Your default browser will bring you to the java site
 # as soon as you hit Return."
 read

 defaultbrowser http://www.oracle.com/technetwork/java/javase/downloads/jre7-downloads-1880261.html &

 echo "
 #####################################################
 # 2) Unpack the jre-blah-blah tar file that
 # you have just downloaded, with pupzip, to /opt.
 #                                ------     ----
 # Hit Return again when this step 2) is done."
 read                           

 echo "
 #####################################################         
 # 3) Make sure that you have \"chiseled\" (:-)
 # \" java -jar \"@\" \" (without the outside quotes)
 # as the defined default action for jar files in
 # your ROX-Filer.                   ---
 #
 # 4) Once you're sure you have successfully
 # completed the above steps...
 # hit Return to execute the fancy linking! (:-)
 #
 # If in doubt, hit \"Ctrl-C\" and start over."
 read
#
NEWJAVA="`ls -urgod jre* | head -n 1 | cut -d' ' -f6`"
#
 cd /opt
 chmod +rwx /opt/$NEWJAVA/bin/*
 # Makes the java executables... executable!
 sleep 0.1s
 ln -sf "$NEWJAVA" java-jre
 echo "
 #####################################################
 # The script just made a link from the last accessed
 # java archive to a \"java-jre\" directory in /opt.
 #
 # Un-tarring or un-packing a file or folder counts as
 # an access, so the last accessed java package is the
 # one you just downloaded and unpacked, even if you
 # have older versions of java in /opt.
 #
 # Hit Return again to finish."
 read
 cd ~/my-applications/bin
 ln -sf /opt/java-jre/bin*

 echo "
 #####################################################
 # Done! The links to your path have now been created,
 # and ... your new java $NEWJAVA is ready to go! :)
 #
 # Simply repeat this process every time a new JRE
 # is published. The script is made to overwrite any
 # existing links so they can be re-used over, & over,
 # & over, & over. (Yep, there's an echo... (:-) )
 #
 # Have fun with your new java!
 #
 # musher0
 # Gatineau (Qc), Canada, May 21, 2013
 "
# We make it available now and for future sessions.
# set -xe
[ ! -f /etc/profile.local ] && echo < /etc/profile.local
echo "$PATH" > /tmp/path
if [ ! "`grep -o \"java-jre\" /tmp/path`" = "java-jre" ];then
   PATH=/opt/java-jre/bin:$PATH
   echo "PATH=/opt/java-jre/bin:\$PATH" >> /etc/profile.local
fi
rm /tmp/path

echo "$LD_LIBRARY_PATH" > /tmp/lib-path
if [ ! "`grep -o \"java-jre\" /tmp/lib-path`" = "java-jre" ];then
   LD_LIBRARY_PATH=/opt/java-jre/lib:$LD_LIBRARY_PATH
   echo "LD_LIBRARY_PATH=/opt/java-jre/lib:\$LD_LIBRARY_PATH" >> /etc/profile.local
fi
rm /tmp/lib-path
# set +xe
Instl-Java.sh.zip
Description  This zip contains the same as the above; saves you the fuss of copying and saving to your "/root/my-applications/bin" path. Still, don't forget to make executable.
zip

 Download 
Filename  Instl-Java.sh.zip 
Filesize  1.98 KB 
Downloaded  397 Time(s) 

_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send private message Visit poster's website 
gcmartin


Joined: 14 Oct 2005
Posts: 4507
Location: Earth

PostPosted: Mon 10 Feb 2014, 04:40    Post subject: New issues that begs advice and resolution from Contributors  

Over the years there have been several issues that surround JAVA installation in PUPs, both 32bit and 64bit.

My inimical view is that much of this does NOT have anything to do with whether its a PET or its a SFS. The problem all centers around library installation such that the subsystem is presented so that JAVA apps can find the JAVA subsystem, BUT MOST IMPORTANTLY, JAVA needs to be installed such that IDEs can find those libraries so that anyone using any standard off-the-shelf IDEs (as well as many other programs which rely on consistent library placements) can work without issues, research, and retooling.

The Puppy community has many smart contributors. Each, though, adds a twist to the standard that the JAVA community expresses. When they violate the standard structures, those who expected the standard to be adhered to will NOT always run because of the local changes by the PUP contributor.

This problem is exacerbated by the fact that each of the developers will add/delete a twist that others are not adding such that when its all said and done, there are so many completely different implementations in PUPPY and NONE of them are consistent with the others.

This is a request on behalf of the community asking those developers who already have made a JAVA contribution over the years to somehow meet discuss something consistent in library placement and to make that consistent known (or published) somehow so that the inconsistency goes away.

Puppy, when developed, was done in an age when dial up internet on 9.6Kb lines were used by many. Today, many or most of the community are using much higher speed links for our downloads. Further, the PC components used to be very slow, but, today, many/most are using PCs with sufficient RAM for what is needed for a good Internet system where many browser pages are often open at the same time. With the changes that are occurring in WOOF-CE, we may see a consistent implementation for both JRE and JDK for both building PUPs as well as for distribution in the REPOs.

Flash and JAVA are components that many have used. In fact, now that it has become apparent that we are in an age where xPhones/xTablets/xTVs/xGames are connecting to our PUPs for various tasks and needs. The MTP project is an example of this as many of us have the very devices which allows us to transfer information to and from our xDevices while their batteries recharge on Puppy.

One of the greatest advantage that PUPs now present to its user community is the ability to build, test, and run JAVA apps on not just the PUP PC, but also on the xDevices already mentioned. With the expected rise in xDevices in homes over the next 5 years, its easy to see how PUPs (or any system) not only needs a JAVA Virtual Machine but also for it to be able to support development for integrating xDevices into a PUPPY LAN.

Consistent library placement so that IDEs and apps and users can know where to look for JAVA is a very important consideration!

Lastly, @Shinobar and @OscarTalks have taken a first step this very week to arrive at consistency. This was done as each of them created JAVA's jre-1.7.0.51. Thus, in their cases, these JAVA would have the same library structures and same installation landing in the Puppy system. But, there are others who build JAVA PETs or SFSs that need to come on-board to participate such that JAVA installs the same, looks the same, and provides a platform so that IDEs can find those things necessary to allow users to create the apps that will provide services to all of us.

Please (this is a plea) contribute any ideas or package guidelines such that JAVA implemented here, lands the same way everywhere in Puppyland, no matter 32bit or 64bit....Please

_________________
Get ACTIVE Create Circles; Do those good things which benefit people's needs!
We are all related ... Its time to show that we know this!
3 Different Puppy Search Engine or use DogPile
Back to top
View user's profile Send private message 
tlchost

Joined: 05 Aug 2007
Posts: 1741
Location: Baltimore, Maryland USA

PostPosted: Mon 10 Feb 2014, 05:41    Post subject: Re: New issues that begs advice and resolution from Contributors  

gcmartin wrote:

Please (this is a plea) contribute any ideas or package guidelines such that JAVA implemented here, lands the same way everywhere in Puppyland, no matter 32bit or 64bit....Please


Shame it took so many words..But, standardization? Heresy!

Could version control be rearing its ugly head?

Thom
Back to top
View user's profile Send private message Visit poster's website 
vicmz


Joined: 15 Jan 2012
Posts: 1154

PostPosted: Mon 10 Feb 2014, 16:12    Post subject:  

It is difficult to make a one-for-all package of something like Java. Maybe the guys at Woof-CE could implement such a standard (if it's actually possible) for all future puppies.
_________________
OB Precise 14.07.26 Woof-CE|Puppy Linux en español
Back to top
View user's profile Send private message 
gcmartin


Joined: 14 Oct 2005
Posts: 4507
Location: Earth

PostPosted: Mon 10 Feb 2014, 17:47    Post subject:  

Funny this is mentioned.
Quote:
Shame it took so many words..But, standardization? Heresy!
The fact that its JAVA, the standardization is already addressed for us. What we may need is simple installation library placement so that apps designed can find libraries in those "standard" places in PUPs. And those who create PETs/SFSs have some forum link or document or WOOF mechanism or something so that what they present looks the same no matter which PUP or version it was installed in.

It makes the life of distro developers simple as it reduces problems that users surface when trying to use any of these. This is the major case(s) that have arisen in our past.

The concern here is NOT about whether it is JAVA 5/6/7/8/some-future version. Its about where is it found in the system no matter which of these JAVA were installed.

In essence, I asking is it unreasonable for this subsystem to show up in PUPs in an expected way? Or is this attempt to simplify library placement at installation missing something important?

Here to help

_________________
Get ACTIVE Create Circles; Do those good things which benefit people's needs!
We are all related ... Its time to show that we know this!
3 Different Puppy Search Engine or use DogPile
Back to top
View user's profile Send private message 
gcmartin


Joined: 14 Oct 2005
Posts: 4507
Location: Earth

PostPosted: Mon 10 Feb 2014, 17:49    Post subject:  

The prior post asks whether a guidepost for JAVA PET/SFS contributions should be present so that any contributor does NOT have to create one that causes problems in library placement? This means installation libs and appropriate symlinks necessary to give a consistent installation pathing for things that use JAVA to find stuff.

This statement above is my 100 words or less request.

_________________
Get ACTIVE Create Circles; Do those good things which benefit people's needs!
We are all related ... Its time to show that we know this!
3 Different Puppy Search Engine or use DogPile
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 3 of 3 [42 Posts]   Goto page: Previous 1, 2, 3
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Users ( For the regulars )
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.0948s ][ Queries: 12 (0.0142s) ][ GZIP on ]