This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 205904 - NB 7.1beta is not reading the javafx2.0 getparameters() Map .. Returns null in stand alone mode, but works fine when ran in browser
Summary: NB 7.1beta is not reading the javafx2.0 getparameters() Map .. Returns null ...
Status: CLOSED DUPLICATE of bug 203206
Alias: None
Product: javafx
Classification: Unclassified
Component: Project (show other bugs)
Version: 7.1
Hardware: PC Windows XP
: P1 normal (vote)
Assignee: Anton Chechel
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-04 06:41 UTC by kevinholohan
Modified: 2011-12-05 09:13 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kevinholohan 2011-12-04 06:41:35 UTC
Product Version = NetBeans IDE 7.1 Beta (Build 201109252201)
Operating System = Windows XP version 5.1 running on x86
Java; VM; Vendor = 1.7.0_01
Runtime = Java HotSpot(TM) Client VM 21.1-b02


System.out.println( this.getParameters().getNamed().get("GOOD")); prints null

TOTAL CODE BELOW:
/*
 * To change this template, choose Tools | Templates and open the template in
 * the editor.
 */
package testargsjfx;

import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.stage.Stage;

/**
 *
 * @author user
 */
public class TestArgsJFX extends Application {

    Label label = new Label();
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        
        System.out.println(args.length);

        Application.launch(args);
    }
    
    @Override
    public void start(Stage primaryStage) {
        final Parameters parameters = this.getParameters();
        try {
            
            this.init();
                    System.out.println( parameters.getNamed().get("GOOD"));
        System.out.println( this.getParameters().getRaw().size());
        System.out.println( this.getParameters().getUnnamed().size());
        
        } catch (Exception ex) {
            Logger.getLogger(TestArgsJFX.class.getName()).log(Level.SEVERE, null, ex);
        }

        primaryStage.setTitle("Hello World");
        Group root = new Group();
        Scene scene = new Scene(root, 300, 250);
        Button btn = new Button();
        btn.setLayoutX(100);
        btn.setLayoutY(80);
        btn.setText("Is the parameter being read?   ");
        
        btn.setOnAction(new EventHandler<ActionEvent>() {

            public void handle(ActionEvent event) {
                System.out.println("Is the parameter being read?  ");
               label.setText(parameters.getNamed().get("GOOD"));
                
            }
        });
        
        label.setLayoutX(100);
        label.setLayoutY(100);
        
        
        root.getChildren().addAll(btn, label);
        primaryStage.setScene(scene);
        primaryStage.show();
        
       System.out.println( this.getParameters().getNamed().get("GOOD"));
    }
}


OUTPUT in standalone  

init:
Deleting: C:\wamp\www\testArgsJFX\build\built-jar.properties
deps-jar:
Updating property file: C:\wamp\www\testArgsJFX\build\built-jar.properties
compile:
Copying 1 file to C:\wamp\www\testArgsJFX\build
Copy libraries to C:\wamp\www\testArgsJFX\dist\lib.
Building jar: C:\wamp\www\testArgsJFX\dist\testArgsJFX.jar
To run this application from the command line without Ant, try:
java -jar "C:\wamp\www\testArgsJFX\dist\testArgsJFX.jar"
Deleting: C:\wamp\www\testArgsJFX\dist\testArgsJFX.jar
Deleting: C:\wamp\www\testArgsJFX\dist\README.TXT
Skip jar copy to itself: testArgsJFX.jar
jfx-deployment:
jar:
run:
null
0
0
null
Is the parameter being read?  
BUILD SUCCESSFUL (total time: 10 seconds)
Comment 1 Stepan Zebra 2011-12-05 09:01:22 UTC
fixed in 7.1 RC1

*** This bug has been marked as a duplicate of bug 203206 ***
Comment 2 Marian Mirilovic 2011-12-05 09:13:11 UTC
verified duplicate - closed