summaryrefslogtreecommitdiff
blob: 045eb962b39d0c3a88c2b4848f1c521b3310d0c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License, v2 or later
# $Header: /var/cvsroot/gentoo-x86/dev-java/java-config/files/Attic/java-config-2.profiled,v 1.3 2006/08/25 02:13:17 nichoj Exp $

# If we have a current-user-vm (and aren't root)... set it to JAVA_HOME
gentoo_user_vm="${HOME}/.gentoo/java-config-2/current-user-vm"
gentoo_system_vm="/etc/java-config-2/current-system-vm"

if [[ ${UID} != 0 && -L ${gentoo_user_vm} ]]; then
	export JAVA_HOME=${gentoo_user_vm}
# Otherwise set to the current system vm
elif [[ -L /etc/java-config-2/current-system-vm ]]; then
	export JAVA_HOME=${gentoo_system_vm}
fi
export JDK_HOME=${JAVA_HOME}
export JAVAC=${JDK_HOME}/bin/javac
unset gentoo_user_vm gentoo_system_vm