views:

107

answers:

1

I've coded small JavaFX Applet in Netbeans 6.8 IDE. Everything works fine if the applet runs on my computer. But when I put the applet (and edited JNLP files containing changed paths to server) into server, it doesn't load any data from an server text file. Paths are correct - i look at it many times - they are ok. It also doesn't load images with external urls. What is wrong?

+1  A: 

Haven't seen your code so I'm going to make a guess. If your resource is not bundled in your JAR file and you are using file:// to access it, then you will need to sign your applet. On NetBeans, right click on project node -> properties -> application. Select self signed.

If you don't want to sign your applet, then access your resource as REST. Use the HttpRequest.

If it is on the client machine, consider using JNLP APIs like so.

FileOpenService fos = (FileOpenService)ServiceManager
        .lookup(“javax.jnlp.FileOpenService”);

//Open dialog pops up
FileContent fc = fos.openFileDialog(null, null);

The best way to diagnose the problem is to open the Java Console and see if there are any exceptions. Run $JAVA_HOME/bin/ControlPanel -> Advanced -> Java Console -> Show Console

Chuk Lee