Runtime.getRuntime().exec() java.io.FilePermission denied

Discussion in 'Java' started by moongeegee, Sep 25, 2008.

  1. moongeegee

    moongeegee Guest

    I can execute Runtime.getRuntime().exec() correctly without any
    probelm.
    After I convert to Applet, I got the following error:
    java.security.AccessControlException: access denied
    (java.io.FilePermission <<ALL FILES>>

    I could not access server configure file to grant permission. Please
    help me. What should I do? Thanks a million.
     
    moongeegee, Sep 25, 2008
    #1
    1. Advertising

  2. In article
    <>,
    moongeegee <> wrote:

    > I can execute Runtime.getRuntime().exec() correctly without any
    > prob[le]m. After I convert to Applet, I got the following error:
    > java.security.AccessControlException: access denied
    > (java.io.FilePermission <<ALL FILES>>
    >
    > I could not access server configure file to grant permission. Please
    > help me. What should I do? Thanks a million.


    "An applet cannot start any program on the host that is executing it."
    Imagine how unsafe it would be if this were permitted.

    <http://java.sun.com/docs/books/tutorial/deployment/applet/security_pract
    ical.html>

    --
    John B. Matthews
    trashgod at gmail dot com
    home dot woh dot rr dot com slash jbmatthews
     
    John B. Matthews, Sep 25, 2008
    #2
    1. Advertising

  3. moongeegee

    Dave Miller Guest

    moongeegee wrote:
    > I can execute Runtime.getRuntime().exec() correctly without any
    > probelm.
    > After I convert to Applet, I got the following error:
    > java.security.AccessControlException: access denied
    > (java.io.FilePermission <<ALL FILES>>
    >
    > I could not access server configure file to grant permission. Please
    > help me. What should I do? Thanks a million.

    In production the applet will be running on the client computer not on
    your server. If you are trying to access a file on the server, you need
    to access the file with a server side process and then pass the data to
    the applet. If you are trying to access a file on the client, you need
    to sign your applet.

    --
    Dave Miller
    Java Web Hosting
    http://www.cheap-jsp-hosting.com/
     
    Dave Miller, Sep 25, 2008
    #3
  4. moongeegee

    Dave Miller Guest

    moongeegee wrote:
    > I can execute Runtime.getRuntime().exec() correctly without any
    > probelm.
    > After I convert to Applet, I got the following error:
    > java.security.AccessControlException: access denied
    > (java.io.FilePermission <<ALL FILES>>
    >
    > I could not access server configure file to grant permission. Please
    > help me. What should I do? Thanks a million.

    Don't cross post - you're just clogging the system and making it less
    likely that you will get an answer.

    --
    Dave Miller
    Java Web Hosting
    http://www.cheap-jsp-hosting.com/
     
    Dave Miller, Sep 25, 2008
    #4
  5. moongeegee

    moongeegee Guest

    On Sep 25, 1:07 pm, moongeegee <> wrote:
    > I can execute Runtime.getRuntime().exec() correctly without any
    > probelm.
    > After I convert to Applet, I got the following error:
    > java.security.AccessControlException: access denied
    > (java.io.FilePermission <<ALL FILES>>
    >
    > I could not access server configure file to grant permission. Please
    > help me. What should I do? Thanks a million.


    Sorry for multiple post.

    I need to use Runtime.getRuntime()exec(ln -s xxx xxx) for linking a
    file.
    Would anyone give me other alternative way to solve this issue ?
    Thanks.
     
    moongeegee, Sep 25, 2008
    #5
  6. moongeegee

    Roedy Green Guest

    On Thu, 25 Sep 2008 10:07:26 -0700 (PDT), moongeegee
    <> wrote, quoted or indirectly quoted someone who
    said :

    >I can execute Runtime.getRuntime().exec() correctly without any
    >probelm.
    >After I convert to Applet, I got the following error:
    >java.security.AccessControlException: access denied
    >(java.io.FilePermission <<ALL FILES>>


    see http://mindprod.com/jgloss/applet.html
    http://mindprod.com/jgloss/signedapplet.html

    Whenever applets do anything interesting, such as call exec, they
    have to be signed.
    --
    Roedy Green Canadian Mind Products
    http://mindprod.com/politics/harper.html
    Anyone but Harper for Prime Minister of Canada
     
    Roedy Green, Sep 26, 2008
    #6
  7. moongeegee

    Nigel Wade Guest

    Roedy Green wrote:

    > On Thu, 25 Sep 2008 10:07:26 -0700 (PDT), moongeegee
    > <> wrote, quoted or indirectly quoted someone who
    > said :
    >
    >>I can execute Runtime.getRuntime().exec() correctly without any
    >>probelm.
    >>After I convert to Applet, I got the following error:
    >>java.security.AccessControlException: access denied
    >>(java.io.FilePermission <<ALL FILES>>

    >
    > see http://mindprod.com/jgloss/applet.html
    > http://mindprod.com/jgloss/signedapplet.html
    >
    > Whenever applets do anything interesting, such as call exec, they
    > have to be signed.


    Whenever applets do anything bizarre, such as exec("ln -s"), one has to question
    the wisdom of the intent...

    --
    Nigel Wade
     
    Nigel Wade, Sep 26, 2008
    #7
  8. moongeegee

    Arne Vajhøj Guest

    Dave Miller wrote:
    > Don't cross post - you're just clogging the system and making it less
    > likely that you will get an answer.


    Better than multi-posting ...

    Arne
     
    Arne Vajhøj, Oct 5, 2008
    #8
    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. Zsolt Koppany
    Replies:
    2
    Views:
    7,241
    SaintMagoo
    Mar 5, 2011
  2. Thanasis \(sch\)
    Replies:
    0
    Views:
    5,507
    Thanasis \(sch\)
    Mar 1, 2004
  3. Jakir
    Replies:
    4
    Views:
    3,240
    Jakir
    Sep 1, 2004
  4. Replies:
    12
    Views:
    5,138
    Roedy Green
    Apr 19, 2009
  5. SamuelXiao
    Replies:
    16
    Views:
    2,086
    Arne Vajhøj
    Sep 27, 2011
Loading...

Share This Page