是否有可能在Glassfish 3上使用Java 8? [英] Will it be possible to use Java 8 on Glassfish 3?

查看:536
本文介绍了是否有可能在Glassfish 3上使用Java 8?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们目前使用的是Glassfish 3,而且我真的想使用Java 8.我尝试升级到Glassfish 4,但是我在Glassfish 4代码中遇到了两个错误,所以我不得不恢复到Glassfish 3.Where Glassfish 3与Java一起工作8或我将不得不升级我的应用程序容器?

解决方案

不,不可能(目前,也许解决方法将在稍后发生)。



我尝试了Glassfish 3.1.1和Glassfish 3.1.2.2以及今天发布的最终Java 8 JDK。它甚至不启动服务器,一些OSGI异常被抛出。



正如您对问题的评论所示,它甚至不适用于早期的Glassfish 4.0版本。



更新2015年:



看起来有一种方法可以使Glassfish 3.1.2.2成为可能。



打开Glassfish安装文件 /glassfish/domains/domain1/config/osgi.properties 并添加以下行file: jre-1.8 = $ {jre-1.7}



这应该使服务器以JDK 8启动。它仍然不适用于Glassfish 3.1或3.1.1。

另请参阅:




We currently use Glassfish 3 and I really want to use Java 8. I tried upgrading to Glassfish 4, but I experienced two bugs in the Glassfish 4 code so I had to revert back to Glassfish 3. Will Glassfish 3 work with Java 8 or will I have to upgrade my application container?

解决方案

No, it won't be possible (at the moment, maybe a workaround will occur later).

I tried Glassfish 3.1.1 and Glassfish 3.1.2.2 with the final Java 8 JDK which was released today. It doesn't even start the server, some OSGI exceptions are thrown.

As the comment to your question showed, it doesn't even work with earlier builds of Glassfish 4.0.

Update 2015:

It looks like there is a way to make it work with Glassfish 3.1.2.2.

Open the file /glassfish/domains/domain1/config/osgi.properties of your Glassfish installation and add the following line at the end of the file: jre-1.8=${jre-1.7}

This should make the server start with JDK 8. It still doesn't work for Glassfish 3.1 or 3.1.1.

See also:

这篇关于是否有可能在Glassfish 3上使用Java 8?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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