I'm starting a JavaFX view from my main class, and I want to pass in a value to that instance of the view. Currently I'm using a static member variable in the View class, but I'd like to avoid statics if possible.

**Main Class**

```
import javafx.application.Application;

public class Main
{
    public static void main(String[] args)
    {
        int value = 3;
        View.setValue(value);
        Application.launch(new View().getClass());
    }
}

```

**View Class**

```
import javafx.application.Application;
import javafx.stage.Stage;

public class View extends Application
{

    private static int value;

    @Override
    public void start(Stage arg0) throws Exception
    {
        // TODO Auto-generated method stub

    }

    public static int getValue()
    {
        return value;
    }

    public static void setValue(int valueIn)
    {
        View.value = valueIn;
    }
}

```

Is there a better way of doing this, that avoids using static member variables or creating a launch() method in the view class that has a parameter for value?

Thanks in advance.

EDIT:
Just to clarify as I omitted from the original post (my bad I know), the actual "value" I will be wanting to pass in is an instance of an MBassador event bus (i.e. MBassador bus), otherwise all your answers would have worked perfectly