Java library for reading and writing web shortcut files
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

WebShortcutUtil (Java library)


Allows you to read and write web/internet shortcuts created in Windows, Linux, and Apple. Specifically, these are files with the following extensions: .url, .website, .desktop, .webloc. This library is part of the Web Shortcut Utility Suite.

This library has been tested on Android and appears to be completely compatible.


Maven Repository:
Source Code:

Maven Repository

The library is published to the Maven repository. Use the following dependency:



  • To compile:
    mvn compile

  • To run unit tests (note that some file names contain unicode characters, so it may not work
    on all operating systems - I tested successfully on Ubuntu 12.04):
    mvn test
    Detailed error information is in: target/site/surefire-reports

  • To run unit tests in a debugger:
    mvn -Dmaven.surefire.debug test

  • to generate test coverage reports:
    mvn cobertura:cobertura
    xdg-open target/site/cobertura/index.html

  • To generate javadocs:
    mvn javadoc:javadoc
    xdg-open target/site/apidocs/index.html

  • To package:
    mvn package
    The jar file is in the target/ folder

  • To deploy to the Maven repository:
    Follow this guide: To stage: mvn clean deploy You will be prompted for the GPG Passphrase To release: mvn nexus-staging:release

    Need local settings.xml in ~.m2/ folder:
    ossrh xxx yyy

    Need GPG key set up:
    For backuping up/restoring keys:

Future Ideas

Some ideas for enhanced functionality:

  • Improve ability to read an unknown shortcut from an input stream.
  • For ".desktop" files, add logic to extract the names embedded in a shortcut (including all localized versions of the name). Similar logic could also be written for ".website" files.
  • Explore unicode functionality for ".webloc" files. Will a Mac open a URL that has unicode characters?
  • Add an ASCII conversion option to the filename creation routines (i.e. to remove unicode characters).

Libraries and Licenses

This project is released under the Apache License 2.0.

This project includes the following libraries:

All licenses can be found in the root folder.