Java path issue (Unix/Linux)
Posted: Fri Dec 28, 2007 11:56 am
Hi,
After upgrading my Linux system(s) to a newer release, the GUIserver did not run anymore.
After some troubleshooting it appears that the file '/usr/share/newlisp/guiserver.lsp' looks for a Java binary in '/usr/bin'.
However, on Slackware-like systems (also Zenwalk) the java binary resides in '/usr/lib/java/bin'.
Starting a GUI program now returns "Could not connect to guiserver".
Porbably the hardcoded path for the Java binary should be changed to a more flexible mechanism?
What we suggest is using the environment variable "JAVA_HOME". This variable should point to the installation directory of Java on a Unix/Linux system. On my system it points to '/usr/lib/java'. The Java binary then can be found in the 'bin' subdirectory, e.g. $JAVA_HOME/bin.
This solution should work for all Unix/BSD/Linux systems.
Regards
Peter
After upgrading my Linux system(s) to a newer release, the GUIserver did not run anymore.
After some troubleshooting it appears that the file '/usr/share/newlisp/guiserver.lsp' looks for a Java binary in '/usr/bin'.
However, on Slackware-like systems (also Zenwalk) the java binary resides in '/usr/lib/java/bin'.
Starting a GUI program now returns "Could not connect to guiserver".
Porbably the hardcoded path for the Java binary should be changed to a more flexible mechanism?
What we suggest is using the environment variable "JAVA_HOME". This variable should point to the installation directory of Java on a Unix/Linux system. On my system it points to '/usr/lib/java'. The Java binary then can be found in the 'bin' subdirectory, e.g. $JAVA_HOME/bin.
This solution should work for all Unix/BSD/Linux systems.
Regards
Peter