7 Replies Latest reply: Sep 26, 2012 8:33 AM by 964438 RSS

    Adding permissions to .java.policy

    964438
      Hi,

      On my site http://www.atxcomputers.co.za/PianoApplet/PianoGuru.aspx I've got a java applet and when I try and open it I get this error stating I need some permissions for this.

      Screen print of the error: http://photostand.co.za/images/tm3i26j9riamu8flpd4d.png

      I've mailed my hosting company and they say:

      "The java.policy file that is supplied by WebSphere Application Server is located at install_root/java/jre/lib/security/java.policy

      At the moment we only run Microsoft Windows Server on our servers (with no Java installed) and not WebSphere so we unfortunately cannot help out here."

      Anything I can do to resolve this?

      Thanks,
      Jan

      Edited by: 961435 on 26-Sep-2012 01:04
        • 1. Re: Adding permissions to .java.policy
          gimbal2
          Sounds like a load of cr@p to me. Its an applet isn't it? Those execute on the client's JVM (through a browser plugin) so the .policy file of the local JVM needs to be altered. Which I also find odd; is the applet signed? If not you might want to try signing it.
          • 2. Re: Adding permissions to .java.policy
            EJP
            Exactly. They gave you the wrong answer but then you asked them the wrong question :-|

            Sign the applet.
            • 3. Re: Adding permissions to .java.policy
              964438
              cool thanks, I've been trying to sign the thing since this morning now.. lol no luck :-/

              so... C:\Program Files\Java\jdk1.6.0_31\bin

              I open up the jar.exe in command prompt. Using the -c create new archive command how do I exactly do this?

              I've tried... without any luck

              http://www-personal.umich.edu/~lsiden/tutorials/signed-applet/signed-applet.html

              http://www.youtube.com/watch?v=5MICw_5Y2tc

              http://csdl.ics.hawaii.edu/~johnson/613f99/modules/04/jar-files.html

              Edited by: 961435 on 26-Sep-2012 04:17
              • 4. Re: Adding permissions to .java.policy
                EJP
                See the documentation for the jarsigner tool.
                • 5. Re: Adding permissions to .java.policy
                  gimbal2
                  EJP wrote:
                  See the documentation for the jarsigner tool.
                  http://docs.oracle.com/javase/6/docs/technotes/tools/windows/jarsigner.html

                  Always go to the source when you can, not some random tutorials on the net. The only thing the random tutorials should have told you is that the jarsigner tool is involved, which prompts you to go figure out how it works. Finding proper information is not hard, it just takes a bit of reasoning.
                  • 6. Re: Adding permissions to .java.policy
                    964438
                    Thanks, went throught the documentation and tried it out.. now getting some error

                    Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/tools/javac/M

                    I'll try to re-install jdk 6 and try again..
                    • 7. Re: Adding permissions to .java.policy
                      964438
                      yes :-) managed to get it working... now I don't have any sound.. haha If I run it on my machine it work but through the website it don't. Only when I record and playback it plays.. Check it out: http://www.atxcomputers.co.za/PianoApplet/PianoGuru.aspx

                      Any ideas why the sound would give issues?