Page 1 of 1

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

Posted: Thu Jul 20, 2023 7:22 pm
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

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

Posted: Thu Jul 20, 2023 10:59 pm
by bigpup

What version of Puppy Linux????


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

Posted: Fri Jul 21, 2023 2:17 pm
by MrAccident

@bigpup - F96-CE 4.


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

Posted: Thu Jul 27, 2023 8:07 am
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.


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

Posted: Thu Jul 27, 2023 4:38 pm
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.


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

Posted: Thu Jul 27, 2023 5:40 pm
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. ;)


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

Posted: Thu Jul 27, 2023 9:31 pm
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


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

Posted: Tue Aug 29, 2023 9:05 pm
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


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

Posted: Wed Aug 30, 2023 3:42 pm
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?


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

Posted: Wed Aug 30, 2023 5:53 pm
by rerwin

Just reboot.

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

Richard


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

Posted: Thu Aug 31, 2023 3:37 pm
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.


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

Posted: Fri Sep 01, 2023 2:58 pm
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


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

Posted: Fri Sep 01, 2023 6:00 pm
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)
# 

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

Posted: Fri Sep 01, 2023 10:29 pm
by MrAccident

So I guess it's solved.
Thanks rerwin.


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

Posted: Sat Sep 02, 2023 12:44 am
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 549 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


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

Posted: Sat Sep 02, 2023 6:20 pm
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.


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

Posted: Sat Sep 02, 2023 9:42 pm
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