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!
LVL 1
dvd99Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

dvd99Author Commented:
Adjusted points to 5
0
BaneBaneCommented:
Hi

try this
import com.ms.security.*;
PolicyEngine.assertPermission(PermissionID.NETIO);

when you add this to your applet you can get out of the java sandbox.
this line gives permissions for netio but there are many permissions you can set.

Hope this helps.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
dvd99Author Commented:
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?
0
BaneBaneCommented:
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.
0
heyhey_Commented:
> (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
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.