This is because launch(args);
is a "predefined" JavaFX method, located in an abstract class.
Take a look at the following:
As you can see, the method only accepts one argument.
public static void launch(String... var0) {
// Heres the logic
}
To Fix that, you could do the following:
- Declare your
Map<String, String>
outside of your main()
- Only initialize it in your main method
- Access it via this.userInformation in your start-method
To visualize everything, heres some code
public class Gui {
private static Map<String, String> userInformation;
public static void main(String[] args) {
// All the other logic
userIformation = scanDocument(file);
launch(args);
}
public static void start(Stage primaryStage) {
// All the other logic
// Here you can access your Map<> by
// simply using userInformation.blablabla();
}
I hope this helped you a at least a little bit.
And also... Please never use german words or none of the english letters (like öäü) in variablenames...
Sidenote: Uhrzeitmacher?