Deployment problems that I don't know how to fix or draw - Please Help

I did a javafx in netbeans application when I import the classes in the java library (specifically those of java.io for the writing/readning files). The program works fine in IDE, reading and writing files, but when I build and run the .jnlp, not write all files or doing nothing which requires imported functions. I have tried for a few weeks now and have had no luck. The same thing happens when I create a new javafx desktop application and try to write a simple text file.

My questions are the following:

1 does anyone know if I'm missing something? I tried checking the box that makes a connected individual jar and pack200 compression, no luck. This program is run locally on the user's computer.

2. I do not not how to check for traces of the application exception would be thrown. I use Mac OS x 10.6.6 and the latest Java and Netbeans. Can someone help me with this?

My deadline is coming and I don't want to rewrite it using something else. I was happy with this so far javafx application. Help, please

Here is my test .fx file
package savetest;

import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.File;
import java.io.IOException;
import javax.swing.JFileChooser;

public class Main {
    // <Generated Code by netbeans (unaltered or edited for this test)>
}

function writeData(source : java.net.URI) {
        var output: BufferedWriter;
        try {
            def text = "Test Data";
            def file = new File(source);
            output = new BufferedWriter(new FileWriter(file));
            output.write(text);
            output.flush();
            output.close();
        } catch (e: IOException) {
            e.printStackTrace();
        }
    }

function run (): Void {
    var design = Main {};
    var fileChooser : JFileChooser = new JFileChooser;
    var goalURI : java.net.URI;

    javafx.stage.Stage {
        title: "Main"
        scene: design.getDesignScene ()
    }

     if (fileChooser.APPROVE_OPTION == fileChooser.showSaveDialog(null)) {
       goalURI = fileChooser.getSelectedFile().toURI();
     } 
     
    writeData(goalURI);
}

The null value of your pass at your writeData(source: java.net.URI) function.
Validate your argument of function:

function writeData(source : java.net.URI) {
        if (source == null) {do something}

Tags: Oracle

Similar Questions

Maybe you are looking for