Solved

assertPermission

Posted on 1998-10-30
4
180 Views
Last Modified: 2012-05-05
How do I call the assertPermission function, what do i have to import?. I work with jdk1.1.5
I want to create a socket to localhost (=127.0.0.1) in IE4.0, I tried to set the security setting in IE4.0 but it didn't work.
0
Comment
Question by:ahannink
  • 2
4 Comments
 

Author Comment

by:ahannink
ID: 1226674
Edited text of question
0
 
LVL 2

Expert Comment

by:shchuka
ID: 1226675
You realize that you HAVE to sign your applet in order to be able to do it at all - right?
0
 

Accepted Solution

by:
sreedharK earned 50 total points
ID: 1226676
Here is how you can call it :
    PolicyEngine.assertPermission(PermissionID.NETIO);
If you use this code, you need the SDK for Java to compile the code.  
you can just take the com.ms.security package, put the package in the classpath and imoport the package in your code and compile it.
OR
Install SDK for java from Microsoft(It's free) and run the executable file classR or classD. You'll get the package or simply use the compiler jvc that comes with sdk for java..
0
 

Author Comment

by:ahannink
ID: 1226677
JDK1.1.5 is used to compile the code. So the import statement is necessary. But also take care you've put the IE classes into your classpath.
Most of the time they are allocated in Windows\java\classes\classes.zip
The comment of shchuka is true the applet must be signed.
Thank you for answering this question
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now