views:

644

answers:

3

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.

A: 

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 :-).

paxdiablo
That's really weird that it worked for you before I fixed it with the changes from that article. But you know what it is, so I know you aren't lying =P And I KNEW somebody would mention the lousy AI ;)
Ross
Bizarre. I know I've run JNLP things before (a web based platform game I had a look at to see how JNLP worked). Whether that had anything to do with it, I don't know. Still, it's fixed so I'll move on, point-less and unloved :-).
paxdiablo
+1  A: 

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:

Exception: null
java.io.FileNotFoundException: JNLP not available: RABfx_browser.jnlp
    at sun.plugin2.applet.JNLP2Manager.loadJarFiles(Unknown Source)
    at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Exception: java.io.FileNotFoundException: JNLP not available: RABfx_browser.jnlp

The JVM is 1.6.0_11 .

mark
Thanks, this helped get to the root of the problem!
Ross
Cool! :-)10chars
mark
+1  A: 

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.

Ross