views:

488

answers:

1

I have an application that gets started via a shortcut. This application than starts a Java GUI application with CreateProcess().

When the Java application gets pinned to the taskbar the javaw.exe gets pinned to the taskbar instead of the "expected" shortcut. Only the native executable which launches Java can be modified - the shortcut has to stay.

What has to be done so that the shortcut gets pinned?

Thanks, Stefan

+1  A: 

Use something like winrun4j or create a .bat instead of using a shortcut.

KitsuneYMG
Unfortunately this is no option.
Stefan
@kts: I can't get WinRun4J to work under Eclipse Galileo. The plugin website is rather uninformative, and I can't figure out if it's my version of Eclipse or if I'm doing something wrong. I installed it via "Help", "Install New Software...", then specifying the Update Site. After restarting, it appears in my installed software list, but WinRun4J doesn't appear under the Run Configurations list. Any ideas?
Paul Lammertsma
@Paul I never had eclipse integration with winrun4j. I just downloaded the zip which contains an executable and ini and an icon. Rename the executable to what you want, rename the ini and edit, create a ico with the same name (eg foo.exe, foo.ini, foo.ico) and run (IIRC) foo.exe -WinRun4j::SetIcon to change the exe icon.
KitsuneYMG
@kts: Thanks, that clarifies things. I was hopeful it would integrate better than Launch4j, but I'm not sure if this is a fundamental improvement. I read there is a way of embedding the INI into the executable. Is this true?
Paul Lammertsma
@Paul: I don't know of an easy way to do it. Grab the source code and change the function that reads the ini file to return a hard-coded arguments list instead of reading it from the file. I guess you could modify the program to read the ini options out of the META-INI direcory (or some such) instead of a separate file.
KitsuneYMG