Re: [xep-support] minor installation and running issues

From: Oliver Becker (obecker@informatik.hu-berlin.de)
Date: Thu Oct 16 2003 - 06:47:50 PDT

  • Next message: Rob Stote: "RE: [xep-support] Null Pointer Exception"

    Nikolai,

    > > 2. The created shell script xep.sh doesn't have execute permissions.
    > > I have to call "chmod +x xep.sh" manually before I can use it.
    > > (This is of course Unix specific. I don't know at the moment whether
    > > and how Java allows changing file permissions ...)
    >
    > We are reluctant to manage file permissions from our code: it's too
    > OS-specific. You can always call the script as an argument to sh,

    Yes, but then it's necessary to specify the complete path.
    I can't simply enter "sh xep.sh", I would have to write
    "sh /this/is/my/complicated/path/to/xep/xep.sh"

    > so I don't think we should change anything here.

    You can ask for system properties, the value for "os.arch" should give
    you a hint. Or you don't care at all and invoke always

       String[] cmd = {"/bin/chmod", "+x", pathToXEP + "/xep.sh"};
       try {
          Process p = rt.exec(cmd);
          p.waitFor();
       }
       catch (Exception e) {
          // ignore if this is a Windows system or something else went wrong
       }
       
    At least you could add a line within the installed readme.txt.
    Something like "If you're on a Unix system then change the file
    permissions of xep.sh as follows 'chmod +x xep.sh' ..."
    (well, perhaps all Unix users should know that ...)

    Cheers,
    Oliver

    /-------------------------------------------------------------------\
    | ob|do Dipl.Inf. Oliver Becker |
    | --+-- E-Mail: obecker@informatik.hu-berlin.de |
    | op|qo WWW: http://www.informatik.hu-berlin.de/~obecker |
    \-------------------------------------------------------------------/

    -------------------
    (*) To unsubscribe, send a message with words 'unsubscribe xep-support'
    in the body of the message to majordomo@renderx.com from the address
    you are subscribed from.
    (*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/tos.html



    This archive was generated by hypermail 2.1.5 : Thu Oct 16 2003 - 06:48:40 PDT