Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / January 2006

Tip: Looking for answers? Try searching our database.

com.ms.security, com.ms.security.PermissionID.FILEIO and error in compiling

Thread view: 
Marco - 28 Jan 2006 19:05 GMT
I need to permit to an Applet to read and write HD files.
All ok with java 1.2, 1.3, 1.4 and 1.5 of Sun.
But when, before signing a verson of my applet written for Internet Explorer
without Java SUN (Microsoft 1.1.4 JVM), I try to insert this:

try
{
 Class s=Class.forName("com.ms.security.PolicyEngine");
 if (s!=null)
  {s.assertPermission(com.ms.security.PermissionID.FILEIO);}
}
catch(Throwable e)
{System.out.println("Error: "+e);}

The result, is, while I compile my applet, the following error:

   package com.ms.security does not exist
   s.assertPermission(com.ms.security.PermissionID.FILEIO);

I try Class p=com.ms.security.PermissionID; and
s.assertPermission(p.FILEIO); instead, but the error is "No variable FILEIO
defined in class java.lang.Class"

How can I do? I have only Sun javac for compile.

N.B.I writed 2 applets, one for SUN 1.4, and the another for Microsoft JVM,
with a javascript that run the correct one in the browser, but only the one
for java Sun works properly.
Roedy Green - 28 Jan 2006 23:18 GMT
>But when, before signing a verson of my applet written for Internet Explorer
>without Java SUN (Microsoft 1.1.4 JVM), I try to insert this:

Microsoft's signing scheme is long buried.  You can't even buy
certificates for it any more. The new Sun model is much simpler. You
don't HAVE to ask permission for any thing, though you can test if
your are permitted Just go ahead and do it.  You will get an exception
if you don't have permission.  Basically you just rip out all the old
permission code for Netscape/MS.

See http://mindprod.com/jgloss/signedapplets.html
and chase links for a day or two.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.