0

Before marking my question as DUPLICATE or REPEATED, PS that I have tried everything :

1. They said HERE, and HERE, and finally HERE. Nothing worked.

2. I self signed my application, and provided the link in exception list of Java Control Panel. Lowered the security level from Very High to High. Still the same results.

3. Later, I also generated a keytool store and entered the command for .csr and .jks file, provided their path as well as alias name in NetBeans, and failed again.

4. Provided "all-permissions" command in manifest file and got same results.

5. Tried Running JNLP file as a standalone webstart application, but got blocked due to Java Security Reasons.(don't know why ! )

I am pasting my code below :

This is my FXML File :

<?xml version="1.0" encoding="UTF-8"?>

 <?import java.lang.*?>
 <?import java.util.*?>
 <?import javafx.scene.*?>
 <?import javafx.scene.control.*?>
 <?import javafx.scene.layout.*?>

<AnchorPane id="AnchorPane" prefHeight="200" prefWidth="320"    xmlns:fx="http://javafx.com/fxml/1" fx:controller="javafxwillrunthistime.FXMLDocumentController">
<children>
    <Button layoutX="126" layoutY="90" text="Click Me!" onAction="#handleButtonAction" fx:id="button" />
    <Label layoutX="126" layoutY="120" minHeight="16" minWidth="69" fx:id="label" />
</children> </AnchorPane>

Following is my Main File :

public class JavaFXWillRunThisTime extends Application {

@Override
public void start(Stage stage) throws Exception {
    Parent root = FXMLLoader.load(getClass().getClassLoader().getResource("FXMLDocument.fxml"));

    Scene scene = new Scene(root);  
    stage.setScene(scene);
    stage.show();
}
/**
 * @param args the command line arguments
 */
public static void main(String[] args) {
    launch(args);
  }
}

This is the exception:

Missing Application-Name manifest attribute for: file:/G:/WorkSpaces/NetBeans/JavaFXWillRunThisTime/dist/JavaFXWillRunThisTime.ja‌​r
java.lang.NullPointerException: Location is required. at
javafx.fxml.FXMLLoader.loadImpl(Unknown Source) at 
javafx.fxml.FXMLLoader.loadImpl(Unknown Source) at 
javafx.fxml.FXMLLoader.loadImpl(Unknown Source) at 
javafx.fxml.FXMLLoader.loadImpl(Unknown Source) at 
javafx.fxml.FXMLLoader.loadImpl(Unknown Source) at 
javafx.fxml.FXMLLoader.load(Unknown Source) at 
javafxwillrunthistime.JavaFXWillRunThisTime.start(JavaFXWillRunThisTime.java:22)

I have tried running this in all the browsers I have. Read the documentation by Oracle on JavaFX's web depolyment, and also had a look at the browser list it has provided on its site.

It would be a great help, if someone can tell me what to do next ?

Community
  • 1
  • 1
Vishal A
  • 144
  • 3
  • 17
  • Does the application run when you start in as standalone executable or from within your IDE? Please provide the full stacktrace along with reference to where in your code this happens. – hotzst Mar 08 '16 at 07:18
  • Check the contents of the generated jar file; make sure it contains the FXML file. It should have the correct name (i.e. `FXMLDocument.fxml`) and should be in the same package as your class. – James_D Mar 09 '16 at 01:15

0 Answers0