Skip to main content

All Questions

Tagged with
4 votes
1 answer
108 views

Can Linux files systems resolve a relative path before resolving symlink?

New Linux user here, freshly transitioned from Windows 10 to Fedora 41. Lot's of experience with many OS's, including various *nix and Unix-like file systems. I have a standard practice of using ...
Cornelius Dol's user avatar
0 votes
2 answers
3k views

Unable to locate an executable at "/Library/Java/JavaVirtualMachines

Whenever I try to run any apt command on my Mac I get Unable to locate an executable at "/Library/Java/JavaVirtualMachines/jdk-12.0.1.jdk/Contents/Home/bin/apt" (-1) error. My .bash_profile ...
Parmveer Singh's user avatar
0 votes
1 answer
366 views

Switch ALL Java executable binaries to point to another JDK|JRE version with a single command

I know that I can use update-alternatives util to link specific executalbe to another alternative path. I also know about JAVA_HOME, JDK_HOME, JRE_HOME etc... but I would prefer to manipulate default ...
Carter's user avatar
  • 1,197
0 votes
0 answers
480 views

Unsatisfied Link Error (No such file or directory) on Linux, while file is available at given path

I am loading some .so files in my Java code using System.load("home/projects/proj/my.so"). Where I have given complete path of my .so files. But in my logs I am getting below error: sys:Err: ...
Gaurav Jeswani's user avatar
6 votes
2 answers
14k views

setting JAVA_HOME and PATH with update-alternatives

EDITED The question was more about bash script them java environment and thanks for those whom had the patience and spare the time to reply me. I am much obliged. As for the Java environment I started ...
RicardoPHP's user avatar
0 votes
1 answer
812 views

Are there downsides to setting path locations to symlinks?

I'm setting JAVA_HOME and using the alternatives location of /usr/lib/jvm/jre Which is a simlink to the absolute path of the current active installation. Are there downsides to using this symlinked ...
MarcLaf's user avatar
  • 35
1 vote
0 answers
38 views

Set path for non shell user

I have installed Adopt OpenJDK version of Java. I set it up so all users will have JAVA_HOME set and that the bin folder for Java is in the PATH. However the software I installed afterwards that ...
markbernard's user avatar
1 vote
0 answers
421 views

sudo root cannot find executable on path

I am on CentOS 7.5 and installing OpenJDK 11 from Adopt OpenJDK. It doesn't have an installer package so I am manually putting it in /usr/share. I then create the file /etc/profile.d/java.sh to set up ...
markbernard's user avatar
1 vote
1 answer
1k views

Messed up environment variables in Centos 7

When I am running my maven build I am getting this error: Error: JAVA_HOME is not defined correctly. We cannot execute /usr/bin/bin/java I have edited .bashrc, .profile, /root/.profile and /root/....
Aditi Apte's user avatar
1 vote
1 answer
5k views

linux java -version only works for root user [closed]

I have downloaded and installed jdk1.8.0_151 from oracle website. I defined JAVA_HOME and added it to the PATH variable in my /etc/environment. Problem is when I type java -version command from ...
Ali insan Soyaslan's user avatar
2 votes
1 answer
131 views

Path pathology: java no longer working

There is some problem with my path which disrupts my java services. The components seem to be in the proper location. $ which java /usr/bin/java $ which javac /usr/bin/javac But the version query no ...
dantopa's user avatar
  • 147
3 votes
1 answer
22k views

Why do I see "Unable to locate tools.jar. Expected to find it in ...." when I run ant (on RHEL 6.6) even though the path is set [closed]

I created a script in /etc/profile.d and named it jdk_home.sh. The contents of jdk_home.sh are as follows : #!/bin/sh export JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:/bin/javac::") export ...
a_sid's user avatar
  • 247
1 vote
1 answer
5k views

How to set a path variable without root acess? [duplicate]

My college currently uses a very old (like 3 years old) openJDK 1.7 distribution. And being a student, obviously I don't have root privileges. I wanted to use a much later version downloaded a much ...
user avatar
3 votes
2 answers
231 views

Handling duplicate programs names bash

I'm wondering if $PATH cascades entries. You'll all need to take a leap of faith with me here, but here it goes. Let's say we have a Java executable at /usr/bin/java but this version is very old and ...
djthoms's user avatar
  • 169
2 votes
1 answer
2k views

If I set java bin PATH Dockerfile Jar Command runs but tomcat doesn't

I'm creating a Docker file that FROM's the official TOMCAT 8 docker file and also seeks to use the jar command to extract content from a WAR file so I install openjdk-7-jdk. If I don't set the PATH ...
conteh's user avatar
  • 325

15 30 50 per page