JRE/JDK JAVA PETs/SFSs issues in Puppy <CLOSED>

Using applications, configuring, problems
Message
Author
musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#18 Post by musher0 »

Hello, gcmartin.

What you say is difficult for me to grasp, because I do not have the problem. (See att. 1) As you can see, my Puppy and my machine are not recent.

Off the top of my head I would say that it is a path problem. What does your console output when you type:

Code: Select all

echo $PATH
echo $LD_LIBRARY_PATH
? (See attch. 2)

Every java user should have a profile.local file in /etc with this at the end of it:

Code: Select all

# /etc/profile.local
#
### some entries here, usually.
#
PATH=/mnt/home/java/jre1.7.0_03/bin:$PATH
LD_LIBRARY_PATH=/mnt/home/java/jre1.7.0_03/lib:$LD_LIBRARY_PATH
(Please modify my "/mnt/home/java/jre1.7.0_03" with the proper location where your java is.
"/opt/java/jre<version number>" is the most likely place your java would be installed.)

If your Puppy doesn't recognize the java you have with the above code, I don't know what will... Path definitions work even in Windows! :lol:

Let's forget about java pets, PPM's and sfs's for a minute. It does not really matter which depot you get your java from and in which form. Even if java was embedded in Puppy, if it was not referenced in the PATHs in a manner similar to the above, it would not be found -- neither by Puppy or any system...

At some point, I had the problem too. No java program would launch... until I typed in the proper java paths at the proper place.

Best I can do... Good luck!
Attachments
java-in-path.jpg
(12.88 KiB) Downloaded 1043 times
java-version.jpg
(20.22 KiB) Downloaded 1072 times
Last edited by musher0 on Mon 30 Apr 2012, 22:49, edited 1 time in total.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#19 Post by musher0 »

Double post, sorry about that.
Last edited by musher0 on Mon 30 Apr 2012, 22:50, edited 1 time in total.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

LupuPlusLibre 5.2.8.005-2

#20 Post by shinobar »

gcmartin wrote:Problem #2
This problem I have incurred with the latest versions of Playdayz's PUPs is that when the system is booting using the ISO generated live media (CD/DVD), when one opens a teminal, types "java -version" the system does NOT KNOW ABOUT JAVA!
Have you tried the most recent LupuPlusLibre 5.2.8.005-2?
http://www.murga-linux.com/puppy/viewto ... 054#622054
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

JAVA environment settings

#21 Post by shinobar »

gcmartin wrote:I feel that Shinobar offer a solution, but, that introduces a very specialized installation process that is outside of the PPM process. SFSs are good solutions but the REPOs in Linux still are the tools for installation of subsystems and applications, traditionally.l
No matter PET or SFS, need some knowledge for package builders. I have add some comment at my topic.
Hope package builders look in my package. Its the open source world.
  1. The environment variables are set by the script /etc/profile.d/java.
  2. Mime settings for ROX-Filer is under /etc/xdg/rox.sorceforge.net/MIME-types, /usr/local/apps/ROX-Filer/ROX/MIME
  3. Additional font setting at /usr/java/jre*/lib/fonts/fallback (link to /usr/share/fonts/default/TTF).
http://www.murga-linux.com/puppy/viewtopic.php?t=61287
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

User avatar
stiginge
Posts: 420
Joined: Thu 22 Mar 2007, 10:10
Location: Kerry, Ireland

#22 Post by stiginge »

Why can't I get the routemap here https://www.ryanair.com/ie/cheap-flight-destinations to work? I'm guessing its a java issue, I'm running java 1.7.0-09-b05 on 529full.
Buy silver, crash JPMorgan

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

#23 Post by Semme »

WOW! Cause they're run'n that SilverLight garbage..

User avatar
stiginge
Posts: 420
Joined: Thu 22 Mar 2007, 10:10
Location: Kerry, Ireland

#24 Post by stiginge »

Semme wrote:WOW! Cause they're run'n that SilverLight garbage..
http://www.go-mono.com/moonlight doesnt work
Buy silver, crash JPMorgan

Hogweed
Posts: 96
Joined: Sat 12 Feb 2011, 19:37

#25 Post by Hogweed »

I did have Moonlight (Linux variant of Silverlight) working on Lupu. Worked well for all but encrypted streams which it didn't support. Then Firefox disabled the plugin as not compatible. I used a Firefox addon to over-ride the version checking and it again worked. Then Firefox blacklisted the version check over-ride addon and it stopped working again. Kept an old browser around just to view Silverlight but haven't found the need to use it for ages.

Note: I had to use Moonlight 4 Preview Edition to view most Silverlight apps. Version 2.x is no use for most things. Development was stopped before Moonlight 4 made it to final release but "Preview Edition" is perfectly usable.

Bottom line though is that it is possible to view most non-DRM Silverlight stuff on Puppy but you will have a fight on your hands Starting with getting the download server to respond as has been noted above.

User avatar
stiginge
Posts: 420
Joined: Thu 22 Mar 2007, 10:10
Location: Kerry, Ireland

#26 Post by stiginge »

I was wondering if I updated my java version, would that work?
Buy silver, crash JPMorgan

Hogweed
Posts: 96
Joined: Sat 12 Feb 2011, 19:37

#27 Post by Hogweed »

stiginge wrote:I was wondering if I updated my java version, would that work?
No. Java and Silverlight are completely unrelated. Silverlight was really Microsoft's (incompatible) version of "Flash".

However you should always update Java to latest version as otherwise it is just one large security hole into your box - and that hole gets bigger the more outdated it is. There have been successful attacks against Linux (and Mac) systems via the Java web plugin.

User avatar
stiginge
Posts: 420
Joined: Thu 22 Mar 2007, 10:10
Location: Kerry, Ireland

#28 Post by stiginge »

Hogweed wrote:
stiginge wrote:I was wondering if I updated my java version, would that work?
No. Java and Silverlight are completely unrelated. Silverlight was really Microsoft's (incompatible) version of "Flash".

However you should always update Java to latest version as otherwise it is just one large security hole into your box - and that hole gets bigger the more outdated it is. There have been successful attacks against Linux (and Mac) systems via the Java web plugin.
Unfortunately much of the advice semme provides is erroneous :roll:

How do I go about updating my java?
Buy silver, crash JPMorgan

Hogweed
Posts: 96
Joined: Sat 12 Feb 2011, 19:37

#29 Post by Hogweed »

To get the official full package go to https://www.java.com/en/download/manual.jsp If there's a PET or SFS for the latest version then you can use that but I don't think there is yet.

And download the Linux RPM version then just click on it and let Puppy install it. You will then have to link the plugin to the browser plugin direcory which is normally /usr/lib/mozilla/plugins - delete the existing libnpjp2.so from that directory and link the version in /usr/java/jre1.7.0_17/lib/i386/libnpjp2.so in its place. That's the current Java version as of writing. If you drag the file from one folder to another select Link relative as the copy option.

If you use command line Java you might want to modify PATH or link java binary to /usr/local/bin/ directory as well.
Last edited by Hogweed on Mon 11 Mar 2013, 19:53, edited 1 time in total.

User avatar
stiginge
Posts: 420
Joined: Thu 22 Mar 2007, 10:10
Location: Kerry, Ireland

#30 Post by stiginge »

hey Hogweed, I've got the latest java (1.7.0) which should be good enough to run this website, however its still not downloading/running for mehere
Buy silver, crash JPMorgan

Hogweed
Posts: 96
Joined: Sat 12 Feb 2011, 19:37

#31 Post by Hogweed »

stiginge wrote:hey Hogweed, I've got the latest java (1.7.0) which should be good enough to run this website, however its still not downloading/running for mehere
As I said above you cannot play a Silverlight application with Java. It will never ever work. Also Java 1.7.0 is old and dangerous. Latest version identifies itself as,

sh-3.00# java -version
java version "1.7.0_17"
Java(TM) SE Runtime Environment (build 1.7.0_17-b02)
Java HotSpot(TM) Client VM (build 23.7-b01, mixed mode)
sh-3.00#

===
So the only way you might get the Ryan Air app to display is via Moonlight and that's a real pain as I also said above. I have no idea why Ryan Air went with Silverlight. Probably just to annoy non Microsoft users.

User avatar
James C
Posts: 6618
Joined: Thu 26 Mar 2009, 05:12
Location: Kentucky

#32 Post by James C »

Just to confirm that the problem is Silverlight....
Personally never had much luck with Moonlight so good luck.
Attachments
silverlight.JPG
(42.09 KiB) Downloaded 2589 times

User avatar
stiginge
Posts: 420
Joined: Thu 22 Mar 2007, 10:10
Location: Kerry, Ireland

#33 Post by stiginge »

sh-4.1# java -version
java version "1.7.0_13"
Java(TM) SE Runtime Environment (build 1.7.0_13-b20)
Java HotSpot(TM) Client VM (build 23.7-b01, mixed mode)
sh-4.1#


8)
Buy silver, crash JPMorgan

Hogweed
Posts: 96
Joined: Sat 12 Feb 2011, 19:37

#34 Post by Hogweed »

I've had a go at getting Moonlight running in Precise Puppy. Managed to get Moonlight 2 to work with latest Firefox (seems it no longer blocks it) but it is not able to display the Ryan Air app because it needs a later version. Eventually found a copy of Moonlight 4 and tried that. Plugin installs but crashes when called with some bizarre error about invalid argument to "MONO_DEBUG" (which it had just set itself). Might investigate further later. But not now.

Code: Select all

Moonlight: 3.99.0.3
Moonlight: Attempting to load libmoonloaderxpi 
debug_get_option: GALLIUM_DRIVER = softpipe
Moonlight: Installing signal handlers for crash reporting.
Moonlight: Enabling MONO_DEBUG=keep-delegates,reverse-pinvoke-exceptions and MOONLIGHT_ENABLE_CONSOLE=1
Invalid option for the MONO_DEBUG env variable: keep-delegates,
Available options: 'handle-sigint', 'keep-delegates', 'reverse-pinvoke-exceptions', 'collect-pagefault-stats', 'break-on-unverified', 'no-gdb-backtrace', 'dont-free-domains', 'suspend-on-sigsegv', 'suspend-on-unhandled', 'dyn-runtime-invoke', 'gdb', 'explicit-null-checks', 'init-stacks'
Rebooted my old Lucid Puppy and now get the same error with it even though I know it worked at one time.

EDIT: Set the env variable to "" and this time got

Code: Select all

Got a SIGSEGV while executing native code.                        
 We'll first ask gdb for a stack trace, then try our own     
 stack walking method (usually not as good as gdb, but it    
 can do managed and native stack traces together)            
=============================================================


Debug info from gdb:

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/libthread_db.so.1".
[New Thread 0xb369fb40 (LWP 27858)]
0xffffe430 in __kernel_vsyscall ()
  Id   Target Id         Frame 
  2    Thread 0xb369fb40 (LWP 27858) "Chrome_ChildThr" 0xffffe430 in __kernel_vsyscall ()
* 1    Thread 0xb41a48c0 (LWP 27857) "plugin-containe" 0xffffe430 in __kernel_vsyscall ()

Thread 2 (Thread 0xb369fb40 (LWP 27858)):
#0  0xffffe430 in __kernel_vsyscall ()
#1  0xb53bae77 in syscall () from /lib/libc.so.6
#2  0xb6d0a13b in ?? () from /root/my-documents/firefox/libxul.so
#3  0x000003ff in ?? ()
#4  0xb3f37000 in ?? ()
#5  0x00000000 in ?? ()

Thread 1 (Thread 0xb41a48c0 (LWP 27857)):
#0  0xffffe430 in __kernel_vsyscall ()
#1  0xb76dd9db in read () from /lib/libpthread.so.0
#2  0xb253ca84 in print_gdb_trace () at debug.cpp:844
#3  0xb253e2a9 in moonlight_handle_native_sigsegv (signal=11) at debug.cpp:903
#4  0xb293a425 in mono_chain_signal (_dummy=11, info=0xb2308c8c, context=0xb2308d0c) at mini-posix.c:173
#5  0xb285a003 in mono_sigsegv_signal_handler (_dummy=11, info=0xb2308c8c, context=0xb2308d0c) at mini.c:5853
#6  <signal handler called>
#7  0xb76c3c78 in mozalloc_abort(char const*) () from /root/my-documents/firefox/libmozalloc.so
#8  0x00000000 in ?? ()

Debug info from libmoon:

	/initrd/pup_rw/root/.mozilla/firefox/nil8za1c.default/extensions/moonlight@novell.com/plugins/moonlight/libmoonpluginxpi.so [0xb253e2d8] moonlight_handle_native_sigsegv /home/builder/moon/src/debug.cpp:908
	/initrd/pup_rw/root/.mozilla/firefox/nil8za1c.default/extensions/moonlight@novell.com/plugins/moonlight/libmoonpluginxpi.so [0xb293a425] mono_chain_signal /home/builder/mono/mono/mini/mini-posix.c:182
	/initrd/pup_rw/root/.mozilla/firefox/nil8za1c.default/extensions/moonlight@novell.com/plugins/moonlight/libmoonpluginxpi.so [0xb285a003] mono_sigsegv_signal_handler /home/builder/mono/mono/mini/mini.c:5853


j2mac2
Posts: 1
Joined: Thu 16 May 2013, 02:38

JRE or JAVA PETs issues in Puppy LInux distros

#35 Post by j2mac2 »

Well, I'm new to this computer stuff, and I'm up in age, so my reading comprehension at times is not up to snuff. Nothing wrong with being savvy, but the question was if there is a .pet for jre. Will someone please post a link to the darn .pet?!?!

User avatar
Monsie
Posts: 631
Joined: Thu 01 Dec 2011, 07:37
Location: Kamloops BC Canada

Re: JRE or JAVA PETs issues in Puppy LInux distros

#36 Post by Monsie »

j2mac2 wrote:Well, I'm new to this computer stuff, and I'm up in age, so my reading comprehension at times is not up to snuff. Nothing wrong with being savvy, but the question was if there is a .pet for jre. Will someone please post a link to the darn .pet?!?!
Hi j2mac2,

Welcome to the Forum.... :)

You can find a Pet Package for Java over here.

Monsie
My [u]username[/u] is pronounced: "mun-see". Derived from my surname, it was my nickname throughout high school.

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#37 Post by musher0 »

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. :) 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: Select all

#!/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
Attachments
Instl-Java.sh.zip
This zip contains the same as the above; saves you the fuss of copying and saving to your &quot;/root/my-applications/bin&quot; path. Still, don't forget to make executable.
(1.98 KiB) Downloaded 823 times
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

Post Reply