Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

JDK 1.7 Support Added

* Updated build.xml files with 1.6 source and target values.
  We currently compile using the 1.7 compiler, but only support
  1.6 language features. (Used JDK 1.7 patch provided by agrimm)

* Updated JDK checking in eucalyptus-cloud init script.

* Updated Java versions in configure script.

* Updated INSTALL documentation to refer to JDK 1.7 packages.
  • Loading branch information...
commit e3717455d889370d754f48341cc91ef8f0a73811 1 parent d7e6847
Matt Spaulding authored
10  INSTALL
@@ -223,7 +223,7 @@ There are a few different Eucalyptus components that run on either the 'front-en
223 223
 
224 224
 Front-end run-time dependencies
225 225
 
226  
-    * Java 6 is needed by the Eucalyptus components running on the front end. Note that GNU Compiler for Java (gcj), included by default with some Linux distributions, is not sufficient. Make sure that your JAVA_HOME environment variable is set to the location of your JDK.
  226
+    * Java 7 is needed by the Eucalyptus components running on the front end. Note that GNU Compiler for Java (gcj), included by default with some Linux distributions, is not sufficient. Make sure that your JAVA_HOME environment variable is set to the location of your JDK.
227 227
     * Perl is used by helper scripts
228 228
     * The head node must run a server on port 25 that can deliver or relay email messages to cloud users' email addresses. This can be Sendmail, Exim, or postfix, or even something simpler, given that this server does not have to be able to receive incoming mail. Many Linux distributions satisfy this requirement out of the box. To test whether you have a properly functioning mail relay for localhost, try to send email to yourself from the terminal using "mail".
229 229
     * Dependencies for network support differ depending on the mode used (see Eucalyptus Network Configuration for details). For full functionality satisfy all of them:
@@ -269,21 +269,21 @@ What follows is a superset of all packages necessary for building and running Eu
269 269
 
270 270
     * For Opensuse 11.2, download and install RPMs the appropriate OpenSUSE RPM dependency package from the Eucalyptus website, then run the following command to install all required dependency packages: 
271 271
 
272  
-zypper -n install curl bzr python-paramiko make gcc ant apache2 apache2-prefork apache2-devel java-1_6_0-openjdk java-1_6_0-openjdk-devel libvirt-devel libcurl-devel vlan dhcp-server bridge-utils ant-contrib ant-nodeps openssl libvirt libcurl-devel vlan apache2 perl-Crypt-OpenSSL-Random perl-Crypt-OpenSSL-RSA libfuse2 tgt swig
  272
+zypper -n install curl bzr python-paramiko make gcc ant apache2 apache2-prefork apache2-devel java-1_7_0-openjdk java-1_7_0-openjdk-devel libvirt-devel libcurl-devel vlan dhcp-server bridge-utils ant-contrib ant-nodeps openssl libvirt libcurl-devel vlan apache2 perl-Crypt-OpenSSL-Random perl-Crypt-OpenSSL-RSA libfuse2 tgt swig
273 273
 
274 274
     * For Ubuntu 10.04, run the following command to install all required dependency packages: 
275 275
 
276  
-apt-get install bzr gcc make apache2-threaded-dev ant openjdk-6-jdk\
  276
+apt-get install bzr gcc make apache2-threaded-dev ant openjdk-7-jdk\
277 277
    libvirt-dev libcurl4-openssl-dev dhcp3-server vblade apache2 unzip curl vlan\
278 278
    bridge-utils libvirt-bin kvm vtun
279 279
 
280 280
     * For CentOS 5 and Fedora 12, download and install RPMs the appropriate CentOS or Fedora RPM dependency package from the Eucalyptus website, then run the following command to install all required dependency packages: 
281 281
 
282  
-yum install -y java-1.6.0-openjdk-devel ant ant-nodeps libvirt-devel curl-devel httpd httpd-devel apr-devel openssl-devel dhcp libxml2 libxml2-devel gnutls gnutls-devel xen-devel libgcrypt-devel zlib-devel perl-Convert-ASN1 perl-Crypt-OpenSSL-RSA perl-Crypt-OpenSSL-Random chkfontpath scsi-target-utils fuse-libs swig gcc
  282
+yum install -y java-1.7.0-openjdk-devel ant ant-nodeps libvirt-devel curl-devel httpd httpd-devel apr-devel openssl-devel dhcp libxml2 libxml2-devel gnutls gnutls-devel xen-devel libgcrypt-devel zlib-devel perl-Convert-ASN1 perl-Crypt-OpenSSL-RSA perl-Crypt-OpenSSL-Random chkfontpath scsi-target-utils fuse-libs swig gcc
283 283
 
284 284
     * For Debian, run the following command to install all required dependency packages: 
285 285
 
286  
-apt-get install gcc make apache2-threaded-dev ant openjdk-6-jdk\
  286
+apt-get install gcc make apache2-threaded-dev ant openjdk-7-jdk\
287 287
    libvirt-dev libcurl4-dev dhcp3-server vblade apache2 unzip curl vlan\
288 288
    bridge-utils libvirt-bin kvm sudo vtun
289 289
 
4  clc/modules/module-inc.xml
@@ -176,7 +176,7 @@
176 176
 		<echo message="[COMPILE] ${builder.target} for ${ant.project.name}" />
177 177
 		<antcall target="clean" />
178 178
 		<antcall target="build-mkdirs" inheritall="true" inheritrefs="true" />
179  
-		<javac srcdir="${src.dir}" classpathref="classpath" destdir="${build.dir}" deprecation="false" failonerror="true" debug="true" sourcepathref="srcpath" target="1.5" listfiles="true" />
  179
+		<javac srcdir="${src.dir}" classpathref="classpath" destdir="${build.dir}" deprecation="false" failonerror="true" debug="true" sourcepathref="srcpath" source="1.6" target="1.6" listfiles="true" />
180 180
 	</target>
181 181
 	<target name="should-build-groovy">
182 182
 		<mkdir dir="${build.dir}" />
@@ -190,7 +190,7 @@
190 190
 		<antcall target="build-mkdirs" inheritall="true" inheritrefs="true" />
191 191
 		<taskdef name="groovyc" classname="org.codehaus.groovy.ant.Groovyc" classpathref="classpath" />
192 192
 		<groovyc srcdir="${src.dir}" classpathref="classpath" sourcepathref="srcpath" destdir="${build.dir}" verbose="true" listfiles="true">
193  
-			<javac target="1.5" debug="true" />
  193
+			<javac source="1.6" target="1.6" debug="true" />
194 194
 		</groovyc>
195 195
 	</target>
196 196
 	<target name="builder-test">
2  clc/modules/msgs/src/main/java/edu/ucsb/eucalyptus/msgs/BaseMessage.java
@@ -280,7 +280,7 @@ public boolean apply( Class arg0 ) {
280 280
     try {
281 281
       Class responseClass = ClassLoader.getSystemClassLoader( ).loadClass( replyType );
282 282
       reply = ( TYPE ) responseClass.newInstance( );
283  
-      reply.correlationId = this.correlationId;
  283
+      reply.setCorrelationId ( this.correlationId );
284 284
     } catch ( Exception e ) {
285 285
       Logger.getLogger( BaseMessage.class ).debug( e, e );
286 286
       throw new TypeNotPresentException( this.correlationId, e );
2  clc/modules/storage-controller/build.xml
@@ -74,7 +74,7 @@
74 74
 		<antcall target="build-java" />
75 75
 		<antcall target="jar" />
76 76
 		<mkdir dir="include" />
77  
-		<javah classpath="${build.dir}" destdir="include" force="yes">
  77
+		<javah classpath="${build.dir}:${modules.dir}/core/build:${modules.dir}/msgs/build:${modules.dir}/storage-common/build:${lib.dir}/groovy-all-1.7.2.jar:${lib.dir}/hibernate-3.5.6-Final.jar" destdir="include" force="yes">
78 78
 			<class name="com.eucalyptus.storage.OverlayManager" />
79 79
 			<class name="com.eucalyptus.storage.DASManager" />
80 80
 		</javah>
2  clc/modules/www/build.xml
@@ -123,7 +123,7 @@
123 123
 	<target name="compile-src">
124 124
 		<mkdir dir="${build.dir}"/>
125 125
 		<mkdir dir="${test.dir}"/>
126  
-		<javac deprecation="false" srcdir="${src.dir}" destdir="${build.dir}" classpathref="gwtclasspath" failonerror="true" debug="true" target="1.5" />
  126
+		<javac deprecation="false" srcdir="${src.dir}" destdir="${build.dir}" classpathref="gwtclasspath" failonerror="true" debug="true" source="1.6" target="1.6" />
127 127
 	</target>
128 128
 
129 129
 	<target name="clean">
22  configure
... ...
@@ -1,6 +1,6 @@
1 1
 #! /bin/sh
2 2
 # Guess values for system-dependent variables and create Makefiles.
3  
-# Generated by GNU Autoconf 2.63 for Eucalyptus 3.2.1.
  3
+# Generated by GNU Autoconf 2.63 for Eucalyptus 3.3.0.
4 4
 #
5 5
 # Report bugs to <community@lists.eucalyptus.com>.
6 6
 #
@@ -596,8 +596,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
596 596
 # Identity of this package.
597 597
 PACKAGE_NAME='Eucalyptus'
598 598
 PACKAGE_TARNAME='eucalyptus'
599  
-PACKAGE_VERSION='3.2.1'
600  
-PACKAGE_STRING='Eucalyptus 3.2.1'
  599
+PACKAGE_VERSION='3.3.0'
  600
+PACKAGE_STRING='Eucalyptus 3.3.0'
601 601
 PACKAGE_BUGREPORT='community@lists.eucalyptus.com'
602 602
 
603 603
 ac_unique_file="wsdl/eucalyptus_nc.wsdl"
@@ -1306,7 +1306,7 @@ if test "$ac_init_help" = "long"; then
1306 1306
   # Omit some internal or obsolete options to make the list less imposing.
1307 1307
   # This message is too long to be a string in the A/UX 3.1 sh.
1308 1308
   cat <<_ACEOF
1309  
-\`configure' configures Eucalyptus 3.2.1 to adapt to many kinds of systems.
  1309
+\`configure' configures Eucalyptus 3.3.0 to adapt to many kinds of systems.
1310 1310
 
1311 1311
 Usage: $0 [OPTION]... [VAR=VALUE]...
1312 1312
 
@@ -1370,7 +1370,7 @@ fi
1370 1370
 
1371 1371
 if test -n "$ac_init_help"; then
1372 1372
   case $ac_init_help in
1373  
-     short | recursive ) echo "Configuration of Eucalyptus 3.2.1:";;
  1373
+     short | recursive ) echo "Configuration of Eucalyptus 3.3.0:";;
1374 1374
    esac
1375 1375
   cat <<\_ACEOF
1376 1376
 
@@ -1473,7 +1473,7 @@ fi
1473 1473
 test -n "$ac_init_help" && exit $ac_status
1474 1474
 if $ac_init_version; then
1475 1475
   cat <<\_ACEOF
1476  
-Eucalyptus configure 3.2.1
  1476
+Eucalyptus configure 3.3.0
1477 1477
 generated by GNU Autoconf 2.63
1478 1478
 
1479 1479
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1487,7 +1487,7 @@ cat >config.log <<_ACEOF
1487 1487
 This file contains any messages produced by compilers while
1488 1488
 running configure, to aid debugging if configure makes a mistake.
1489 1489
 
1490  
-It was created by Eucalyptus $as_me 3.2.1, which was
  1490
+It was created by Eucalyptus $as_me 3.3.0, which was
1491 1491
 generated by GNU Autoconf 2.63.  Invocation command line was
1492 1492
 
1493 1493
   $ $0 $@
@@ -3750,13 +3750,13 @@ EXTENSIONS=""
3750 3750
 ANT=""
3751 3751
 JAVA=""
3752 3752
 WSDL2C=""
3753  
-java_min_version="1.6.0"
  3753
+java_min_version="1.7.0"
3754 3754
 ant_min_version="1.6.5"
3755 3755
 
3756 3756
 # these are for large files (>2GB)
3757 3757
 LDFLAGS="`getconf LFS64_LDFLAGS` `getconf LFS_LDFLAGS` $LDFLAGS"
3758 3758
 LIBS="`getconf LFS64_LIBS` `getconf LFS_LIBS` $LIBS"
3759  
-CFLAGS="${CFLAGS} `getconf LFS64_CFLAGS` `getconf LFS_CFLAGS`"
  3759
+CFLAGS="`getconf LFS64_CFLAGS` `getconf LFS_CFLAGS`"
3760 3760
 
3761 3761
 # compile options
3762 3762
 CFLAGS="${CFLAGS} -Wall -fPIC -DHAVE_CONFIG_H -std=gnu99"
@@ -11699,7 +11699,7 @@ exec 6>&1
11699 11699
 # report actual input values of CONFIG_FILES etc. instead of their
11700 11700
 # values after options handling.
11701 11701
 ac_log="
11702  
-This file was extended by Eucalyptus $as_me 3.2.1, which was
  11702
+This file was extended by Eucalyptus $as_me 3.3.0, which was
11703 11703
 generated by GNU Autoconf 2.63.  Invocation command line was
11704 11704
 
11705 11705
   CONFIG_FILES    = $CONFIG_FILES
@@ -11758,7 +11758,7 @@ Report bugs to <bug-autoconf@gnu.org>."
11758 11758
 _ACEOF
11759 11759
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11760 11760
 ac_cs_version="\\
11761  
-Eucalyptus config.status 3.2.1
  11761
+Eucalyptus config.status 3.3.0
11762 11762
 configured by $0, generated by GNU Autoconf 2.63,
11763 11763
   with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
11764 11764
 
2  configure.ac
@@ -43,7 +43,7 @@ EXTENSIONS=""
43 43
 ANT=""
44 44
 JAVA=""
45 45
 WSDL2C=""
46  
-java_min_version="1.6.0"
  46
+java_min_version="1.7.0"
47 47
 ant_min_version="1.6.5"
48 48
 
49 49
 # these are for large files (>2GB)
15  tools/eucalyptus-cloud.in
@@ -160,6 +160,10 @@ pidfile=$EUCALYPTUS/var/run/eucalyptus/eucalyptus-cloud.pid
160 160
 initlog=$EUCALYPTUS/var/log/eucalyptus/startup.log
161 161
 
162 162
 check_java_version() {
  163
+    local req_version=1.7.0
  164
+    local req_patch=09
  165
+    local error_msg="ERROR: JVM $req_version patch $req_patch or newer is required"
  166
+
163 167
     # First check CLOUD_OPTS for --java-home
164 168
     JAVA=""
165 169
     JH=$( echo $CLOUD_OPTS | \
@@ -170,6 +174,7 @@ check_java_version() {
170 174
         elif [ -x $JH/bin/java ]; then
171 175
             JAVA=$JH/bin/java
172 176
         fi
  177
+    # Next try JAVA_HOME
173 178
     elif [ -n "$JAVA_HOME" ]; then
174 179
         if [ -x $JAVA_HOME/jre/bin/java ]; then
175 180
             JAVA=$JAVA_HOME/jre/bin/java
@@ -177,18 +182,20 @@ check_java_version() {
177 182
             JAVA=$JAVA_HOME/bin/java
178 183
         fi
179 184
     fi
  185
+    # Last use java from PATH
180 186
     if [ -z "$JAVA" ]; then
181 187
         JAVA=$( which java )
182 188
     fi
  189
+    # Compare Java version against requirements
183 190
     JV=$( $JAVA -version 2>&1 | \
184 191
           sed -r -e '/^java version/!d; s/^java version "(.*)"/\1/' )
185 192
     VER=$( echo $JV | cut -d_ -f1 )
186 193
     PATCH=$( echo $JV | cut -d_ -f2 )
187  
-    if [ "$VER" != "1.6.0" ]; then
188  
-        echo "ERROR: Only JVM 1.6.0 is supported" >&2
  194
+    if [ "$VER" != "$req_version" ]; then
  195
+        echo "$error_msg" >&2
189 196
         exit 1
190  
-    elif [ -z "$PATCH" ] || [ $PATCH -lt 20 ]; then
191  
-        echo "ERROR: JVM 1.6.0 patch 20 or newer is required" >&2
  197
+    elif [ -z "$PATCH" ] || [ $PATCH -lt $req_patch ]; then
  198
+        echo "$error_msg" >&2
192 199
         exit 1
193 200
     fi
194 201
 }

0 notes on commit e371745

Please sign in to comment.
Something went wrong with that request. Please try again.