Hi All, I am really hoping someone knows how to do this, because I have no clue. From my Java app, I am creating a .bat file and putting it on the desktop. This batch file is for starting another Java app. What I would like to do is actually make this file a shortcut (from the Java app, not by right clicking it) so that it will no longer have to have the .bat extension, but it can be anything. Also, it would be nice if I can associate an image with this shortcut (also doing this from the Java app) Does anyone know how to do this or know where I could find this information? Thanks a lot!!!
Barry P.S. I am working on NT machine.
Robert , doodle
Greenhorn
Joined: May 25, 2001
Posts: 8
posted
0
create a shortcut search for your bat file rename the shortcut.... click on properties to set your picture
You totally ignored what I had in parenthesis. I know how to do that. There should be a way to do this from within a Java app. How do you think Oracle, Microsoft, IBM, Napster, or anybody else place a shortcut on your desktop? It is done within their code. There has to be a way from my Java code. Does anyone have any suggestions? Many thanks!!!
Barry
Angela Lamb
Ranch Hand
Joined: Feb 22, 2001
Posts: 156
posted
0
You would need to use native code for that. It won't work from pure Java code, since shortcuts aren't like regular files.
Aj Manch
Ranch Hand
Joined: May 07, 2001
Posts: 50
posted
0
I am not sure how to make a shortcut file in Java. I feel that this has a native code and JNI solution. But if you know that the executable file is in the path, create a batch file with the just the name of the file and move it to desktop directory. In this case the image that you are going to see will be the one for notepad's.
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.
subject: Creating desktop shortcut from Java program