Newsletter sign-up
View all newsletters

Enterprise Java Newsletter
Stay up to date on the latest tutorials and Java community news posted on JavaWorld

JavaWorld Daily Brew

How to pass command-line arguments into a desktop application



I have created a desktop app called Foo. The NetBeans IDE makes two files (probably lots more, but two that are relevant) called FooApp.java and FooView.java. FooApp.java simply creates an instance of FooView.java and passes itself in.

I can pass parameters into FooApp.java. I want those parameters to be accessible inside FooView.java so I can use them to determine actions. This has to be a simple, even trivial, thing to do, but I can't figure out how to access those arguments inside FooView.

Help!