My pc has two disks, each set up for dual boot with Tumbleweed and Windows 10. My primary disk is an ssd with limited space. I have a program on the other (hdd) that I would like to run from my primary disk. To install on the ssd, I need a special java program (zulu8) which I can no longer find. So that’s another reason to run the existing install on the hdd. When I open a root dolphin and click on the desktop icon on the hdd, an error message pops up that says it can’t find the program. Since it resides on the hdd, I presume the computer is trying to find the program on the ssd.
I drill down to the location of the program on the hdd and try to execute it. I get an error message saying I need to update Oracle Java, which I presume is the zulu8 java and it fails to run. If I boot to TW on the hdd, this program runs normally. That is what I’ve been doing, but rebooting twice each time I want to use the program is annoying and time consuming. I contemplated copying the whole folder system for this program to the ssd but that defeats my goal of saving the limited space available.
Am I trying to do something that can’t be done? I thought a simple link could be set up on the ssd to run the program that resides on hdd.
Hi
So is this device permanent or transient? If permanent and uses fstab and a mount point then that’s what you would use, if transient then what ever it calls itself down in /run/media.
This rather let’s me think the program needs a (specific) Java environment to run. I rather doubt that it can run remotely if it can’t find it’s environment. Could that be provided via LD_LIBRARY?
Well, I never knew there is official Java support for Linux - I mentally got stuck with icedtea… But apparently there is. I have “java-11-openjdk” installed. I didn’t even know. And it seems to be supported by Oracle:https://www.java.com/en/download/
Oracle also provides the latest OpenJDK release under the open source GPL License at jdk.java.net.
I went to the zulu website. It is Azul software product. Near the bottom of the page, it states “completely compatible with Oracle Java.” I suspect the program I am trying to run pulled that in on its own. I didn’t know about zulu prior. I looked for it in yast. It has a zulu repo and the files total about 100MB. After I sort out the script, I will try to run it from the ssd. If the java error message comes again, I will install either the Oracle or Zulu version to see if that resolves the issue of environment.
I’ve tried a lot of options with no success. I didn’t even get far enough to see the java failure. My hdd has zulu java installed from Azul. The sdd has openjdk installed, which I believe is the basis of both zulu and Oracle. But I didn’t get that far yet. I tried to write a script to run the program from the ssd that is installed on the hdd.
#!/bin/bash
# run program from hdd
#/run/media/prexy/c9554cbb-f155-4e5b-aef5-51987573e0b1/home/prexy/program/program.sh
/run/media/prexy/c9554cbb-f155-4e5b-aef5-51987573e0b1/prexy/Desktop/program.sh
I’ve commented out the first version of this script that I tried. When it failed, I located the desktop file on the hdd that ran the program and I adjusted. It also failed. Each variation I made failed with the same message that the file didn’t exist. The file does exist because I can boot to the ssd, click on the desktop icon and it runs. Some variations I tried by drilling down to the actual program, not the desktop link, also without success. Here are just some of the variations I tried:
prexy@linux:~/Desktop> chmod 755 newprogram.sh
prexy@linux:~/Desktop> ./newprogram.sh
./newprogram.sh: line 4: /run/media/prexy/sda7/home/prexy/program/program.sh: No such file or directory
prexy@linux:~/Desktop> chmod 755 newprogram.sh
prexy@linux:~/Desktop> ./newprogram.sh
./newprogram.sh: line 4: /run/media/prexy/sda6/home/prexy/program/program.sh: No such file or directory
prexy@linux:~/Desktop> chmod 755 newprogram.sh
prexy@linux:~/Desktop> ./newprogram.sh
./newprogram.sh: line 4: /run/media/sda6/home/prexy/program/program.sh: No such file or directory
prexy@linux:~/Desktop> ./newprogram.sh
./newprogram.sh: line 4: /run/media/sda6/home/prexy/program/program: No such file or directory
prexy@linux:~/Desktop> chmod 755 newprogram.sh
prexy@linux:~/Desktop> ./newprogram.sh
./newprogram.sh: line 5: /run/media/prexy/c9554cbb-f155-4e5b-aef5-51987573e0b1/prexy/Desktop/program: No such file or directory
prexy@linux:~/Desktop> chmod 755 newprogram.sh
prexy@linux:~/Desktop> ./newprogram.sh
./newprogram.sh: line 5: /run/media/prexy/c9554cbb-f155-4e5b-aef5-51987573e0b1/prexy/Desktop/program.sh: No such file or directory
The chmod you see is when I change a line in the script, I ran chmod again. As I said, I tried lots of variations of the script which I did not keep. Whenever I boot, I get a message to authorize the mount of a partition on the hdd. I varied sdaX to try to find the right one. None worked.Here is fstab on the ssd:
I tried using the mount command with /dev/sda6, tried it with just sda6 and tried with uuid. The error message is always the same:
mount c9554cbb-f155-4e5b-aef5-51987573e0b1
mount: c9554cbb-f155-4e5b-aef5-51987573e0b1: can't find in /etc/fstab.
I was going to add the uuid to fstab but don’t know what to call it. There is already / and /home in fstab. Wouldn’t the logical thing be to call it /home? But wouldn’t that confuse fstab?
Mount always needs device that is being mounted (“what”, “source”) and directory where this device will be mounted (“where”, “target”). If you omit one of the two mandatory parameters, it tries to find suitable line in /etc/fstab to fill in missing information. All of this is even extensively documented in manual page (man 8 mount).
This is confusing to me. I’m trying to post from the ssd, using dolphin to get to the working program on the hdd. java -version gives me this
openjdk version "11.0.10" 2021-01-19
OpenJDK Runtime Environment (build 11.0.10+9-suse-1.3-x8664)
OpenJDK 64-Bit Server VM (build 11.0.10+9-suse-1.3-x8664, mixed mode)
I am certain that when I ran the same command while booted to the hdd, it listed a 10.0 something version with the word zulu substituted for suse. I ran the java -version command while in a terminal that showed me to be in the directory on the hdd of the program in question. In another terminal, in the /Desktop directory of the ssd, the version command gives identical output. Running the other command I get
java -jar launcher-second.jar
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.devexperts.jnlp.JavaLibraryPathUpdater
There were two jar files in the program’s folder. The other was just launcher.jar with the identical output. There was also a error dialog pop-up.
Incompatibility issue. Oracle JRE 8 update 11 or later required to run application. Please update java and ensure it is the first JAVA available in your system path
The program launcher must be looking elsewhere for java since, when booted to the hdd, I do not get this error and the program launches.
[b]erlangen:~ #[/b] update-alternatives --config java
There are 2 choices for the alternative java (providing /usr/bin/java).
Selection Path Priority Status
------------------------------------------------------------
0 /usr/lib/jvm/bellsoft-java15-runtime-full.x86_64/bin/java 1 auto mode
1 /usr/lib/jvm/bellsoft-java15-runtime-full.x86_64/bin/java 1 manual mode
2 /usr/lib64/jvm/jre-15-openjdk/bin/java 0 manual mode
Press <enter> to keep the current choice
[li], or type selection number: 1 [/li]update-alternatives: using /usr/lib/jvm/bellsoft-java15-runtime-full.x86_64/bin/java to provide /usr/bin/java (java) in manual mode
[b]erlangen:~ #[/b]
Sorry it took so long to get back to this. I’ve been fighting other fires. After reading the mount man pages and lots of trial and error, I got the partition to mount using this:
mount UUID=c9554cbb-f155-4e5b-aef5-51987573e0b1 /home
I have not resolved the java issue that karlmistelberger is trying to help me with. My original plan was to use the partition listed above as my /home (on the hdd) rather than using the normal /home on my smaller ssd which I boot from. This is the fstab from the hdd with the above partition:
Having read the mount man pages, I assume it is not as simple as replacing the /home line in this second fstab. Do I need a separate mount command? and if so, where? Am I correct in assuming that the java issue will still need to be fixed if I use /home on the hdd, where the correct version of java resides because Tumbleweed will be trying to run the java installed on the ssd?
Let me save you the trouble of everything discussed to this point in this thread… Throw it all out.
The azul site says that zulu packages are just packages of openjdk, which is the default installed on openSUSE and “zulu 8” means that it’s providing the equivalent of openjdk 8.
The reference to Oracle Java in your earliest posts is because actually there are a number of different Javas from different manufacturers, although Oracle Java is pretty much the standard on PCs, and openjdk is the open sourced reverse engineered version of the proprietary Java from Oracle.
So…
The first thing to realize is that zulu is not an application.
It’s merely the java environment, more specifically the “runtime” environment(JRE) that java applications run in.
For the most part, all java including zulu, Oracle Java and openjdk are backwards compatible but every now and then you might find an app which is unnecessarily picky about running in the right java environment.
So,
Let’s say for example that you have an application that insists on “zulu 8” as a prerequisite and refuses to run in today’s openjdk 10 and 11.
Go to the opensuse software pages and install what you need https://software.opensuse.org/package/java-1_8_0-openjdk
After the install, you’ll have 2 versions of openjdk installed on your system, now you need to switch to the one you want to use by running the following command and following instructions
update-alternatives --config java
Now, if you run something like the following, it should return the java version you’re running
which java
And now you can run whatever java app requires that version of java.
You can leave whatever version of java as the active selection or change back to the original… There’s nothing in a standard openSUSE that uses java.
I did this…and it worked! Not that I can understand it. An older version worked on new application??? Well, it does.
update-alternatives --config java
There are 2 choices for the alternative java (providing /usr/bin/java).
Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/lib64/jvm/jre-11-openjdk/bin/java 2105 auto mode
1 /usr/lib64/jvm/jre-1.8.0-openjdk/bin/java 1805 manual mode
2 /usr/lib64/jvm/jre-11-openjdk/bin/java 2105 manual mode
I selected #1. I opened dolphin, selected (and mounted) the hdd disk, navigated to the desktop and clicked on the application. It opened and worked! Thank you for this solution. Next, I have to resolve how to get the /home on the hdd to open when I boot the ssd. I want to see if that will function smoothly and give me both speed and lots of disk space.