WHy does not java have canBeExecuted method in its File class

Discussion in 'Java' started by Yadagiri Rao KP, Aug 9, 2003.

  1. Why doesn't Java have canBeExecuted method in its File class unlike
    WIndows and UNix files.PLs explain
    Yadagiri Rao KP, Aug 9, 2003
    #1
    1. Advertising

  2. (Yadagiri Rao KP) writes:

    > Why doesn't Java have canBeExecuted method in its File class unlike
    > WIndows and UNix files.PLs explain


    Not all platforms have the ability to identify an "executable"
    attribute of a file.
    Tor Iver Wilhelmsen, Aug 9, 2003
    #2
    1. Advertising

  3. Yadagiri Rao KP

    Tim Tyler Guest

    Roedy Green <> wrote:
    : (Yadagiri Rao KP) wrote or quoted :

    :>Why doesn't Java have canBeExecuted method in its File class unlike
    :>WIndows and UNix files.PLs explain

    : Tell us non-Unix types what this method does. Perhaps the reason is
    : it would only have meaning on Unix platforms.

    It could mean the system knows what to do with the file when the user
    changes the CSD to its directory and types its name in at the prompt.
    --
    __________
    |im |yler http://timtyler.org/
    Tim Tyler, Aug 13, 2003
    #3
  4. Yadagiri Rao KP

    Tim Tyler Guest

    Tor Iver Wilhelmsen <> wrote:
    : (Yadagiri Rao KP) writes:

    :> Why doesn't Java have canBeExecuted method in its File class unlike
    :> WIndows and UNix files.PLs explain

    : Not all platforms have the ability to identify an "executable"
    : attribute of a file.

    Not all platforms can print. Not all platforms have colour screens.

    If not all platforms support something, that is not sufficient reason
    for Java not to support it.

    Windows has a flag for marking executable files (Properties>
    Security>Advanced).

    Unix does also - I guess that covers Linux, Solaris and OSX as well.
    --
    __________
    |im |yler http://timtyler.org/
    Tim Tyler, Aug 13, 2003
    #4
  5. Yadagiri Rao KP

    Roedy Green Guest

    On 09 Aug 2003 10:24:12 +0200, Tor Iver Wilhelmsen
    <> wrote or quoted :

    >> Why doesn't Java have canBeExecuted method in its File class unlike
    >> WIndows and UNix files.PLs explain

    >
    >Not all platforms have the ability to identify an "executable"
    >attribute of a file.


    windows itself does not have such an attribute bit. What determines if
    something is executable is if there is a hook for the extension in the
    registry. For example you can make .html executable in that clicking
    an HTML file will execute the html by starting a browser and rendering
    it.

    --
    Canadian Mind Products, Roedy Green.
    Coaching, problem solving, economical contract programming.
    See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
    Roedy Green, Aug 14, 2003
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mr. SweatyFinger
    Replies:
    2
    Views:
    1,740
    Smokey Grindel
    Dec 2, 2006
  2. Sideswipe
    Replies:
    15
    Views:
    535
    Chronic Philharmonic
    Jun 21, 2008
  3. thunk
    Replies:
    1
    Views:
    292
    thunk
    Mar 30, 2010
  4. thunk
    Replies:
    0
    Views:
    453
    thunk
    Apr 1, 2010
  5. thunk
    Replies:
    14
    Views:
    599
    thunk
    Apr 3, 2010
Loading...

Share This Page