Pin a .jar to the taskbar (read post for specifics)

Asagrim

Member
Messages
43
I'd like to pin a .jar file to the taskbar, but in a way, that the pinned icon doesn't open a new instance of the program on the task bar, but uses the pinned icon itself as the application taskbar button.


javaw.exe -jar "C:\path\to\executable.jar"
cmd.exe /c "C:\path\to\executable.jar"

both create new instances on the taskbar, and these are the only two solutions I could come up with. I know that they create new instances, because the targets of the respective pinned icons are cmd.exe and javaw.exe, while the .jar file is just an argument, so basically I would need a way to pin the .jar file as target to my taskbar, I just don't know how (if it's possible at all).

Thanks in advance!
 

My Computer

System One

  • OS
    Windows 8.1
    Computer type
    PC/Desktop
    CPU
    i3-6100
    Motherboard
    ASUS Z170I PRO GAMING
    Memory
    Kingston 1x8GB 2400MHz@CL15
    Graphics Card(s)
    Sapphire HD7850 2GB
    Monitor(s) Displays
    LG 34UM68-P
    Screen Resolution
    2560x1080
    Hard Drives
    SAMSUNG 840 Pro 128GB SSD
    PSU
    Corsair TX650W (Seasonic OEM)
    Case
    Zalman M1
    Cooling
    Cooler Master Hyper 212X
    Keyboard
    Ozone Strike Battle MX Brown
    Mouse
    Roccat Nyth
    Internet Speed
    34 Mbit
    Browser
    Chrome, Cyberfox, Vivaldi
    Antivirus
    common sense upper-intermediate v3.0
    Other Info
    Some of the hardware might seem odd (PSU, SSD), but I'm not wasting money on replacing perfectly functional hardware only because a newer version is out. Nor am I willing to pay extortion money for replacements or intended upgrades (GPU, RAM), especially if that "upgrade" has a hardware design flaw (CPU).
hello ,to the best of my knowledge you can only pin program icons to the taskbar ,pining a file format [like.jar]icon to the taskbar will just open the program associated to the file type .in your case java . to the best of my knowledge that how it will work
 

My Computer

System One

  • OS
    win8.1.1 enterprise
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Hinze57
    CPU
    AMD FX 6100 6core 3.30gHz
    Motherboard
    gigibyte ga-78lmy-s2p
    Memory
    4gig ddr3
    Graphics Card(s)
    Radon hd5000 Series
    Sound Card
    onboard realtek hd
    Monitor(s) Displays
    19" viewsonic/ 22"Samsung
    Screen Resolution
    1680x1050
    Hard Drives
    128gig ssd Kingston
    80gig WD 10000 rpm spinner
    Case
    micro
    Keyboard
    microsoft curve 200
    Mouse
    Logitech wireless M215
    Internet Speed
    high speed 20
    Browser
    ie 11
    Antivirus
    windows defender
    Other Info
    updated enterprise apr 2/14
Yes, that is the problem. I can only pin executable files to the taskbar, and a java app is not an executable per se.

I even tried an exe wrapper, but that doesn't really solve anything, since the wrapper extracts the jar file first, then runs it, so in appearance it's not any different than just pinning a shortcut with the aforementioned two commands to the taskbar.
 

My Computer

System One

  • OS
    Windows 8.1
    Computer type
    PC/Desktop
    CPU
    i3-6100
    Motherboard
    ASUS Z170I PRO GAMING
    Memory
    Kingston 1x8GB 2400MHz@CL15
    Graphics Card(s)
    Sapphire HD7850 2GB
    Monitor(s) Displays
    LG 34UM68-P
    Screen Resolution
    2560x1080
    Hard Drives
    SAMSUNG 840 Pro 128GB SSD
    PSU
    Corsair TX650W (Seasonic OEM)
    Case
    Zalman M1
    Cooling
    Cooler Master Hyper 212X
    Keyboard
    Ozone Strike Battle MX Brown
    Mouse
    Roccat Nyth
    Internet Speed
    34 Mbit
    Browser
    Chrome, Cyberfox, Vivaldi
    Antivirus
    common sense upper-intermediate v3.0
    Other Info
    Some of the hardware might seem odd (PSU, SSD), but I'm not wasting money on replacing perfectly functional hardware only because a newer version is out. Nor am I willing to pay extortion money for replacements or intended upgrades (GPU, RAM), especially if that "upgrade" has a hardware design flaw (CPU).
A late reply but I was just looking for this and found it out myself. The reason is when you write javaw.exe, it does not map to the exact same location as when the process spawns. The path of the spawned process has to match the shortcut's path in order not to spawn a new icon.

For example, my shortcut is "C:\Java\Jdk8x64\bin\javaw.exe" -jar "executable.jar"
 

My Computer

System One

  • OS
    Windows 7
Yea, I ended up with a similar solution. I just pinned javaw.exe to my taskbar, and I'm accessing the jar file through its jump list.
 

My Computer

System One

  • OS
    Windows 8.1
    Computer type
    PC/Desktop
    CPU
    i3-6100
    Motherboard
    ASUS Z170I PRO GAMING
    Memory
    Kingston 1x8GB 2400MHz@CL15
    Graphics Card(s)
    Sapphire HD7850 2GB
    Monitor(s) Displays
    LG 34UM68-P
    Screen Resolution
    2560x1080
    Hard Drives
    SAMSUNG 840 Pro 128GB SSD
    PSU
    Corsair TX650W (Seasonic OEM)
    Case
    Zalman M1
    Cooling
    Cooler Master Hyper 212X
    Keyboard
    Ozone Strike Battle MX Brown
    Mouse
    Roccat Nyth
    Internet Speed
    34 Mbit
    Browser
    Chrome, Cyberfox, Vivaldi
    Antivirus
    common sense upper-intermediate v3.0
    Other Info
    Some of the hardware might seem odd (PSU, SSD), but I'm not wasting money on replacing perfectly functional hardware only because a newer version is out. Nor am I willing to pay extortion money for replacements or intended upgrades (GPU, RAM), especially if that "upgrade" has a hardware design flaw (CPU).
Back
Top