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. Advertisements

  2. "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, Sep 25, 2008
    #2
    1. Advertisements

  3. moongeegee

    Dave Miller Guest

    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, Sep 25, 2008
    #3
  4. moongeegee

    Dave Miller Guest

    Don't cross post - you're just clogging the system and making it less
    likely that you will get an answer.
     
    Dave Miller, Sep 25, 2008
    #4
  5. moongeegee

    moongeegee Guest

    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

    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, Sep 26, 2008
    #6
  7. moongeegee

    Nigel Wade Guest

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

    Arne Vajhøj Guest

    Better than multi-posting ...

    Arne
     
    Arne Vajhøj, Oct 5, 2008
    #8
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.