FS#17509 - [jython] wrong $JAVA_HOME

Attached to Project: Community Packages
Opened by Marcos Roriz (marcosRz) - Tuesday, 15 December 2009, 00:41 GMT
Last edited by Chris Brannon (cmb) - Monday, 28 December 2009, 02:25 GMT
Task Type Bug Report
Category
Status Closed
Assigned To Chris Brannon (cmb)
Architecture i686
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
Installed jython and tried to launch the interpretative shell ($ jython) and got:
[marcos@hades ~]$ /usr/bin/jython
/usr/bin/jython: line 270: /usr/lib/jvm/java-6-openjdk/jre/bin/java: Arquivo ou diretório não encontrado

It seems the problem is that the default jython installer put the JDK_HOME variable on the bin script to --> /usr/lib/jvm/java-6-openjdk/jre
which btw is the default jvm directory on ubuntu.

The problem is that I'm using sun JDK and like the java pkgs (both Sun or OpenJDK) they are installed on /opt/java/

Additional info:
Name : jython
Version : 2.5.1-1
URL : http://www.jython.org/
License : PSF APACHE custom

Steps to reproduce:
Install jython with sun jdk


Workaround (FIX):
Changed the variable $JAVA_HOME on the /usr/bin/jython script to /opt/java/jre
This task depends upon

Closed by  Chris Brannon (cmb)
Monday, 28 December 2009, 02:25 GMT
Reason for closing:  Fixed
Additional comments about closing:  This is fixed. I checked the package on both OpenJDK and Sun JRE.

Sorry for the late response, and thanks for the report.
-- Chris
Comment by Chris Brannon (cmb) - Tuesday, 15 December 2009, 01:46 GMT
Yes, the launcher script is autogenerated by the installer, and I built
the package using openjdk. Hence, the incorrect JAVA_HOME for sunjdk.
Since JAVA_HOME is already set in the environment, I could comment out that
line. I'm also tempted to conditionalize it:
if [ -z $JAVA_HOME ]; then
...
fi
We can also get rid of another problem with jython by changing the launcher
script, so I'm going to do that.

Since the launcher is autogenerated, I can't really just apply a patch
to sources. I think I'm just going to include a modified launcher
along with the PKGBUILD.
Comment by Marcos Roriz (marcosRz) - Tuesday, 15 December 2009, 03:09 GMT
If I comment out the line it works fine, maybe all we need is like you said just conditionalize the variable.

Loading...