Skip to content

Instantly share code, notes, and snippets.

@howard-wang-nl
Created February 11, 2016 08:48
Show Gist options
  • Save howard-wang-nl/531d4aa0615941d5487f to your computer and use it in GitHub Desktop.
Save howard-wang-nl/531d4aa0615941d5487f to your computer and use it in GitHub Desktop.
Open Javadoc jar file in Firefox browser
#!/bin/sh
if [ ! "$1" ]
then
echo "Open Javadoc jar file in Firefox browser.
Usage: $0 <jar file>"
exit 1
fi
osascript -e "tell application \"Firefox\"" -e "activate" -e "open location \"jar:file://$1!/index.html\"" -e "end tell"
# open -a Firefox --args "jar:file://$1!/index.html"
# This command is not stable. Firefox is only able to open the URL at first time.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment