Java SFS loaded, not detected\recognized by the system [solved]

Issues and / or general discussion relating to Puppy

Moderator: Forum moderators

Post Reply
User avatar
MrAccident
Posts: 279
Joined: Mon Aug 03, 2020 4:29 am
Has thanked: 41 times
Been thanked: 8 times

Java SFS loaded, not detected\recognized by the system [solved]

Post by MrAccident »

F96-CE 4
I initially installed Version 1.8 from Wikka. After been told that it's an old version ― I uninstalled it. Then I loaded jre-8u_371-amd64.sfs through SFS-Load.
The system doesn't recognize Java:

Code: Select all

# java -version
bash: java: command not found
# 

There are a few folders with "Java" in their name, in the system; maybe it relates to the problem.

Code: Select all

/opt/jre/legal/javafx
/usr/java
/usr/lib/javaif
Last edited by MrAccident on Fri Sep 01, 2023 10:29 pm, edited 2 times in total.
User avatar
bigpup
Moderator
Posts: 6937
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 898 times
Been thanked: 1511 times

Re: Java isn't detected\recognized by the system

Post by bigpup »

What version of Puppy Linux????

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

User avatar
MrAccident
Posts: 279
Joined: Mon Aug 03, 2020 4:29 am
Has thanked: 41 times
Been thanked: 8 times

Re: Java SFS loaded, not detected\recognized by the system

Post by MrAccident »

@bigpup - F96-CE 4.

User avatar
albinaguerette
Posts: 4
Joined: Sun Jun 18, 2023 4:56 pm
Been thanked: 1 time

Re: Java SFS loaded, not detected\recognized by the system

Post by albinaguerette »

Mb the Java executable isn't in the system's PATH variable.
Verify the presence of the "java" executable in the bin directory of the installed Java version and set the PATH variable to include the Java bin directory.

User avatar
MrAccident
Posts: 279
Joined: Mon Aug 03, 2020 4:29 am
Has thanked: 41 times
Been thanked: 8 times

Re: Java SFS loaded, not detected\recognized by the system

Post by MrAccident »

@albinaguerette

Verify the presence of the "java" executable in the bin directory of the installed Java version

Did you mean /bin/? There's no Java file there.

and set the PATH variable to include the Java bin directory.

Didn't understand this.

User avatar
mikewalsh
Moderator
Posts: 6121
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 781 times
Been thanked: 1955 times

Re: Java SFS loaded, not detected\recognized by the system

Post by mikewalsh »

@MrAccident :-

JRE gets installed to /opt. If you go into /opt, then into "jre", you'll see a /bin directory. Look inside THAT.....and you should find the 'java' executable looking at you:-

Image

The "$PATH" can be modified/added-to by editing /etc/profile....

Mike. ;)

User avatar
rerwin
Posts: 154
Joined: Fri Jul 17, 2020 4:35 pm
Location: Maine, USA
Has thanked: 1 time
Been thanked: 82 times

Re: Java SFS loaded, not detected\recognized by the system

Post by rerwin »

@MrAccident @mikewalsh @bigpup
I have looked into this issue and see that there are several causes of java's not being detected. Multiple scripts are affected.

Please allow me some time to work on correcting the scripts. Apparently, changes in the java packages are confusing them.

For testing, I am using mikewalsh's Java SFS package jre-8u_371-amd64 from
viewtopic.php?p=21405#p21405.
I am also checking with the SourceForge jre-1.8u101-i586 pet package, from the first link in
https://wikka.puppylinux.com/JavaRuntimeEnvironment.

Richard

User avatar
rerwin
Posts: 154
Joined: Fri Jul 17, 2020 4:35 pm
Location: Maine, USA
Has thanked: 1 time
Been thanked: 82 times

Re: Java SFS loaded, not detected\recognized by the system

Post by rerwin »

@MrAccident,

I believe I have fixed the problems you encountered with both of the Java packages you tried.

I have posted the updated Java Interface .pet at viewtopic.php?p=97457#p97457

Sorry to take so long, but there were several other internal issues with it, to be fixed. Thanks for your patience.

Richard

User avatar
MrAccident
Posts: 279
Joined: Mon Aug 03, 2020 4:29 am
Has thanked: 41 times
Been thanked: 8 times

Re: Java SFS loaded, not detected\recognized by the system

Post by MrAccident »

@rerwin - the instructions are very confusing. What do I need to do, keep the Java SFS I have, and only downloading javaif-20230827.pet?

User avatar
rerwin
Posts: 154
Joined: Fri Jul 17, 2020 4:35 pm
Location: Maine, USA
Has thanked: 1 time
Been thanked: 82 times

Re: Java SFS loaded, not detected\recognized by the system

Post by rerwin »

Just reboot.

Then try running 'javaiftest' in a console/terminal to see what got set up. And try your java program.

Richard

User avatar
MrAccident
Posts: 279
Joined: Mon Aug 03, 2020 4:29 am
Has thanked: 41 times
Been thanked: 8 times

Re: Java SFS loaded, not detected\recognized by the system

Post by MrAccident »

@rerwin - what do you mean? I didn't change anything in my system. I was asking - what to do? I have jre-8u_371-amd64.sfs still loaded, since before making this post; that's it.

User avatar
rerwin
Posts: 154
Joined: Fri Jul 17, 2020 4:35 pm
Location: Maine, USA
Has thanked: 1 time
Been thanked: 82 times

Re: Java SFS loaded, not detected\recognized by the system

Post by rerwin »

@MrAccident,
You should just be able to run your java app without doing anything else after rebooting after javaif installation.
(Click on the downloaded .pet to install it. But be patient because it may take a minute.)

Please show me the result of entering javaiftest in a terminal/console window.
Richard

User avatar
MrAccident
Posts: 279
Joined: Mon Aug 03, 2020 4:29 am
Has thanked: 41 times
Been thanked: 8 times

Re: Java SFS loaded, not detected\recognized by the system

Post by MrAccident »

I installed javaif-20230827.pet.
Terminal:

Code: Select all

# javaiftest
Java Interface Test and Demonstration

Environment:
JAVA_HOME=/opt/jre
Java home & version: /opt/jre 8.0_371

which java:   /opt/jre/bin/java
which javaws: /opt/jre/bin/javaws

java -version:
java version "1.8.0_371"
Java(TM) SE Runtime Environment (build 1.8.0_371-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.371-b11, mixed mode)

javaws -version:
Java(TM) Web Start 11.371.2.11-fcs 
Usage:	javaws [run-options] <jnlp-file>
      	javaws [control-options]

where run-options include:
  -verbose       	display additional output
  -offline       	run the application in offline mode
  -system        	run the application from the system cache only
  -Xnosplash     	run without showing a splash screen
  -J<option>     	supply option to the vm
  -wait          	start java process and wait for its exit

control-options include:
  -viewer        	show the cache viewer in the java control panel
  -clearcache    	remove all non-installed applications from the cache
  -uninstall     	remove all applications from the cache
  -uninstall <jnlp-file>              	remove the application from the cache
  -import [import-options] <jnlp-file>	import the application to the cache

import-options include:
  -silent        	import silently (with no user interface)
  -system        	import application into the system cache
  -codebase <url>	retrieve resources from the given codebase
  -shortcut      	install shortcuts as if user allowed prompt
  -association   	install associations as if user allowed prompt


PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/root/my-applications/bin:/usr/games:/opt/jre/bin

LD_LIBRARY_PATH=/lib:/usr/lib:/root/my-applications/lib:/usr/local/lib:/opt/jre/lib/amd64/server

java HelloWorldApp (expect Hello World!):
Hello World!

JNLP demo exammple not usable due to javaws issue.
# 

And Java seems to work:

Code: Select all

# java -version
java version "1.8.0_371"
Java(TM) SE Runtime Environment (build 1.8.0_371-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.371-b11, mixed mode)
# 
User avatar
MrAccident
Posts: 279
Joined: Mon Aug 03, 2020 4:29 am
Has thanked: 41 times
Been thanked: 8 times

Re: Java SFS loaded, not detected\recognized by the system

Post by MrAccident »

So I guess it's solved.
Thanks rerwin.

User avatar
rerwin
Posts: 154
Joined: Fri Jul 17, 2020 4:35 pm
Location: Maine, USA
Has thanked: 1 time
Been thanked: 82 times

Re: Java SFS loaded, not detected\recognized by the system [solved]

Post by rerwin »

I infer that you have run your java program. Thank you for sticking with me on this.

The lines:
java HelloWorldApp (expect Hello World!):
Hello World!
are the test's confirmation.

But there is a problem with the Java-Web part in that the Java package 'javaws' part does not recognize the "-version" option, which it should. It returns an error code because of that, which results in the demo program not being tried. However, when I run the demo (javaws InputVerificationDemo.jnlp) separately, it shows:

Screenshot.png
Screenshot.png (18.95 KiB) Viewed 708 times

Since javaws is a browser plug-in, I assume you do not need that function. And I have not verified that it works as a plug-in.

Richard

User avatar
MrAccident
Posts: 279
Joined: Mon Aug 03, 2020 4:29 am
Has thanked: 41 times
Been thanked: 8 times

Re: Java SFS loaded, not detected\recognized by the system [solved]

Post by MrAccident »

@rerwin - I didn't understand. In the Terminal code I published ― it says Hello World!.
Currently I only need Java for JDownloader; which I already used yesterday, so it works. I never needed Java Browser-Plugins.

User avatar
rerwin
Posts: 154
Joined: Fri Jul 17, 2020 4:35 pm
Location: Maine, USA
Has thanked: 1 time
Been thanked: 82 times

Re: Java SFS loaded, not detected\recognized by the system [solved]

Post by rerwin »

I concluded that you do not need javaws. I just wanted to explain/interpret what javaiftest is telling us, in case anyone else might be concerned about it. I would like to work with someone to get Java-Web (javaws) working, if anyone cares about it.

I am very pleased that java now works for you.

Richard

Post Reply

Return to “Users”