I have coded a simple multiple document viewing application. Up to this point, I've simply used a file chooser to open the files within my application.
I recently added lines to the registry to allow for an application protocol url, similar to the "mailto: ". So now, I can type in the run window of the windows start menu: "myapp:file1.txt" and windows will launch my application and the file path will be passed through as a command line argument. (background info: i use launch4j to create an exe which in turn calls my jars, launching my application...)
So the next step will be to create an association with a type of file, say *.txt, such that clicking on a txt file will launch my application.
My ultimate goal is to be able to click on a second document in windows somewhere while my application is running and the doc will load in the same instance of my application... does anyone know how this would be accomplished??? I'm assuming that the initial file click, launching the application, will pass the file name in as a command line argument, but once the application is running, how would i get another command line argument into the application??? Is this possible in java??
Bookmarks