Link to home
Start Free TrialLog in
Avatar of dvd99
dvd99

asked on

Java appplets

Hello , is there any way a Applet can use the system like an application?
It's only for my browser so can I add any code, without paying any money?
Thanks!
Avatar of dvd99
dvd99

ASKER

Adjusted points to 5
ASKER CERTIFIED SOLUTION
Avatar of BaneBane
BaneBane

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dvd99

ASKER

Ok BaneBane your answer was great and I will accept it if you tell me a bit more, Will this work on both MS and Netscape browsers?, Do I add that code one under the other and what sork of things can i now do?
Print?,Start other apps?
And will this work on other computers?
Hi.

This solution will work on IE and hopefuly on Netscape (only god know what those guy at Netscape do), anyway I have seen no mention that this solutions shouldn't work on Netscape.

Put the import line at the begining of your applet, as usual.

put the 2nd line as the first line in your start() method.


look at the folowing explanation for what you can do with the assertPermission command.

PermissionID Class Fields
The PermissionID Class contains the following fields.

CLIENTSTORE The permission identifier representing the permission type that controls access to the client storage APIs. This identifier corresponds to the permission implementation in the com.ms.security.permissions.ClientStoragePermission class.
EXEC The permission identifier representing the permission type that controls the ability to execute applications. This identifier corresponds to the permission implementation in the com.ms.security.permissions.ExecutionPermission class.
FILEIO A permission identifier representing the permission type that controls the ability to perform file I/O operations. This identifier corresponds to the permission implementation in the com.ms.security.permissions.FileIOPermission class.
MULTIMEDIA This identifier corresponds to the permission implementation in the com.ms.security.permissions.MultimediaPermission class.
NETIO The permission identifier representing the permission type that controls networking operations. This identifier corresponds to the permission implementation in the com.ms.security.permissions.NetIOPermission class.
PRINTING The permission identifier representing the permission type that controls the ability to use the printing APIs. This identifier corresponds to the permission implementation in the com.ms.security.permissions.PrintingPermission class.
PROPERTY The permission identifier representing the permission type that controls access to the system properties. This identifier corresponds to the permission implementation in the com.ms.security.permissions.PropertyPermission class.
REFLECTION The permission identifier representing the permission type that controls the ability to use the reflection APIs. This identifier corresponds to the permission implementation in the com.ms.security.permissions.ReflectionPermission class.
REGISTRY The permission identifier representing the permission type that controls access to the system registry. This identifier corresponds to the permission implementation in the com.ms.security.permissions.RegistryPermission class.
SECURITY The permission identifier representing the permission type that controls access to the JDK security APIs. This identifier corresponds to the permission implementation in the com.ms.security.permissions.SecurityPermission class.
SYSSTREAMS The permission identifier representing the permission type that controls the ability to set the system streams. This identifier corresponds to the permission implementation in the com.ms.security.permissions.SystemStreamsPermission class.
SYSTEM A special permission identifier that represents all possible permissions. This identifier does not correspond to a specific permission class.
THREAD The permission identifier representing the permission type that controls threading operations. This identifier corresponds to the permission implementation in the com.ms.security.permissions.ThreadPermission class.
UI The permission identifier representing the permission type that controls access to extended AWT functionality. This identifier corresponds to the permission implementation in the com.ms.security.permissions.UIPermission class.
USERFILEIO The permission identifier representing the permission type that controls access to user-directed file I/O. This identifier corresponds to the permission implementation in the com.ms.security.permissions.UserFileIOPermission class.

It has worked on the few computers I checked my applet on.

Btw 5 points... not that I'm complaining or anything (you need to work hard these days.... :-))

Hope this helps.
> (only god know what those guy at Netscape
> do), anyway I have seen no mention that this solutions
> shouldn't work on Netscape.

those guy in Netscape are implementing standard Java, and I\m sure that they do not use
com.ms.security.PolicyEngine
class :)

just 2c