• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

launch java application without double click

 
Ranch Hand
Posts: 384
MyEclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi ranchers,

i have a small application written in swing and packaged into jar. this app is contained in a USB pen/flash drive. What i want is to install or launch this application without any double click when i insert USB drive into another PC(windows).
Is that possible ?
 
Marshal
Posts: 79151
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That sounds hazardous; if somebody wrote malware which could be executed without clicking, think of the damage it could do.
 
Ranch Hand
Posts: 679
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
According to this article the answer would appear to be No (but you can get close on some versions of Windows).
That was just the first article I found when I googled 'autorun on usb'.
 
naveen yadav
Ranch Hand
Posts: 384
MyEclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Adrian Burkett wrote:According to this article the answer would appear to be No (but you can get close on some versions of Windows).
That was just the first article I found when I googled 'autorun on usb'.



that was a mice article. But i wonder whether that will work on USB pen drives also.
by the way thanks
 
Stuart A. Burkett
Ranch Hand
Posts: 679
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

naveen yadav wrote:But i wonder whether that will work on USB pen drives also.


Why don't you try it and let us know.
 
Sheriff
Posts: 3837
66
Netbeans IDE Oracle Firefox Browser
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It wouldn't work on my computer with pen USB drive. Not even with USB harddisk, nor with CD, nor with DVD. Turning off autorun is on my list of things to do after installing Windows on a computer, right there with "get antivirus" and "install Windows updates". I suspect lots of people do the same.

However, there is no fundamental difference between USB pen drive and any other USB storage device. If the autorun is enabled and the USB pen drive is properly furnished for autorun, it should be run when plugged in.
 
naveen yadav
Ranch Hand
Posts: 384
MyEclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i'll let you know
 
There are 10 kinds of people in this world. Those that understand binary get this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic