On Saturday 23 April 2005 18:56, Steve Jacobs wrote:
I've recently installed Jalbum 5.2 on my SUSE 9.1 laptop. I encountered some difficulty during the installation, that makes little sense to me, so I figured maybe you guys and gals could enlighten me.
I thought I should, as a matter of routine, install as root, so prior to installing the app, I su'd. The installation failed, indicating it could not find an installed Java VM. 'which java' returned nothing.
You need to use 'su -' instead of 'su' when you go to root. The extra dash makes sure you get a full user environment as root
As a user, 'which java' found java on the system. SO, I determined the problem was related to a path issue, and tried to add the java directory to root's path using the statement: PATH=$PATH:~/bin:/usr/lib/java/jre/bin/java
You need to use 'export' to make it 'take effect'. So export PATH=$PATH:~/bin:/usr/lib/java/jre/bin/java but if you use the dash when you su, you won't need to
B) Does the command "su -" actually use the path and other environment variables of the user account you are coming from? If not, what does it do?
If you use the dash, it will get the full login procedure, so the PATH variable and other things are set from /etc/profile and other global configuration files, so it should be equivalent to logging in as root on the login prompt. But did you really use the dash? I would have expected 'which java' to work then