0

Can anyone tell me how to open a .jar file when you plug your USB in a laptop? Write a batch file? Or what do I need?

I've read about it that it's only available on windows, so it's not possible on a MAC. But isn't there a way to open a window on mac, and say 'click here to start'?

So this questions has 2 parts:

  1. How can i open a file when I plug in a USB on windows?
  2. If it's not available on mac - what other possibilities do i have?

Thanks!

Killerwes
  • 292
  • 1
  • 4
  • 14

1 Answers1

2

For windows you're probably looking for AutoRun.inf. Though remember that this might have been disabled on the computer.

Hans Olsson
  • 54,199
  • 15
  • 94
  • 116
  • Yes, something like that. Do you have experience with it? I just made a file 'autorun.inf', but i would like to open a .jar file. Now it just stored it as another drive. the code I used is ` [autorun] open=pdflist.jar icon=pdflist.jar,0 label=List of available PDFs` – Killerwes Aug 11 '11 at 13:13
  • @Killerwes: Sorry, not really a java guy so don't know much about Jar files, but is it possible that instead of having `open=pdflist.jar`, maybe you could try something like `open=java -jar pdflist.jar`? – Hans Olsson Aug 11 '11 at 13:40
  • Yeah, I've found that too and tried it. But it doesn't open. I guess they will just have to double click it :p – Killerwes Aug 11 '11 at 13:44