Java JDK and JRE

Core libraries and systems
Message
Author
User avatar
OscarTalks
Posts: 2196
Joined: Mon 06 Feb 2012, 00:58
Location: London, England

Java JDK and JRE

#1 Post by OscarTalks »

UPDATE:-
Puppy users are now urged to use the GET JAVA utility developed by rerwin which can be found here:-
http://murga-linux.com/puppy/viewtopic.php?t=101592

I may continue to put packages together in case anyone finds them useful.

Please note that other Puppy community members also produce Java packages which may be just as good as mine if not better.

I do not know very much about Java, nor do I use it much, but these packages have worked for me for the tests I have done and for the tasks I have needed to perform (including some which required JDK and not just JRE). Other users have also reported that my packages work for them so if that is the case then I am happy to share.

These packages install the main (numbered) directory under /usr/local/java with symlinks to the executables in /usr/local/bin and the control panel appears in the Utility section of the Menu. The browser plugin is also enabled and working. Go to java.com and click on the "Do I Have Java?" link to confirm. Also test by typing java -version in terminal. Executables and solibs are left unstripped. Also I do make sure that all the ownerships are changed to root:root which seems to be important with these.

Updates to these Java packages are released fairly frequently. As far as I can tell these have to be installed manually by uninstalling the old and downloading and installing the new.

The JDK is considerably larger than the JRE but it does contain the JRE so users should determine which they need or which they wish to install. You don't need both. Because these are large packages I will upload them to Yandex Disk. Also you will find text files with these download links in my smokey01.com storage repo.
https://yadi.sk/d/5aP6BYgSoJ5Hp (JDK)
https://yadi.sk/d/Uj-KoBQvxjixH (JRE)
http://smokey01.com/OscarTalks
Last edited by OscarTalks on Fri 28 Oct 2016, 15:19, edited 3 times in total.
Oscar in England
Image

gcmartin

#2 Post by gcmartin »

THANK YOU @OscarTalks!

Great idea to post this where 32bit users can get either the JRE or the JDK. Thanks hopefully the PETs ends in WOOFCE as well for those who do distro building.

You file for Java, there, is a pointer to the current locations of both otpions for user selection.

Thanks.

User avatar
ASRI éducation
Posts: 3197
Joined: Sat 09 May 2009, 12:10
Location: France
Contact:

#3 Post by ASRI éducation »

Thank you OscarTalks.
:D
Projet ASRI éducation => [url=http://asri-education.org/]Association[/url] | [url=http://forum.asri-education.org/]Forum[/url] | [url=http://dl01.asri-education.org/]Dépôt[/url] | [url=http://kids.asri-education.org/]Espace kids[/url]

User avatar
rerwin
Posts: 2017
Joined: Wed 24 Aug 2005, 22:50
Location: Maine, USA

Creation of a standard structure for JRE and JDK packages

#4 Post by rerwin »

gcmartin, in another thread, wrote:JAVA libraries: If all developers use a consistent library pathing, it could make life very simple to movements within versions. I am NOT sure what JAVA recommends on the issue of library placements for consistency.
I support this idea and propose that we establish a standard implementation of JAVA that requires only replacement of the downloaded jre packages, with the supporting infrastructure files as a separate package.

I am concerned that there are several, sometimes very different sets of accompanying files, suggesting that some essentials might be omitted from some of the jre SFS packages. I propose that we here in this thread work as a group to create a standard structure for JAVA (jre and jdk), to make this thread the central one for all things related to JAVA.

OscarTalks, would you be open to adapting this thread for that project?

IMHO, the areas we should work on are:
  • - Location of downloaded JRE release - /usr/local/java is most consistent with puppy practice.
    - Content of supporting file set for all uses of JAVA.
    - Method of initializing JRE - /etc/profile.d/java, /root/Startup script (?). /etc/init.d/java (?), setting of appropriate linkages to JRE
    - Means of packaging support structure and JRE directory, consistent with woof-CE requirements
    - Automation of the conversion of a JRE package into squash or pet archive
I have collected lists of the files (other than JRE itself) in the various implementations of a JRE SFS file, as a basis for determining and discussing the set to go into the "standard" support package. But I will hold off on details until we decide whether and where we want to hold the conversation.

There appears to be some interest in cleaning up the JRE SFS supply situation, making this a good time to work toward that end. Who's in?
Richard

User avatar
OscarTalks
Posts: 2196
Joined: Mon 06 Feb 2012, 00:58
Location: London, England

#5 Post by OscarTalks »

Richard and everyone,
I am always happy to help in any way I can. It would certainly be good to have something better organised for Java in Puppy, maybe a GetJava utility or something. The location of the main directory seems to be something which the user can select. The java.com website mentions /usr/java as a suggestion and I believe others have gone for that. To me it just didn't feel quite right (although I don't think technically there is anything wrong with it) so I went for /usr/local/java. The most important thing to note about any mechanism which downloads java is that it will need to make sure it changes the ownerships. With some of the other packages that folks install as files or directories unpacked from tarballs it seems we get away with it, but not in this case.

I am only a relative novice so wouldn't be able to code scripts or GUIs or anything like that. I just try to learn by tinkering and upload a few bits and pieces from time to time. If I post any packages I would never want other users to feel that they should not post their own versions of the same thing. Likewise I am happy for discussion about Java in Puppy to take place in this thread or otherwise it is perfectly OK by me if folks want to start other threads (if for example someone wants to have editorial control of the first post) and I will chip in there if I feel I have anything to add.
Oscar in England
Image

User avatar
rerwin
Posts: 2017
Joined: Wed 24 Aug 2005, 22:50
Location: Maine, USA

#6 Post by rerwin »

OscarTalks,
Thanks for letting us use your thread for development of a standard JRE/JDK setup. I do not want to see more threads for JDK. Better to have a central place for Java issues.

I concur with your idea of a "get_java" script to automate the download and creation of the SFS/pet file. Musher0 had posted one that I will use as a basis. BTW, I can handle the coding stuff, but want to share my thinking here so that others can correct it or add to it to create a consensus product.

My background as a programmer includes the concept of design/code inspection teams, where the details are shared and critiqued within the team, all in the effort to perfect the product. That's the spirit I encourage us to use here.

Here is my idea at this point:
  • - The "get_java" script handles the download though SFS/pet file, including owner change and possibly a link to the associated version-related directory (probably based on musher0's install_java script).
    - A separate pet package that can go into woof-CE contains the added files to support the JRE/JDK package.
    - The added supporting files include automatic setup for whatever JRE/JDK version is installed, at bootup and maybe as part of an sfs_load operation.
    - Of the two methods I see for accessing the JRE functions -- a set of links to the package /bin directory versus adding that directory to the PATH environment variable -- I favor the latter, which is what shinobar and gjuhasz use.
Keep in mind that I, too, am not intimately familiar with the fine points of Java, so welcome input from those of you with more Java experience. I am just working with what I see that others have done, so far, with the JRE SFS package.

TIA for any/all assistance with this project.

Note that I am aware of Barry's new work with JDK and will be monitoring what he does, so as to fit in with how he implements JDK.
R

User avatar
SmartDuck
Posts: 14
Joined: Mon 20 Jul 2015, 17:37
Location: Netherlands

#7 Post by SmartDuck »

I' m a newbe Puppy Linux (Tahrpup 6.0.2) but not a newbe Linux user.
(Xubuntu/Lubuntu/Bodhi/Vector/TinyCore/Rasbian)
I like the simplicity and speed of Puppy and would like to use it as my main distro.

I love to program android apps and PHP driven websites for my personal projects and use mainly Eclipse. Eclipse and JDK/JRE packages installed fine but java is not found. java --version gives command not found. The path is not set in the environment I think. How to solve this?

User avatar
OscarTalks
Posts: 2196
Joined: Mon 06 Feb 2012, 00:58
Location: London, England

#8 Post by OscarTalks »

Hello SmartDuck,
Welcome to Puppy.
How have you installed Java?
The packages posted in this forum should normally be configured to work in Puppy. As mentioned in my first post, my packages have symlinks in /usr/local/bin which ensure that the executables are in the PATH. Another method is to add the path of the java bin directory to PATH in the file /etc/profile and reboot. If you have unpacked a tarball from the java website, make sure the ownerships have been set to root:root
Oscar in England
Image

User avatar
SmartDuck
Posts: 14
Joined: Mon 20 Jul 2015, 17:37
Location: Netherlands

#9 Post by SmartDuck »

I installed java JRE and JDK via the Puppy Package Manager (Ubuntu trusty main repo).
Attachments
java_eclipse_error.png
(17.75 KiB) Downloaded 1667 times

User avatar
Semme
Posts: 8399
Joined: Sun 07 Aug 2011, 20:07
Location: World_Hub

#10 Post by Semme »

State your Java version and how you're running Pup.. USB, hard drive install or frugal?
>>> Living with the immediacy of death helps you sort out your priorities. It helps you live a life less trivial <<<

User avatar
SmartDuck
Posts: 14
Joined: Mon 20 Jul 2015, 17:37
Location: Netherlands

#11 Post by SmartDuck »

Full install on hard drive.
Open JDK version 7
/usr/local/java or /usr/local/bin does not exists.

User avatar
Semme
Posts: 8399
Joined: Sun 07 Aug 2011, 20:07
Location: World_Hub

#12 Post by Semme »

I'd remove that and try the JDK.sfs here. After your dwnld it's rt-clk, sfs_load.

Because Java updates rather frequently, I prefer this proactive approach.
Last edited by Semme on Sun 26 Jul 2015, 12:29, edited 1 time in total.
>>> Living with the immediacy of death helps you sort out your priorities. It helps you live a life less trivial <<<

User avatar
SmartDuck
Posts: 14
Joined: Mon 20 Jul 2015, 17:37
Location: Netherlands

#13 Post by SmartDuck »

There is also a cross reference between the openjdk-7-jre-headless and ca-certificates-java package so you can' t uninstall these.

User avatar
Semme
Posts: 8399
Joined: Sun 07 Aug 2011, 20:07
Location: World_Hub

#14 Post by Semme »

You mean symlink? Whatever PPM can't uninstall can be deleted.
>>> Living with the immediacy of death helps you sort out your priorities. It helps you live a life less trivial <<<

User avatar
SmartDuck
Posts: 14
Joined: Mon 20 Jul 2015, 17:37
Location: Netherlands

#15 Post by SmartDuck »

Thanks Semme, the sfs files from shinobar work fine.
I have Eclipse running now :)

User avatar
Semme
Posts: 8399
Joined: Sun 07 Aug 2011, 20:07
Location: World_Hub

#16 Post by Semme »

>>> Living with the immediacy of death helps you sort out your priorities. It helps you live a life less trivial <<<

gcmartin

Timing is a Perfect Storm

#17 Post by gcmartin »

This thread is addressing the needs of community users in todays world where a need for an JAVA has been ever increasing. With the changes that exist today versus when PUPPY started, allows for adding helpful subsystems no one was willing to in the past because of ISO size. Today, much has changed and this subsystem allows PUPPY Linux a whole range of application that can run OOTB if JAVA was a part of the PUPPY base.

I applaud @Rerwin for his suggestion of a PET for WOOFCE use so that distro builders would have this available in future PUPs they generate for community use. And, correspondingly, I applaud @OscarTalks. @Musher0 and @Semme for providing some foundations to support this.

There are 4 little things mentioned that I think makes sensible steps, much of which has already been undertaken, but, not made formal:
  • A formal PUPPY approach to JAVA, both JRE and JDK library structures, which actually should be the same for both elements
  • Asking community members to assist such that we get it right
  • A utility which may/maynot be needed to afford upgrades under user control
  • WOOFCE embrace
As many members are already aware, @BarryK intends to package a "PUPPY" (used loosely) Developers Edition where JDK, possibly eClipse (fingers crossed), APK and other items to allow anyone wanting to use his PUP to build PUPPY or Android apps can do.
Image
That being said, we/you MUST make @BarryK aware so that his efforts and the work being suggested here, MATCH!. In his doing so, his library structure should match (or our lib structure should match) so that all work done reduces developer and user support efforts/needs in having JAVA in there systems. One installation, no matter which PUPPY distro would be the same everywhere.

This effort and the work of BarryK constitute the making of simultaneous efforts that hoping will meet, together, in the end.

Thus,a 'win-win' for all.

User avatar
SmartDuck
Posts: 14
Joined: Mon 20 Jul 2015, 17:37
Location: Netherlands

#18 Post by SmartDuck »

Semme, I choose to 1.7 package because I know it works with my software and Eclipse Indigo (3.8 ) or Juno (4.2). The later Eclipse versions do not support JavaME.

User avatar
Semme
Posts: 8399
Joined: Sun 07 Aug 2011, 20:07
Location: World_Hub

#19 Post by Semme »

Then the most current 7build is here, not Shino's pkg.
>>> Living with the immediacy of death helps you sort out your priorities. It helps you live a life less trivial <<<

User avatar
rerwin
Posts: 2017
Joined: Wed 24 Aug 2005, 22:50
Location: Maine, USA

java-sfs project working materials

#20 Post by rerwin »

I collected the names of files and links needed to support insertion of a Java JRE directory into a Puppy, from looking at several implementations of an SFS file. I created these lists:
  • Files provided by various implementation, by developer
    Integrated list of files for an implementation
    Consolidated instructions for adding files and links
The instructions are for a direct expansion of a JRE download tarball into a specific directory. Although it should be possible to produce a working Java implementation from those instructions, I have not actually tried them. If anyone does, please tell me of any errors or omissions in the instructions.

I am using the instructions to create my desired implementation of Puppies that can handle a tarball expanded into any of several destination directories - /usr/local, /opt and others that have been used. The tarball could be in an SFS file or pet; the supporting files and links are in a pet intended for woof-CE as part of a Puppy.

The components will be:
  • - A profile code segment file to determine whether a JRE or JDK is installed and set environment variables and links to the detected directory
    - An initialization script to create or remove links for java icons
    - Default application script files that run java apps if present, xarchive if not.
    - A script to run the profile and initialization scripts for use when a JRE/JDK tarball is added/ changed or removed
    - A script to assist with the download process and generate an SFS or pet package
    - desktop files to produce menu entries
I am essentilly merging the techniques used by shinobar (& ubuntu) and Uten, with enhancements from others.

In case anyone wants to check my work, I am attaching the lists I created.

Here are links to the postings used to form the design:
Attachments
Install_Java_in_Puppy_Linux-20150801.txt.gz
(2.46 KiB) Downloaded 282 times
jre-sfs-file_list_by_source-20150801.txt.gz
(930 Bytes) Downloaded 244 times
jre-sfs-file_list_integrated-20150801.txt.gz
(779 Bytes) Downloaded 257 times

Post Reply