Forums de discussion

Liferay 6.2 SDK still targets Java 1.6?

thumbnail
William Gosse, modifié il y a 8 années.

Liferay 6.2 SDK still targets Java 1.6?

Liferay Master Publications: 533 Date d'inscription: 04/07/10 Publications récentes
I'm curious why the 6.2 SDK's build.properties file still has these to settings in them:
##
## Compiler
##

ant.build.javac.source=1.6
ant.build.javac.target=1.6

Can't we at least move to 1.7 by default now?

This actually drove me a little nuts till I realized that these were being set in this file.
thumbnail
David H Nebinger, modifié il y a 8 années.

RE: Liferay 6.2 SDK still targets Java 1.6?

Liferay Legend Publications: 14916 Date d'inscription: 02/09/06 Publications récentes
The source (and most if not all of the 3rd party jars) all target 1.6, but that doesn't mean you need to.

In this context, it means the source leverages language features of 1.6 only and should be compiled to run on a 1.6 or newer JVM. It doesn't mean you can't use 1.7.

As far as the runtime goes, sure you would want to use a later version, especially if you want support from Oracle. You can certainly run in 1.7 (and later 6.2 releases) or 1.8 without issue.