I have a quick question concerning my simple signed applet. All it does is display the client's username (I included the pertinent code).However, after Netscape prompts the user to grant the privilege, it only displays
user=
instead of
user= (The client's username)
Why would it print an empty string as if the privilege wasn't enabled? Please help
import netscape.security.*;
public class NewName extends Applet
{
public String msg;
public void update(Graphics gp){
PrivilegeManager.enablePrivilege("UniversalPropertyRead"
try
{
msg= System.getProperty("user.name"
}
catch (Exception e)
{
msg= "Get username failed: " + e;
}
gp.drawString("user= " + msg, 20, 20);
}
public void paint(Graphics gp){
update(gp);
}
user=
instead of
user= (The client's username)
Why would it print an empty string as if the privilege wasn't enabled? Please help
import netscape.security.*;
public class NewName extends Applet
{
public String msg;
public void update(Graphics gp){
PrivilegeManager.enablePrivilege("UniversalPropertyRead"
try
{
msg= System.getProperty("user.name"
}
catch (Exception e)
{
msg= "Get username failed: " + e;
}
gp.drawString("user= " + msg, 20, 20);
}
public void paint(Graphics gp){
update(gp);
}