[Webfunds-commits] java init_java
Ian Grigg
iang@cypherpunks.ai
Thu, 12 Apr 2001 01:12:54 -0400 (AST)
iang 01/04/12 01:12:54
Modified: . init_java
Log:
attempt at better way of looking for SWING, now that we are in a position
of deprecating J1.1
Revision Changes Path
1.10 +31 -17 java/init_java
Index: init_java
===================================================================
RCS file: /home/webfunds/cvsroot/java/init_java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- init_java 2001/02/09 19:47:14 1.9
+++ init_java 2001/04/12 05:12:54 1.10
@@ -37,6 +37,8 @@
: ${JAVAC_FLAGS:="-g"}
export JIKES_FLAGS JAVAC_FLAGS
+swing_required=false
+
#
# You should set the location of JAVA_HOME and SWING in this
# file, which will never be overwritten by the distribution.
@@ -62,6 +64,12 @@
export JAVAC=${j}/bin/javac # the compiler
export JD=${j}/bin/javadoc # make doco
SUNCLASSES=${j}/lib/classes.zip # for Jikes
+
+ # SWING is required for JDK 1.1, also for jikes
+ case ${j} in
+ *jdk1.1*) swing_required=true ;;
+ esac
+
break
fi
done
@@ -85,6 +93,7 @@
# It tends to be installed in the PATH, but needs
# the Sun classes in the CLASSPATH.
#
+ swing_required=true
if [ ! -r "${SUNCLASSES}" ]
then
#
@@ -114,24 +123,29 @@
# : ${JAVAC:=${JC}}
# export JAVAC
-
-#
-# Search for a Swing library and a JVM.
-# SWING might come from the environment.
-# $swing might have been set in old locals.
-#
-for j in $SWING $swing ${swings}
-do
- if [ -r ${j} ]
- then
- export SWING=${j}
- break
- fi
-done
-if [ -r "${SWING}" ]
+if ${swing_required}
then
- echo "found Swing in ${SWING}"
+ #
+ # Search for a Swing library.
+ # SWING might come from the environment.
+ # $swing might have been set in old locals.
+ #
+ for j in $SWING $swing ${swings}
+ do
+ if [ -r ${j} ]
+ then
+ export SWING=${j}
+ break
+ fi
+ done
+
+ if [ -r "${SWING}" ]
+ then
+ echo "found Swing in ${SWING}"
+ else
+ echo "No SWING found, Applications won't work!"
+ fi
else
- echo "No SWING found, Applications won't work!"
+ echo "(ignoring SWING)"
fi