Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:lafenghu
jpackage-utils
jpackage-utils-prefer-jre.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File jpackage-utils-prefer-jre.patch of Package jpackage-utils
Index: jpackage-utils-1.7.5/java-utils/java-functions =================================================================== --- jpackage-utils-1.7.5.orig/java-utils/java-functions 2012-01-20 09:39:48.000000000 +0100 +++ jpackage-utils-1.7.5/java-utils/java-functions 2012-01-20 09:39:58.979978080 +0100 @@ -24,11 +24,26 @@ [ ! -z "$_JAVA_HOME" -a -d "$_JAVA_HOME" ] && JAVA_HOME="$_JAVA_HOME" # Test default JRE/JVM roots if nothing is defined yet -[ -z "$JAVA_HOME" -a -d "$JVM_ROOT/java" ] && JAVA_HOME="$JVM_ROOT/java" -[ -z "$JAVA_HOME" -a -d "$JVM_ROOT/jre" ] && JAVA_HOME="$JVM_ROOT/jre" +_set_java_home() { + if [ -z "$JAVA_HOME" ] ; then + local _java_dirs="java" + case "$_prefer_jre" in + 1|[Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]) _java_dirs="jre $_java_dirs" ;; + *) _java_dirs="$_java_dirs jre" ;; + esac + for d in $_java_dirs ; do + if [ -d "$JVM_ROOT/$d" ] ; then + JAVA_HOME="$JVM_ROOT/$d" + break + fi + done + fi +} # Set the java virtual machine set_jvm() { + _set_java_home + # use $JAVA_HOME if defined if [ -n "$JAVA_HOME" ] ; then return @@ -60,6 +75,8 @@ # Set the classpath # This requires a valid JAVA_HOME, JAVACMD, and JAVA_LIBDIR set_classpath() { + _set_java_home + # get local classpath first jars=$@ if [ -n "$ADDITIONAL_JARS" ] ; then @@ -130,6 +147,8 @@ # Set JVM-related directories # Requires a correct $JAVA_LIBDIR, $JAVA_HOME and $JAVA_CMD set_jvm_dirs() { + _set_java_home + # Jar repository provided by the JVM JVM_LIBDIR=$JVM_ROOT-exports/$(echo "$JAVA_HOME" |\ sed -n "s+$JVM_ROOT/\([-_[:alnum:].]*\)\(.*\)+\1+p")
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor