#2 wrong test for desktop

closed-fixed
None
5
2007-11-02
2007-10-22
oc2pus
No

in src/utils/StockIcon.java line 151

if (System.getProperty("sun.desktop").equalsIgnoreCase("gnome")) {.....

crashes if property is not set ...

workaround (dirty hack)
start the program with -Dsun.desktop="abcdef" ...

Discussion

  • Dan Mihai Ile

    Dan Mihai Ile - 2007-10-27

    Logged In: YES
    user_id=1885786
    Originator: NO

    Fixed like this (no need for dirty fix =):

    //check for linux desktop name
    String desktopName = System.getProperty("sun.desktop");
    if (desktopName == null) {
    //unable to retrieve the desktop name, possible that sun.desktop system
    //variable is null. No problem, default icons will be used.
    desktopName = ""; //initialize the variable to avoid null exception
    }

    if (desktopName.equalsIgnoreCase("gnome")) {
    ....
    }

     
  • Dan Mihai Ile

    Dan Mihai Ile - 2007-10-27
    • assigned_to: nobody --> mihai007
    • status: open --> open-fixed
     
  • Dan Mihai Ile

    Dan Mihai Ile - 2007-11-02
    • status: open-fixed --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks