在构建Grails应用程序时强制使用javac的-target版本 [英] Forcing javac's -target version while building a Grails application

查看:118
本文介绍了在构建Grails应用程序时强制使用javac的-target版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

世界上有个hello世界的Grails应用程序。 grails war 生成1.5版的.class文件。



如何强制Grails为应用程序生成1.7字节码?

Windows 7,Groovy 2.0.5,Grails 2.1.1,唯一的Java SDK是1.7

解决方案在 conf / BuildConfig.groovy 中可以设置一个属性:

  grails.project.target.level = 1.7 


There is a hello world Grails application. grails war produces .class files of version 1.5.

How to force Grails to produce 1.7 bytecode for an application?

Windows 7, Groovy 2.0.5, Grails 2.1.1, the only Java SDK is 1.7

解决方案

In conf/BuildConfig.groovy there's a property you can set:

grails.project.target.level = 1.7

这篇关于在构建Grails应用程序时强制使用javac的-target版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆