applet works inconsistenlty

I have created an applet that uses Novell's JavaBeans to get a user's NDS name from the tree.  In the process of getting this to work, I experimented with signed applets, editing policy files, changing classpath, etc. on my machine.  Then I downloaded Sun's Java Plug-in.  I couldn't get that to
work, so I downloaded a couple of different versions.  Then I upgraded my Netscape to version 4.07 and tried again, and this time it worked.  I now have two applets created and compiled on my computer, and copied to our intranet server, so that when I visit their pages in Netscape, the
applets work completely.
  The problem - my computer is the only one that will run these applets.  I have tried copying the class and JavaBeans to the other computers, using the same version of Netscape, downloading both plugin versions, changing classpath, even copying files such as and java.policy to their
respective places on the other machine.  None of this works.  I get 'AccessControlException' and 'PropertyPermissionError' when I try to run them.
  Please help, I have been working on this for over a week with no solution in sight.

Who is Participating?
heyhey_Connect With a Mentor Commented:
thanks - I am answering your question. :)

If you are really satisfied with my help, you can give me 'grade A' :))
probably your applet uses some third party classes that are installed only on your computer (As development enviroment)
candaceAuthor Commented:
I copied every base directory with .class or .jar files, and am still getting the same errors.  Any other suggestions?
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

if your applet code is very simple, you can post it here.
also it will help us if you post the whole eception stacktrace ...
candaceAuthor Commented:
import java.awt.*;
import java.awt.event.*;
import java.awt.image.ImageObserver;
import java.util.*;
import java.applet.*;
import com.novell.beans.NWSess.*;
import com.novell.service.nds.naming.*;
import javax.naming.*;
import javax.naming.spi.*;

public class GetNameEmail extends Applet implements Runnable {
AppletContext ac;
String fullname, shortname, shortfull, straddress;
NWNetworkName  name, connTree;
NWNetworkNames trees;
String str, treename, filename;
NWSess nwSession;
StringBuffer strbuffull, strbufdot, strbufemail;
int i, j, k;

public void init()
  try {
        nwSession = new NWSess();
      trees = nwSession.getConnectedTrees();  
      treename = new String(nwSession.getCurrentFullName());
      name = nwSession.getLoginName(treename);
      fullname = new String(name.getFullName());
      shortname = new String(name.getShortName());
      String desiredAttrs[] = {"NGW: GroupWise ID"};
      Properties systemProps = System.getProperties();
        Properties myProps = new Properties(systemProps);
      myProps.put("java.naming.provider.url", "MYTREE");
        DirContext initialCtx = new InitialDirContext(myProps);
      for (int i=0; i<3; i++)
      {      j = fullname.indexOf('\\', j);
            j++; }
      shortfull = new String(fullname.substring(j-1));
      i = shortfull.lastIndexOf('\\');
      strbufdot = new StringBuffer(shortfull.substring(i+1));
      j = i;
      i = shortfull.lastIndexOf('\\', j-1);
      while (i != -1)
      {      strbufdot.append(".");
            strbufdot.append(shortfull.substring(i+1, j));
            j = i;
            i = shortfull.lastIndexOf('\\', j-1);
      Object obj = initialCtx.lookup(strbufdot.toString());
      if (obj != null)
      {      DirContext currDSCtx = (DirContext) obj;
            Attributes attrSet=currDSCtx.getAttributes("", desiredAttrs);
            NamingEnumeration attrEnum=attrSet.getAll();
                  {             Attribute attr = (Attribute);
                           Enumeration attrValueEnum = attr.getAll();
                           {                 Object value = attrValueEnum.nextElement();
                  straddress = new String(value.toString());
      i = 0;
      i = straddress.lastIndexOf(" ");
      j = straddress.indexOf("{");
      strbufemail = new StringBuffer(straddress.substring(i+1, j));
            ac = getAppletContext();
      catch (Exception e)
      {        System.out.println(e.toString());

public void start()
            ac.showDocument(new URL(""+strbufemail.toString()));
            System.out.println("show doc");
      catch (Exception e)
      {      System.out.println(e.toString());

public void run()

The error message is:
Java(TM) Plug-in
Using JRE version 1.2
User home directory = C:\WINNT\Profiles\mistest
Proxy Configuration: Manual Configuration
     Proxy: http=;https=;ftp=;gopher=;socks=
     Proxy Overrides: *,*oracle,*help

JAR cache enabled.
Opening no proxy
No holding
CacheHandler trying caching.
CacheHandler file name: C:\Program Files\Netscape\Users\default\cache\M0O1862O.CLA
Got cached copy access denied (java.util.PropertyPermission * read,write)
candaceAuthor Commented:
Adjusted points to 200
lets define the problem.

- you have the applet classes on you intranet server,
- you can see this applet on your computer, using Netscape 4.07 (downloading the applet from the intranet server)
- you can't see the applet on all the other machines (using the same software configuration).

this looks strange ...

Is your applet signed. Unsigned applets are not allowed to use this code

It seems that the applet has permissions on your machine, but does not have on the other ...

hope this helps
candaceAuthor Commented:
I don't think I ever successfully signed the applet - I know I experimented with creating my own certificates, but none show up under Netscape - Security - Certificates.  I edited my prefs.js file and added a line to allow the codebase to serve as a certificate.  I also added this line to the prefs file on the other computer, however.
this statement will sure give you SecurityException.

untrusted applets are not allowed to manipulate the system properties object.
if this applet works on some computer:
- either applet is signed
- either borwser (or Java plug-in) is configured to allow applets to access System properties object.

this statement will fail on all other unconfigured computers.

candaceAuthor Commented:
It turns out that it was a combinations of rights issues (I had my own account on the server, and others didn't have the correct rights) and the fact that the user I was using to test didn't have the attributes that I was trying to extract (in this case, no groupwise account).  So, I finally got it to work.  Thanks so much for your help.
so will I get some points ? :))
candaceAuthor Commented:
I don't know how to close a problem, or if I'm supposed to do it or someone else.  
And if it's up to me, you get the points. ;)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.