Click here to Skip to main content
11,922,641 members (56,665 online)
Rate this:
Please Sign up or sign in to vote.
See more: Java Firefox Applet

I'm building java applet in notepad++ not in some IDE. How can I give this applet all permissions (for opening and writting to socket) for testing. I'm asking this because now I need to deploy applet to server each time!

If I run applet from developing computer and I want to connect to socket on server which is not on localhost I get exception.

So I'm asking if there is any way to give all or only this applet all permissions in browser?
Posted 19-Dec-12 7:24am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

I'm building java applet in notepad++ not in some IDE

There's your fault. WHY?

Add a file "policy.policy" to the project and put in there the following:

grant {

the start the app with the argument:

java MyFunkyApplication
aselan 20-Dec-12 2:41am
At first thank you for your quick response!

I only have 320 KB space, for CSS, HTML, Java applet and JavaScript code, that's why I'm not doing this with IDE, because it generates a lot of unnecessary files.

I know about policy file, but I can't use it without IDE, or not?
TorstenH. 20-Dec-12 3:55am
no, the argument thingy is just a fancy little confusion brought into this by me.
sure you can, how do you start the applet?

There is also a code based version, please refer to google for that.
aselan 20-Dec-12 4:09am
I start applet in web browser, I run index.html with applet and I get security exception for opening Soceket on server machine (let's say on IP If I upload it on server (which is on IP, it works! I would like to develop app on developmetn machine and opening socket on server. Now I must upload it each time.

I google it but you can give java applet permissions only through IDE.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.151125.1 | Last Updated 19 Dec 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100