Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

stadidas

macrumors regular
Original poster
Feb 27, 2006
243
0
Kent, United Kingdom
I currently have an application which generates files with a .amd file extension. I would like when these files are double clicked to launch the application and have the path of the file passed to the app. Currently when a file is clicked the application launches, but just the main screen appears.
At the beginning of the main class is t his code:
Code:
fApplication.addApplicationListener(new com.apple.eawt.ApplicationAdapter() {
			public void handleAbout(ApplicationEvent e) {
                                if (aboutBox == null) {
                                    aboutBox = new AboutBox();
                                }
                                about(e);
                                e.setHandled(true);
			}
			public void handleOpenApplication(ApplicationEvent e) {
			}
			public void handleOpenFile(ApplicationEvent e) {
			}
			public void handleQuit(ApplicationEvent e) {
				quit(e);
			}
		});

I know I need something in the handleOpenFile listener, but don't know what code to use.

If anyone has any suggestions I would be very grateful to hear them.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.