JavaFX 无法加载到我的网页上
我意识到这是一个非常模糊的问题,所以我不是在寻找细节,只是在寻找建议...
我在 NetBeans 中编写了一个 JavaFX 应用程序,它会自动将其构建到 jar、jnlp 和 html 页面中。 将这些文件上传到我的网络服务器后,我可以导航到该页面并且一切正常,在我开发它的计算机上。 在任何其他计算机上,它只是挂在加载屏幕上(旋转动画)。 我尝试过的事情:
- 确保这些计算机具有最新的 JRE
- 在 Chrome 和 IE 中都尝试过
- 将所有文件设置为所有用户的 RWX 权限(此后我已撤消此操作)
有什么想法吗?
谢谢!
另外,如果重要的话,JavaFX 应用程序的链接位于此处 。
I realize this is a very vague question, so I'm not looking for specifics, just suggestions...
I wrote a JavaFX application in NetBeans, which automagically builds it into a jar, jnlp, and html page. After uploading these files onto my webserver, I can navigate to the page and everything works, on the computer I developed it on. On any other computer, it just hangs at the loading screen (spinning animation). Things I've tried:
- Made sure these computers have most up to date JRE
- Tried it in both Chrome and IE
- Set all files to RWX permissions for all users (I have since undone this)
Any ideas?
Thanks!
Also, in case it's important, the link to the JavaFX app is right here.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我有一个“永远旋转”的轮子。
您是否查看过浏览器启动的 JVM 控制台? 我在 XP 上运行 FF3,任务栏中有 Java 图标,右键单击我可以打开控制台,其中显示:
The JVM is 1.6.0_11 。
I've got the "forever spinning" wheel.
Have you looked into the console of the JVM started up by the browser? I'm running FF3 on XP and in the Taskbar I've the Java-Icon where on right-click I can open the console which gives me:
The JVM is 1.6.0_11 .
它对我来说效果很好。 我注意到的一件事是,有一个安全检查对话框(信任来自 Sun 的内容?)和一个 Sun 广告,说明 JavaFX 有多棒:-)。
确保这些不会在您的浏览器窗口后面启动 - 在您信任内容之前它不会继续运行,我以前见过这种行为。
否则,我怀疑这是您浏览器中的安全(或其他)设置。 FWIW,我正在使用 Firefox 3.0.5 和最近下载的 Sun JRE 1.6._03(我认为)。
即使在难度级别 2 上,它也不是很聪明。玩家到左上角,计算机到中心,玩家到右下角,“计算机到角落”总是会导致玩家获胜(除非他们在某种程度上缺乏井字游戏) )。 上面引文中计算机的正确举动是优势之一。 但我很确定你不想让我批评你的人工智能:-)。
It worked fine for me. One thing I noticed is that there was a security check dialog box (trust content from Sun?) and a Sun advert saying how great JavaFX was :-).
Make sure these aren't starting up behind your browser window - it won't continue to run until you trust the content, and I've seen that behavior before.
Otherwise, I suspect it's a security (or other) setting in your browser. FWIW, I'm using Firefox 3.0.5 and the recently downloaded Sun JRE 1.6._03 (I think).
It's also not very smart yet, even on difficulty level 2. Player to top-left, Computer to center, Player to bottom right, "Computer to a corner" will always result in a player win (unless they're TicTacToe-deficient somehow). The right move for the computer in the quotes above is one of the edges. But I'm pretty certain you didn't want me to critique your AI :-).
事实证明,这是因为我使用的是 NetBeans 生成的 JNLP。 看看 这篇文章。 它准确地描述了我遇到的问题以及如何解决它,在底部。 简而言之,您会注意到 JNLP 有一些名为“codebase”和“href”的属性,一旦您将执行文件从 NetBeans 项目移动到 Web 服务器,这些属性就不再有效。
Turns out it was because I was using the NetBeans generated JNLPs. Take a look at this article. It describes exactly the problem I was having and how to fix it, towards the bottom. In a nutshell, you'll notice the JNLPs have some attributes called 'codebase' and 'href' that are no longer valid once you move the execution files from your NetBeans project to your webserver.