Knute Johnson said:
Ok!
Here are the questions I have had. (All of these questions relate to a
music searching program that I have no intention of being cross platform.)
1. System Integration: I would like to "launch" a file using the system's
default handler (identical functionality to double clicking a file in
explorer or putting file in run menu) I can use
Runtime.getRuntime().exec("explorer.exe " + filename) but I believe that
has high overhead, and it prompts if you want to open the file.
("D:\media\Short Vids\Star Wars Kid Matrix Parody.wmv" loads default system
handler, in this case VLC media player)
2. Configuration Management: This may not be windows specific, but it is a
problem I have with virtuall every app I write. I need to store options -
but the first piece of information I need is where the configuration file
is. Knowing the path of my JAR file should be sufficient, but I don't know
how to grab this. Some programs need to run with multiple configurations.
What is the best way to handle settings/parameters/configuration management?
3. Drag And Drop: I would like to be able to drag and drop selected items
in a JList into another application and have the same effect as though I had
dragged selected files from an instance of explorer. (I do not think I
need the specific, though useful, right dragging which gives you a menu,
because I will not be dragging to another instance of explorer)
4. Windows Messaging: Right now I am writing an application which
interacts which interacts with a windows program called winamp (A music
player). I was forced to use a third party program called CLAmp to allow
command line interaction for enqueue and playing songs. If I could send
windows messages from my program directly the only command line interaction
I would need would be to invoke winamp if it is not already running.
5. Focus Question: In order for my program to work I need to invoke another
program (winamp). As long as winamp is already running there is no
problem, but when I invoke it my application loses focus and requires an Alt
Tab or mouse click to regain focus. I looked through the available
functions for a Gain Focus, Set Focus or Get Focus and I found MANY
functions, none of which seemed to regain the window focus. Am I just
misinterpriting the names - or has Gain Focus been deliberately removed from
Java?
6. Installation Program Question: This had extensive redundancy with
question #2. Basically I am looking for an installation program that can
do all of the following:
a. Link an extension to my java application (a document extension, or in
this unusual case, the document is a "configuration")
b. Check for JRE and direct user to a location to get it if they don't
have it. (or allow a bundled JRE optionally)
c. Install Start Menu/Desktop/Quick Launch shortcuts, with hotkeys if
desired.
d. Provide uninstall functionality
e. Register DLLs or EXE files that my program interacts with