玩! framwork:运行`h2-browser`有效,但网页不可用 [英] Play! framwork: running `h2-browser` works, but the webpage is not available

查看:222
本文介绍了玩! framwork:运行`h2-browser`有效,但网页不可用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我运行命令 activator h2-browser 时,它会打开浏览器并显示以下网址:

When I run the command activator h2-browser it opens the browser with the following url:


192.168.1.17:8082

192.168.1.17:8082

但我得到(使用Chrome):

But I get (using Chrome):


此网页不可用

This webpage is not available

奇怪的是它之前确实有效。从那以后我唯一改变的是 JAVA_OPTS 以启用调试。我重新安装了Java,我认为现在没有环境变量 JAVA_OPTS

The weird thing is it actually worked before. The only thing I changed since then is the JAVA_OPTS in order to enable debugging. I reinstalled Java and I think now there's no environment variable JAVA_OPTS.

无论如何,它为什么会发生?

Anyway, why is it happening?

更新

更奇怪的是,当我按下view-source时,我得到一个包含此公告的网页(这是网页的一部分):

Update
What is even more weird is that when I press view-source I get a webpage with this announcement (this is part of the webpage):

<h1>Welcome to H2</h1>
<h2>No Javascript</h2>
If you are not automatically redirected to the login page, then
Javascript is currently disabled or your browser does not support Javascript.
For this application to work, Javascript is essential.
Please enable Javascript now, or use another web browser that supports it.

但是我确实启用了Javascript(我通过检查设置验证了它,并且还尝试了Firefox)

But I do enable Javascript (I validated it by checking the settings, and also tried from Firefox)

其他信息

我正在使用Java 1.8而我不知道<$ c的值是多少$ c> JAVA_OPTS 在我更改之前,按照本教程: http://andikanugraha.com/2014/05/debug-typesafe-activator-play-framework-using-eclipse/

Additional information
I'm using Java 1.8 and I don't know what was the value of JAVA_OPTS before I changed it, following this tutorial: http://andikanugraha.com/2014/05/debug-typesafe-activator-play-framework-using-eclipse/

我完全删除了Java并重新安装它。我想现在根本没有 JAVA_OPTS 变量。

I removed Java completely and reinstall it. I think right now there's no JAVA_OPTS variable at all.

这是我的数据库配置:

db.default.driver="org.h2.Driver"
db.default.url="jdbc:h2:file:main2.db" 
db.default.user=sa
db.default.password=""


推荐答案

这是因为应用程序立即终止。我猜这是Play中的一个错误。

That happens because the app is terminating itself immediately. I guess this is a bug in Play.

在连续模式下启动时,一切正常:

When launching it in continuous mode, everything works fine:

activator~h2-browser

sbt~h2-browser

或者,您可以启动激活器 sbt 首先,从命令行运行 h2-browser

Alternatively, you can start activator or sbt first, and from its command-line run h2-browser.

这篇关于玩! framwork:运行`h2-browser`有效,但网页不可用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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