-2

I just finished writing a Java program that has some tools for debugging and working with Android phones. The program itself executes ADB and FASTBOOT commands from the Android SDK.

Is there an easy way to create some kind of installer that will install my Java program as well as check/install ADB and FASTBOOT?

(I know creating an installer defeats the purpose of Java, but I know this software will only be run on Windows machines)

Mike Laren
  • 8,028
  • 17
  • 51
  • 70
Matt R. Johnson
  • 783
  • 1
  • 7
  • 14

1 Answers1

2

I think the freeware version of Advanced Installer should have everything you need.

http://www.advancedinstaller.com/feats-list.html

You can make an executable version of your Java program using RCP.

Since ADB and Fastboot are just small executables you could include them with your project rather than depending on a separate install.

redbmk
  • 4,687
  • 3
  • 25
  • 49
  • Is there a way to add ADB and Fastboot to the target's PATH variable? – Matt R. Johnson Jun 28 '11 at 16:16
  • It doesn't look like you can with the freeware version. You should be able to run them from your Java application though if it's included in the same directory. Do you need your users to be able to run ADB and Fastboot from the command line as well? – redbmk Jun 28 '11 at 16:32
  • I have kind of a unique situation. My program allows the users to create and run batch files to automate series of commands to configure the phone. Many of these commands are going to be adb and fastboot commands, so I wanted those to run anywhere. – Matt R. Johnson Jun 28 '11 at 16:36
  • GOOD NEWS! The free version does allow you to create and append system variables. This solution is officially perfect! – Matt R. Johnson Jun 28 '11 at 17:01
  • It might be kind of a hack, but you could add your directory to the path at the top of the batch files, maybe check to see if they're there first. Do something like `set path=c:/my/java/program/;%path%`. I think it resets when you restart the computer, but it'd be worth testing out. Also the batch files could reference the file directly, like `c:/my/java/program/adb` rather than just `adb`. – redbmk Jun 28 '11 at 17:05