The hard part is that the Arduino IDE puts the .hex file in a random temporary folder. If you turn on verbose messages for upload you will get to see the avrdude command that includes the full path to the .hex file.
I am using IDE without the bootloader - using a programmer for flashing the .hex files.
Add for example:
build.path=C:\Arduino\Myhex\build.folder
to your "preferences.txt" - and you will find the .hex files there..
p.
If it has to be a at90usb1287 so be it. However if a at90usb1286 also would work for your application you may be better off getting a Teensy++ Teensy USB Development Board with the Teensyduino add-on to the Arduino IDE.
Another "if" would be if you need the formfactor of an Arduino board.