Re: Asking Windows Specific Questions



"Knute Johnson" <nospam@xxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:6QRdg.15272$RK4.83@xxxxxxxxxxxxxxx
Luc The Perverse wrote:
If am writing a program in Java - and have a windows specific question -
is it ok to ask that here? Or is there a different group for it? Should
I x-post?

Maybe I need to start with a JNI tutorial.


Ask away!

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

--
LTP :)


.



Relevant Pages

  • Re: Asking Windows Specific Questions
    ... 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.execbut I believe that has high overhead, and it prompts if you want to open the file. ... interacts which interacts with a windows program called winamp. ... 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. ...
    (comp.lang.java.programmer)
  • Re: Difference between .NET and Java
    ... > people that I know agree with my speculation that the CLR was in fact ... > similarities between the CLR and the Win32 API. ... Actually what I ment to say was the .NET has Windows specific functionality ...
    (comp.lang.java.programmer)
  • Re: microsoft download site indicates that my version is not authentic
    ... > packs is increasing functionality, which is wrong as much as it is a fix. ... I assume you have actually used a previous version of Windows? ... >>> You should as lost revenue means less to spend on the Billions of dollars>> each year it costs us to develop Windows and other products for you. ...
    (microsoft.public.windowsxp.general)
  • Re: email notification
    ... Hotmail messages when you have Windows Messenger running, ... that functionality was removed in the version of Windows Messenger ... If you're referring to new Hotmail messages, again, Windows Messenger no ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Re: [9fans] sad commentary
    ... would utf-8 qualify as a functionality that didn't exist ... the fact that Windows is "still" the best platform if you need to do word processing in many languages has nothing to do with its comparatively low performance with many applications--an important OS functionality it lacks. ... I even doubt there's a "simple" way of inputting, say, Hebrew or Arabic in Plan 9. ...
    (comp.os.plan9)