Applet Notinited.

Hello every one...
I face problem in loading my applet in IE 6.0.
The error message "applet <appletname> notinited" displays in the status bar.
The applet contains a JList , a JTextAField and a JButton.
It works well under AppletViewer.
weird?!
could anyone tell me how solve this problem?
Thank you very much !

Hi, I am also having the same problem...
we have a intranet site running, and several client machines connecting to the intranet server. all machines except one works perfectly.
on the one machine that it does not work on, it has the same error message mentioned above. so if all except one client machine works, surely the problem is not the codebase??
thank you in advance

Similar Messages

  • Applet notinited .. it runs in eclipse, but not in web browser --urgent

    hi,
    firstly i'm sorry for the "urgent" remark in the title, but I actually really need some help to this problem, since I have to pass up this assignment in about 2 more hours.
    on to the question,this is my full code:
    import java.awt.BorderLayout;
    import java.awt.Color;
    import java.awt.Container;
    import java.awt.GridLayout;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.*;
    import javax.swing.event.DocumentEvent;
    import javax.swing.event.DocumentListener;
    public class reza extends JApplet{
         public static void main(String[] args){
              JFrame myWindow = new JFrame("Sample reza");
              myWindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              reza testReza = new reza();
              myWindow.setContentPane(testReza);//add to the window
              myWindow.pack();
              myWindow.setVisible(true);
         double sum;     //sum of values entered by user
         private ImageIcon board;
         private JPanel topPanel,boardPanel;
         private JLabel l1,l2,l3,l4,l5,l6,lTotal,lAndryusha,lBorya,lVolodya,lGiveUp,lGiveUp2,boardLabel,lRules;
         private JTextField a[],aTotal, b[], bTotal, c[], cTotal;
         private JButton clear,checkAnswer,solve;
         private Container container;
         String A1,A2,A3,A4,A5,A6,ATOTAL,B1,B2,B3,B4,B5,B6,BTOTAL,C1,C2,C3,C4,C5,C6,CTOTAL;
         public reza(){
              container = getContentPane();
             container.setLayout(new BorderLayout());
             topPanel = new JPanel(new GridLayout(6,8,5,5));
             boardPanel = new JPanel(new GridLayout(1,2,5,5));
             board = new ImageIcon("board.jpg");
             boardLabel = new JLabel(board);
             topPanel.setBackground(Color.WHITE);
             boardPanel.setBackground(Color.white);
             //utk handle button clear ngan solve
             ButtonHandler handler = new ButtonHandler();
             lGiveUp = new JLabel("           Give up?");
             lGiveUp2 = new JLabel("Press this >>>");
             lRules = new JLabel("Rules: User may only use the number shown in the dart board");
             l1 = new JLabel("   1");
             l2 = new JLabel("   2");
             l3 = new JLabel("   3");
             l4 = new JLabel("   4");
             l5 = new JLabel("   5");
             l6 = new JLabel("   6");
             lTotal = new JLabel("   Total");
             lAndryusha = new JLabel("Andryusha");
             lBorya = new JLabel("Borya");
             lVolodya = new JLabel("Volodya");
             a = new JTextField[7];
             b = new JTextField[7];
             c = new JTextField[7];
             aTotal = new JTextField();
             bTotal = new JTextField();
                cTotal = new JTextField();
                clear = new JButton("CLEAR");
             solve = new JButton("SOLVE");
             checkAnswer = new JButton("ANSWER");
             topPanel.add(new JLabel("       "));
             topPanel.add(l1);
             topPanel.add(l2);
             topPanel.add(l3);
             topPanel.add(l4);
             topPanel.add(l5);
             topPanel.add(l6);
             topPanel.add(lTotal);
             topPanel.add(lAndryusha);
             int i=1;
             for (i=1;i<=6;i++){
                  a[i] = new JTextField();
                  a.getDocument().addDocumentListener(new textFieldListenerA());
              topPanel.add(a[i]);
         topPanel.add(aTotal);
         topPanel.add(lBorya);
         for (i=1;i<=6;i++){
              b[i] = new JTextField();
              b[i].getDocument().addDocumentListener(new textFieldListenerB());
              topPanel.add(b[i]);
         topPanel.add(bTotal);
         topPanel.add(lVolodya);
         for (i=1;i<=6;i++){
              c[i] = new JTextField();
              c[i].getDocument().addDocumentListener(new textFieldListenerC());
              topPanel.add(c[i]);
         topPanel.add(cTotal);
         clear.addActionListener(handler);
         solve.addActionListener(handler);
         checkAnswer.addActionListener(handler);
         topPanel.add(new JLabel(" "));
         topPanel.add(new JLabel(" "));
         topPanel.add(new JLabel(" "));
         topPanel.add(new JLabel(" "));
         topPanel.add(new JLabel(" "));
         topPanel.add(new JLabel(" "));
         topPanel.add(clear);
         topPanel.add(solve);
         topPanel.add(new JLabel(" "));
         topPanel.add(lGiveUp);
         topPanel.add(lGiveUp2);
         topPanel.add(checkAnswer);
         topPanel.add(new JLabel(" "));
         topPanel.add(new JLabel(" "));
         topPanel.add(new JLabel(" "));
         topPanel.add(new JLabel(" "));
         boardPanel.add(boardLabel,BorderLayout.WEST);
         boardPanel.add(lRules,BorderLayout.EAST);
         container.add(boardPanel,BorderLayout.NORTH);
         container.add(topPanel,BorderLayout.CENTER);
         setSize(750,700);
         setVisible(true);
         class textFieldListenerA implements DocumentListener{
              public void insertUpdate(DocumentEvent e){
                   int i,count=0;
                   for (i=1;i<=6;i++){
                        try{                    
                             count = count + Integer.parseInt(a[i].getText());
                        }catch(Exception e1){
                   aTotal.setText("" + count);
              public void changedUpdate(DocumentEvent e){
              public void removeUpdate(DocumentEvent e){               
         class textFieldListenerB implements DocumentListener{
              public void insertUpdate(DocumentEvent e){
                   int i,count=0;
                   for (i=1;i<=6;i++){
                        try{                    
                             count = count + Integer.parseInt(b[i].getText());
                        }catch(Exception e1){                         
                   bTotal.setText("" + count);
              public void changedUpdate(DocumentEvent e){
              public void removeUpdate(DocumentEvent e){               
         class textFieldListenerC implements DocumentListener{
              public void insertUpdate(DocumentEvent e){
                   int i,count=0;
                   for (i=1;i<=6;i++){
                        try{                    
                             count = count + Integer.parseInt(c[i].getText());
                        }catch(Exception e1){
                   cTotal.setText("" + count);
              public void changedUpdate(DocumentEvent e){
                   int i,count=0;
                   for     (i=1;i<=6;i++){
                        try{                    
                             count = count + Integer.parseInt(c[i].getText());
                        }catch(Exception e1){
                   cTotal.setText("" + count);
              public void removeUpdate(DocumentEvent e){
                   int i,count=0;
                   for (i=1;i<=6;i++){
                        try{                    
                             count = count + Integer.parseInt(c[i].getText());
                        }catch(Exception e1){
                   cTotal.setText("" + count);
         private class ButtonHandler implements ActionListener{
              //handle button event
              public void actionPerformed(ActionEvent event){
                   //clear all the text fields
                   if (event.getActionCommand().equals("CLEAR")){
                        int i=0;
                        for (i=1;i<=6;i++){
                             a[i].setText("");
                        aTotal.setText("");
                        for (i=1;i<=6;i++){
                             b[i].setText("");
                        bTotal.setText("");
                        for (i=1;i<=6;i++){
                             c[i].setText("");
                        cTotal.setText("");                    
                   else if (event.getActionCommand().equals("SOLVE")){
                        int aCount[],bCount[],cCount[],i,aTotal=0,bTotal=0,cTotal=0;
                        aCount = new int[7];
                        bCount = new int[7];
                        cCount = new int[7];
                        //make sure all fields have been filled in
                        if (a[1].getText().equals("") || a[2].getText().equals("") || a[3].getText().equals("")|| a[4].getText().equals("")|| a[5].getText().equals("")|| a[6].getText().equals("")|| b[1].getText().equals("")|| b[2].getText().equals("")|| b[3].getText().equals("")|| b[4].getText().equals("")|| b[5].getText().equals("")|| b[6].getText().equals("")|| c[1].getText().equals("")|| c[2].getText().equals("")|| c[3].getText().equals("")|| c[4].getText().equals("")|| c[5].getText().equals("")|| c[6].getText().equals("")){
                             JOptionPane.showMessageDialog(null,"Please fill in ALL the scores!!");
                        //if yes, then only proceed
                        else{
                             //for andryusha
                             for (i=1;i<=6;i++){
                                  try{
                                       aCount[i] = Integer.parseInt(a[i].getText());
                                       aTotal = aTotal + aCount[i];
                                  }catch(Exception e1){
                             //check andryusha's 1st and 2nd shots. They must be equal to 22 when added
                             if (aCount[1] + aCount[2] != 22){
                                  JOptionPane.showMessageDialog(null,"Andryusha's 1st + 2nd shots must be equal to 22!!");
                             if (aTotal==71){
                                  JOptionPane.showMessageDialog(null,"Andryusha's scores is right! Well done!!");
                             }else if (aTotal !=71){
                                  JOptionPane.showMessageDialog(null,"You got it wrong for Andryusha's scores. Please try again.");
                             //for Borya
                             for (i=1;i<=6;i++){
                                  try{
                                       bCount[i] = Integer.parseInt(b[i].getText());
                                       bTotal = bTotal + bCount[i];
                                  }catch(Exception e1){
                             if (bTotal==71){
                                  JOptionPane.showMessageDialog(null,"Borya's scores is right! Well done!!");
                             }else if (bTotal !=71){
                                  JOptionPane.showMessageDialog(null,"You got it wrong for Borya's scores. Please try again.");
                             //for Volodya
                             for (i=1;i<=6;i++){
                                  try{
                                       cCount[i] = Integer.parseInt(c[i].getText());
                                       cTotal = cTotal + cCount[i];
                                  }catch(Exception e1){
                             if (cCount[1] != 3){
                                  JOptionPane.showMessageDialog(null,"Volodya's first score is wrong!!");
                             if (cTotal==71){
                                  if (cCount[2] == 50 || cCount[3] == 50 || cCount[4] == 50 || cCount[5]==50 || cCount[6]==50){
                                       JOptionPane.showMessageDialog(null,"Volodya's score is right! Well done!!");
                                  }else if (cCount[2] != 50 && cCount[3] != 50 && cCount[4] != 50 && cCount[5]!=50 && cCount[6]!=50){
                                       JOptionPane.showMessageDialog(null,"Volodya hits the bull's eye once!!");
                             }else if (cTotal!=71){
                                  JOptionPane.showMessageDialog(null,"Volodya's score is wrong!!");
                   }else if(event.getActionCommand().equals("ANSWER")){
                        a[1].setText("20");
                        a[2].setText("2");
                        a[3].setText("25");
                        a[4].setText("3");
                        a[5].setText("20");
                        a[6].setText("1");
                        aTotal.setText("71");
                        b[1].setText("25");
                        b[2].setText("20");
                        b[3].setText("20");
                        b[4].setText("3");
                        b[5].setText("2");
                        b[6].setText("1");
                        bTotal.setText("71");
                        c[1].setText("3");
                        c[2].setText("50");
                        c[3].setText("10");
                        c[4].setText("5");
                        c[5].setText("2");
                        c[6].setText("1");
                        cTotal.setText("71");
         }//end private class ButtonHandler
    I run the program using Eclipse; run as> Java applet
    and in runs perfectly well. I then tried running it using internet explorer and firefox, but only a gray box appeared and the browser says "applet notinited" and "Loading Java Applet Failed.."
    what did i do wrong? any help is really appreciated.. thanks

    thank God i already found the cause of the problem..
    it's because the application has an ImageIcon which links to a local jpeg file, so perhaps security restriction on the browser doesn't allow my applet to access local file, that's why it fails to load.
    either using signed applet (not tested) or removing the picture solved my problem.
    thanks anyway :)

  • Java applet 'notinited'

    I am receiving an error when my applet is loading
    Java applet notinited
    Using comments i have traced the error to:
    Graphics tempGraph;
    Image[] grid = new grid[someNumber];
    for(int d = 0; d<someNumber; d++)
           grid[d] = createImage(200,100);               
           //the following line is where the problem is...
           tempGraph = grid[d].getGraphics();
    }Any ideas?

    This is just a guess, because I can't see all your code...
    But did you override the method init() in your applet?

  • Can someone pls tell me what data applet notinited means?!!

    Hi,
    I installed the plug-in...I have Java 2 Runtime environment and plug in 1.3.1_01
    the applet appears in IE, but netscape said the plug in has to be installed again. I installed the same thing again, and I got the message "data applet notinited"...
    The applet however, still works fine with IE.
    Please help!!
    thank you,
    Sangeetha

    Well ando :)
    Yeah, I agree...quite troublesome. Even now, the applet works fine when I access it using the server running on a different machine. But then, when I make a copy of those files on my machine, and have the webserver running on my own machine, and access it, it apears on IE, but doesn't appear on netscape.
    The problem is, I have to develop netscape compatible code!!!
    and btw, I am Ms. Sangeetha :)
    thanks again!
    sangeetha

  • About Applet Notinited

    Hi
    I am a new in applet. i run htm on local iis. a small code with applet notinited error. It is in fact a with-parameter-version of http://javaboutique.internet.com/Blink/. I can run the sample applet perfectly
    Applet code:
    import java.awt.*;
    import java.applet.*;
    public class MyBlink extends Applet
    String newlbl;
    public void init()
         newlbl = getParameter("lbl");
    public void paint(Graphics g)
         g.drawString(newlbl, 25, 25);
    The code in htm calling applet:
    <script type="text/javascript">
    document.write("<applet code='MyBlink.class' width='300' height='300'><param name='lbl' value='hellloworld!'></applet>")
    </script>
    Any advise is appreciated.
    shxj99

    harmmeijer
    Thanks for your reply.
    The reason is my forgetting to move XX.class to the running directory.
    One more question here.
    Before moving mouse in the applet area, the third and forth codes using double buffer in the following page initate with blank background. Please tell me why and how to handle it.
    http://www.dgp.toronto.edu/~mjmcguff/learn/java/07-backbuffer/
    Thanks again!!
    Jeffrey

  • Java error, applet notinited

    Hello,
    I manage a few macs, and we use to scan using a printer/scanner on the network with a browser. From some computers (NOT ALL) the users receive an error "applet com.efi.appls.webtools.WebToolsApplet notinited". Is the same with Safari or Firefox. Anyone has any idea? (obviously all the macs are exactly the same, with mac os X 10.4.8, all upgrades done, Safari and Firefox last version).
    Thank you

    ok, the preferences are as shown in your picture on both computers. I have also deleted the files "in special folder" and the only thing changed is that the error received now is applet notloaded instead of notinited.
    Obviously the users can use another mac, so is not a big problem, but I can't really understand why 2 macs on 11 behave like this...
    Thank you for your help. If I will find a solution, I will post it.

  • Applet Notinited - Loading Java Applet Failed

    I tried looking for my particular failure on the forums and googling it, but no one else seems to have my particular affliction.
    Obviously, when I try to load up my applets I created, even something as simple as a text readout, it gives me the notinited bit in the status bar.
    Doesn't work in FireFox, IE, Opera and I'm runing 1.5
    Doesn't work on my fiance's computer and she's running 1.4.2
    I run the java console, and it lists the class not found exception. and also
    an IOException error: open HTTP connection failed
    I run the appletviewer and it lists java.lang.RuntimeException: java.security.AccessControlException: access denied (java.net.SocketPermission wolkefamily:80 connect,resolve)
    the wolkefamily bit is my domain name.
    i checked, and checked, and rechecked for binary transfers set, correct html, correct java syntax. i think it's all on my server end, but i don't have direct access to teh servers itself.
    any ideas? and thank you.

    Obviously, when I try to load up my applets I
    created, even something as simple as a text readout,
    it gives me the notinited bit in the status bar.
    Doesn't work in FireFox, IE, Opera and I'm runing
    1.5
    Doesn't work on my fiance's computer and she's
    running 1.4.2
    I run the java console, and it lists the class not
    found exception. Starting by testing a simple example like a printout as you said,
    How are you "loading up" your applets?
    Are you calling applet viewer/ running from browser and how?

  • Applet works in appletviewer but not in IE - Applet notinited

    Hi, i have written a simple applet which uses swing components, ie swing labels and buttons. The buttons and labels also have icons with the text. The icons are in a folder called "icons" inside the same folder that the class is in. Everything works fine in the appletviewer, the icons are all displayed correctly, however when i try to open it through Internet Explorer i get this error in the java console window:
    Java(TM) Plug-in: Version 1.4.0
    Using JRE version 1.4.0 Java HotSpot(TM) Client VM
    c: clear console window
    f: finalize objects on finalization queue
    g: garbage collect
    h: display this help message
    l: dump classloader list
    m: print memory usage
    o: trigger logging
    p: reload proxy configuration
    q: hide console
    r: reload policy configuration
    s: dump system properties
    t: dump thread list
    x: clear classloader cache
    0-5: set trace level to <n>
    java.security.AccessControlException: access denied (java.io.FilePermission icons/world.jpg read)
         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:270)
         at java.security.AccessController.checkPermission(AccessController.java:401)
         at java.lang.SecurityManager.checkPermission(SecurityManager.java:542)
         at java.lang.SecurityManager.checkRead(SecurityManager.java:887)
         at sun.awt.SunToolkit.getImageFromHash(SunToolkit.java:408)
         at sun.awt.SunToolkit.getImage(SunToolkit.java:422)
         at javax.swing.ImageIcon.<init>(ImageIcon.java:81)
         at javax.swing.ImageIcon.<init>(ImageIcon.java:107)
         at atm.init(atm.java:23)
         at sun.applet.AppletPanel.run(AppletPanel.java:341)
         at java.lang.Thread.run(Thread.java:536)
    Can anyone help me with this problem? I desperately need this applet working in the browser and not just the appletviewer.
    Many thanks in advance,
    Adrian

    Hi, i don't think it is a problem with the security settings, the problem definately lies in these lines
    inside the init method:
         Icon worldIcon = new ImageIcon(getDocumentBase(),"icons/world.jpg");
         JLabel myIconLbl = new JLabel("My Icon and Label", worldIcon, SwingConstants.CENTER);     
    add(myIconLbl);
    If i take the ' getDocumentBase() ' part out of the first line, the applet compiles and the worldIcon is correctly displayed in the appletviewer but not in Internet Explorer (the problem i orriginally sited).
    However by leaving the getDocumentBase() line in the code, the applet correctly compiles but does not show the icons at all in either appletviewer or IE!!
    Any suggestions?
    Adrian

  • When running my code i get this message"applet notinited"

    if someone could tell what to do i would be very thankful.every comment is important cause i'm new to java.
    it compiles perfect.
    here is my code
    import java.applet.*;
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    public class board extends JApplet implements Runnable, MouseListener {
    private Image offscreenImage;
    private Graphics offscr;
    private Thread t;
    private int boardwidth;
    private int boardheight;
    private int sqx;
    private int sqy;
    private square board[][];
    private int sqheight;
    private int sqwidth;
    private int xplayer;
    private int oplayer;
    private int i;
    private int j;
    private int boardi;
    private int boardj;
    public void board()
    { addMouseListener(this);
    public void init()
    t= new Thread(this);
    t.start();
    sqx=0;
    sqy=0;
    boardwidth=getSize().width;
    boardheight=getSize().height;
    sqwidth=boardwidth/3;
    sqheight=boardheight/3;
    offscreenImage=createImage(boardwidth, boardheight);
    offscr=offscreenImage.getGraphics();
    for (i=0;i<=2;i++)
    { for (j=0; j<=2;j++)
    { sqx+=j*sqwidth;
    sqy+=i*sqheight;
    board[i][j]= new square(sqx,sqy,sqheight,sqwidth,0); }
    public void paint(Graphics g)
    for (i=0;i<=2;i++)
    { for (j=0; j<=2;j++)
    { switch ( board[i][j].status)
    {  case 0:
    offscr.setColor(Color.white);
    break;
    case 1:
    offscr.setColor(Color.black);
    break;
    case 2:
    offscr.setColor(Color.red);
    break;
    offscr.fillRect( board[i][j].x_pos, board[i][j].y_pos, sqwidth, sqheight);
    g.drawImage(offscreenImage,0,0, this);
    public void update(Graphics g)
    paint(g);
    public boolean validMove(int count1,int count2)
    {  if(board[count1][count2].status==0)
    return true;
    else
    return true;
    public void getIndex(MouseEvent e )
    { int mousex=e.getX();
    int mousey=e.getY();
    for (i=0;i<=2;i++)
    { for (j=0; j<=2;j++)
    if ((mousex>board[i][j].x_pos) && (mousex< (boardj].x_pos+100)))
    { if ((mousey>board[i][j].y_pos) && (mousey< (board[i][j].y_pos+100)))
    {  boardi=i;
    boardj=j;
    public void mouseReleased(MouseEvent e)
    {  getIndex(e);
    if (validMove(boardi,boardj))
    { board[boardi][boardj].status=1;
    repaint();
    public void run()
    { while (true)
    repaint();
    try {
    t.sleep(1000/30);
    }catch (InterruptedException e) {;}
    public void mousePressed(MouseEvent e) {
    public void mouseClicked(MouseEvent e) {
    public void mouseEntered(MouseEvent e) {
    public void mouseExited(MouseEvent e) {
    import java.applet.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class square
    public int x_pos;
    public int y_pos;
    public int sheight;
    public int swidth;
    public int status;
    public square(int x,int y,int h,int w, int s)
    x_pos=x;
    y_pos=y;
    sheight=h;
    swidth=w;
    status=s;
    public boolean isEmpty()
    if (status==0){
    return true; }
    return false;

    it's a good idea to not use [ i ] when posting in the forums, as it is the flag italics. i changed them all to index.
    also, i would not declare index and j until i needed them in the loops. this could cause some slips where you don't expect it. but i'm not fixing that for you.
    and, your constructor wasn't ever being called, so i moved the line
    addMouseListener(this);
    to the init() method.
    import java.applet.*;
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    public class Board extends JApplet implements Runnable, MouseListener {
         private Image offScreenImage;
         private Graphics offscr;
         private Thread t;
         private int boardwidth;
         private int boardheight;
         private int sqx;
         private int sqy;
         private Square[][] board;
         private int sqheight;
         private int sqwidth;
         private int xplayer;
         private int oplayer;
         private int index;
         private int j;
         private int boardi;
         private int boardj;
         public void init(){
              addMouseListener(this);
              board=new Square[2][2];
              sqx=0;
              sqy=0;
              boardwidth=getSize().width;
              boardheight=getSize().height;
              sqwidth=boardwidth/3;
              sqheight=boardheight/3;
              offScreenImage=createImage(boardwidth, boardheight);
              offscr=offScreenImage.getGraphics();
              for (index=0;index<2;index++)     {
                   for (j=0; j<2;j++)          {
                        sqx+=j*sqwidth;
                        sqy+=index*sqheight;
                        board[index][j]= new Square(sqx,sqy,sqheight,sqwidth,0); }
              t= new Thread(this);
              t.start();
         public void paint(Graphics g){
              for (index=0;index<2;index++)     {
                   for (j=0; j<2;j++)          {
                        switch ( board[index][j].status)               {
                             case 0:
                             g.setColor(Color.white);
                             break;
                             case 1:
                             g.setColor(Color.black);
                             break;
                             case 2:
                             g.setColor(Color.red);
                             break;
                   g.fillRect( board[index][j].x_pos, board[index][j].y_pos, sqwidth, sqheight);
         public void update(Graphics g){
              offscr.setColor(getBackground());
              offscr.fillRect(0,0,getSize().width,getSize().height);
              paint(offscr);
              g.drawImage(offScreenImage,0,0,this);
         public boolean validMove(int count1,int count2) {
              if(board[count1][count2].status==0)
                   return true;
              else
                   return true;
         public void getIndex(MouseEvent e ){
              int mousex=e.getX();
              int mousey=e.getY();
              for (index=0;index<2;index++)     {
                   for (j=0; j<2;j++)          {
                        if ((mousex>board[index][j].x_pos) && (mousex< (board[index][j].x_pos+100)))               {
                             if ((mousey>board[index][j].y_pos) && (mousey< (board[index][j].y_pos+100)))          {
                                  boardi=index;
                                  boardj=j;
         public void mouseReleased(MouseEvent e){
              getIndex(e);
              if (validMove(boardi,boardj))     {
                   board[boardi][boardj].status=1;
                   repaint();
         public void run(){
              while (true)     {
                   repaint();
                   try {
                        t.sleep(1000/30);
                   }catch (InterruptedException e) {;}
         public void mousePressed(MouseEvent e) {;}
         public void mouseClicked(MouseEvent e) {;}
         public void mouseEntered(MouseEvent e) {;}
         public void mouseExited(MouseEvent e) {;}
    class Square {
         public int x_pos;
         public int y_pos;
         public int sheight;
         public int swidth;
         public int status;
         public Square(int x,int y,int h,int w, int s)     {
              x_pos=x;
              y_pos=y;
              sheight=h;
              swidth=w;
              status=s;
         public boolean isEmpty()     {
              if (status==0){
                   return true;
              }else{
                   return false;

  • Problems with Applets notinited with SSL

    This is a repost from the java programming area:
    http://forum.java.sun.com/thread.jspa?threadID=5153036
    I have an applet that will not init in the secure area, but works perfectly fine in the public area.
    I'm pretty close to the end of my rope on this one, so if there is anyone that can help me on this I will be extremely grateful.

    which error does IE tell you?

  • Applet Signer Notinited

    I support some users that go onto a secure website and use certificates. They used the java 1.4.1 plugin and all is fine. Now they have a new machine, and the new Java plugin 1.4.2 throws up an error when you hit a button to select the certificate, runtime error line 53 bla bla bla, and at the bottom of the screen it says applet notinited. I don't know how to fix this error. I uninstalled the 1.4.2_07 and used the 1.4.1 and it still doesn't work, am confused, have 10 working machines and this one is causing a problem. I no nothing of Java apart from installing it.

    Sorry I don't know much about Java, how would I go about doing that? The error I get is line 54 char 9 error Object doesn't support this property or method. Here is the page source don't if this helps or not?
    <head>
    <title>Login with a Certificate</title>
    <link rel="stylesheet" href="/ecom/login/stylesheets/hmce.css" type="text/css">
    <link rel="stylesheet" href="/ecom/login/stylesheets/hmceForms.css" type="text/css">
    <script LANGUAGE="JavaScript1.1">
    var intervalId;
    var isAppletLoaded = false;
    var intervalSet = false;
    var isPosted = false;
    function appletIsLoaded()
    isAppletLoaded = true;
    document.data.SignButton.disabled=false;
    function checkStatus()
    if (isAppletLoaded == false)
    return;
    if (document.signer.signComplete())
    clearInterval(intervalId);
    document.post.gatewaydata.value = document.signer.getSignedBase64Xml();
    if (document.signer.getStatus() == 0)
    if (isPosted == false)
    document.post.submit();
    isPosted = true;
    else {
    // do-nothing in this sample.
    function signXML()
    if ((document.signer.signComplete()) && (document.signer.getStatus() == 0))
    return true;
    } else {
    var B64XML = document.data.xml.value;
    var B64UTF8fragment = document.data.xmlsigblock.value;
    document.signer.signXml(B64XML, B64UTF8fragment);
    if (intervalSet == false)
    intervalId = setInterval("checkStatus()", 1000);
    intervalSet = true;
    return false;
    function doSubmit()
    document.frm.submit();
    </script>
    </head>
    <body topmargin="10" bgcolor="#FFFFFF" onLoad="appletIsLoaded()">
    <OBJECT ID="GGSecSign" CLASSID="CLSID:2D9F7B63-EC7C-43FF-A41D-6E9EC984A5B9" CODEBASE="/ecom/login/ggsecsign.cab#version=5,1,7,1"></OBJECT>
    <APPLET CODE="com.govgateway.UKOnLineSigningApplet.class" archive="/ecom/login/XMLSigningApplet.jar.zip" name="signer" width="0" height="0" VIEWASTEXT id="signer">
    <PARAM NAME="profile" value="c:entrustprofiles">
    <PARAM NAME="namespace" value="UKOnLineSigningApplet">
    <PARAM NAME="useslibrary" value="UKOnLineSigningApplet">
    <PARAM NAME="useslibrarycodebase" value="/ecom/login/UKOnLineSigningApplet.cab">
    <PARAM NAME="useslibraryversion" value="5,1,7,1">
    </APPLET>
    <img src="/ecom/login/images/1px.gif" width="1" height="1" border="0">
    <table width="733" border="0" cellspacing="0" cellpadding="0" height="52">
    <tr>
    <td>
    <img src="/ecom/login/images/hmce_logo.jpg" width="733" height="52" border="0" alt="HM Customs and Excise">
    </td>
    </tr>
    </table>
    <br>
    <table width="733" border="0" cellspacing="0" cellpadding="5">
    <tr>
    <td>
    <h1>Login with a Certificate</h1>
    </td>
    </tr>

  • Applet won't load, packet missing data?

    I know this basic question gets asked a lot, but I have debug info!
    Here's the setup:
    - Simple HelloWorld applet on a Slax Linux system, Apache2 server
    - Clients are win 2000 and win 98 machines, IE and Firefox
    html code:
    <html>
    <body>
    <center>
    <h1> Applet Test 6 </h1>
    <applet code="helloapp" width="320" height="320" codebase="."></applet>
    </center>
    </body>
    </html>applet code:
    import javax.swing.JApplet;
    import java.awt.Graphics;
    public class helloapp extends JAppplet
       public void paint(Graphics g)
          g.drawRect(0,0,getSize().width-1,getSize().height-1);
          g.drawString("helllo",5,15);
    }What happens:
    - applet runs fine in appletviewer
    - type in <ipadr>/Hello.html on win PC
    - the html loads, waits for between a few seconds to tens of seconds
    - get applet notinited error
    - on the win 98 machine the Java applet loading logo shows up briefly
    - end up with the dreaded box with 'X'
    - I did get it to work the other day after adding 'classpath="."' to the <applet> code, but that doesn't seem to help now. class and html are in the same directory.
    - I have tried class="helloapp" and class="helloapp.class" in the <applet> code
    Debug info:
    - Java console says helloapp.class not found, and sometimes an EOF error
    - packet sniffer shows (leaving out, ACKs, SYNs) (pc -> linux) :
    -> request fro html
    <- html code delivered
    -> request for helloapp.class
    <- deliver helloapp.class (SEE NOTE BELOW)
    -> rerequest helloapp.class
    <- redeliver (SEE NOTE)
    -> finally sends RST flag
    NOTE: these packet looks right except I don't see any data. It's 372 bytes long but it says it has a content of 532 bytes of data:
    IP Header
    Version:     4
    Length:      5 (20 bytes)
    Type of Service:      0x00
    Precedence     Routine
    Minimize Delay     0
    Maximize Throughput     0
    Maximize Reliability     0
    Minimize Monetary cost     0
    Total Length:      372 bytes
    Identification:      10825
    Flags:      0x0
    Don't fragment:      0
    More fragments:      0
    Fragment Offset:      0
    Time-to-live:      64
    Protocol:      0x06 ( tcp )
    Checksum:      0x8aad
    Sender IP Address:      192.168.1.159
    Dest IP Address:      192.168.1.158
    TCP Header
    Source Port:      80 ( http )
    Destination Port:      2600
    Sequence no.:      2549656002
    Acknowledge no.:      1126345872
    Length:      20 bytes
    Flags:      ACK + PSH
    Window Size:      6432
    Checksum:      0x7876
    Urgent Pointer:      0
    0000 ...v.".....e..E.
    0010 .t*I@.@.........
    0020 ...P.(....C"..P.
    0030 ..xv..HTTP/1.1.2
    0040 00.OK..Date:.Thu
    0050 ,.25.Oct.2007.10
    0060 :16:04.GMT..Serv
    0070 er:.Apache/2.2.4
    0080 .(Unix).mod_ssl/
    0090 2.2.4.OpenSSL/0.
    00A0 9.8b.DAV/2..Last
    00B0 -Modified:.Thu,.
    00C0 25.Oct.2007.09:5
    00D0 8:21.GMT..ETag:.
    00E0 "220c-214-462de9
    00F0 40"..Accept-Rang
    0100 es:.bytes..Conte
    0110 nt-Length:.532..
    0120 Keep-Alive:.time
    0130 out=5,.max=100..
    0140 Connection:.Keep
    0150 -Alive..Content-
    0160 Type:.applicatio
    0170 n/octet-stream..
    0180 ..
    Questions:
    - Am I right in not seeing data (the applet code) in the packet above - it should be there right?
    - Could something in the Apache configuration prevent it from sending the applet data? I did set the permissions in the configuration file.
    - Any other way to debug this?
    - The fact it worked the other day and not now is perplexing. The linux I am running is a live version, so I have to reconfigure each time I start it. I have to think the problem is there as that is the only thing that has changed since the other day....

    Here's a partial answer. I found that if the data load in the packet was over 256 bytes, it would fail. I a able to create an empty applet of 192 bytes that would load. I figured out the 256 byte number using wget and some text files. So I guess it's not an applet problem, but maybe an Apache problem.
    Edited by: slash2 on Oct 25, 2007 1:17 PM

  • JVM 1.4 and applet issue

    Hi,
    I'm new to Java so hopefully you'll be able to clear something up for me. I have had a look round, but am struggling due to my lack of Java knowledge.
    I have an application which passes an applet to IE. The connection is over https. With anything else other than 1.4 JVM installed, its fine, but with 1.4 I see "applet notinited" followed by "load failed".
    Both the server and client use certificates and I've been told this won't work with client certs - not sure why, so the first question...is there a bug in 1.4 related to the use of client certs?
    Here is a cut of the console log....
    lots of...loaded certificates messages (no errors/warnings)
    then....
    a connecting to the site message (no errors/warnings)
    then...
    sun.plugin.cache.DownloadException
         at sun.plugin.cache.CachedFileLoader.load(Unknown Source)
         at sun.plugin.cache.FileCache.get(Unknown Source)
         at sun.net.www.protocol.https.PluginDelegateHttpsURLConnection.connectWithCache(Unknown Source)
         at sun.net.www.protocol.https.PluginDelegateHttpsURLConnection.connect(Unknown Source)
         at sun.net.www.protocol.https.PluginDelegateHttpsURLConnection.getInputStream(Unknown Source)
         at java.net.HttpURLConnection.getResponseCode(Unknown Source)
         at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(Unknown Source)
         at sun.applet.AppletClassLoader.getBytes(Unknown Source)
         at sun.applet.AppletClassLoader.access$100(Unknown Source)
         at sun.applet.AppletClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadCode(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    lots of...loaded certificates messages (no errors/warnings)
    then....
    a connecting to the site message (no errors/warnings)
    then...
    load: class com.fred.fred.fred not found.
    java.lang.ClassNotFoundException: com.fred.fred.fred
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadCode(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.io.IOException: open HTTP connection failed.
         at sun.applet.AppletClassLoader.getBytes(Unknown Source)
         at sun.applet.AppletClassLoader.access$100(Unknown Source)
         at sun.applet.AppletClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         ... 10 more
    Exception: java.lang.ClassNotFoundException: com.fred.fred.fred
    Now, without client certificates I also have issues....so, the second question - is there something here which is not client certificate related, and although I would never speculate....https related for example?
    Thank you very much for any help

    Hi,
    Listen, Sun doesn't know exactly what they are doing.
    I installed the JDK 1.4.x on my machine b/c I need to
    run this program for my Advanced Databases course. I
    didn't install the JDK by choice. Now when I goto a
    website that has a Java applet on it, IT DOESN'T
    WORK!!!! It worked FINE with the JVM that Microsoft
    provided in Windows XP! Further, Sun DOESN'T FOLLOW
    the "Set Program Access and Defaults" in Windows XP
    SP1!!! I change the default JVM to the Microsoft JVM,
    reload IE, and then on the webpage it persists to use
    the Sun JVM!
    THANK YOU SUN FOR SCREWING WITH MY MACHINE! Have you got JRE1.4.x installed for the IE you are using.Download the java plug in for the browser and install it...
    Regards
    Vicky

  • Deploying an Applet Tutorial

    Hi,
    I followed the instructions for the creating an applet and deploying it tutorial in JDEV 3.1.1.2. The applet works in the IDE but when I try to run it from the browser, IE just hangs and Netscape 4.7 gives a "Data Applet notinited" message.
    In the example, the tutorial was ambiguous about whether the profile name should be different from the name of the profile for the application module since the default name in both cases was Profile.prf. I made the names different.
    Is there something that I have to change in the html file?
    Thanks in advance.
    Peter

    a file named swingall.jar is there in
    jd jfc\lib directory.copy that file to
    your applet html folder and add a proper
    plug-in it will work.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Peter H():
    Hi,
    I followed the instructions for the creating an applet and deploying it tutorial in JDEV 3.1.1.2. The applet works in the IDE but when I try to run it from the browser, IE just hangs and Netscape 4.7 gives a "Data Applet notinited" message.
    In the example, the tutorial was ambiguous about whether the profile name should be different from the name of the profile for the application module since the default name in both cases was Profile.prf. I made the names different.
    Is there something that I have to change in the html file?
    Thanks in advance.
    Peter<HR></BLOCKQUOTE>
    null

  • Applets just stopped working

    Java Applets just stopped working on my machine the other day. They now persistently give me a "Failed to Load" message that says "Applet notinited" in it.
    I've tried rolling back my machine before Tuesday's Windows Update, but it was VML-related, and probably not the cause of this (plus, the rollback probably would have fixed it if it were the cause). I also tried many different version of the JRE, and removed previous ones entirely before getting new ones. I've tried everything from the latest to older ones, and no luck.
    I searched for this error, and Sun points you to proxy settings. Since I have no proxy, and since only my laptop, and not my wife's behind the same router, is affected, I know it can't be that.
    Does anyone have any other clues? It's really annoying. And it seems to have happened completely out of the blue. I just can't use Applets any more. I changed no settings and messed with nothing. I'd hate to have to reinstall Windows just to fix Java.

    Hi, are you running a macmini Intel?
    Launch the Console app [ Applications/Utilities/Utilities folder] do you have any message there regarding Java, and what are they if any?
    I presume you have the latest Java updates, and have run your Software update to check?
    Do you have these showing in the Safari menu bar under Help>Installed plug ins:
    Java Plug-in for Cocoa
    Java 1.4.2_09 Plug-in (Cocoa) — from file “JavaPluginCocoa.bundle”.
    -------MIME------------Type Description--------Extensions
    Java Web Start Applications------application/x-java-jnlp-file---jnlp
    application/x-java-applet-------Basic Java Applets-----------javaapplet
    Did you recently update Java? see this from Apple.
    document
    IThank you!! The test account works. Now how to I fix my name account so it works, too?
    You are welcome; ) If that doesn't help any...since this is user name account specific problem ONLY,as the test account indicates, see if the advice from Hayne his is post count 7 helps you any. I think it is worth the effort, you may also.
    What does this Test tell you.
    Does this work work for you showing a wavy? moving line of text
    I don't know if any of this will help, I hope so. Good luck!
    Happy Holidays to all here!
    Eme'~[)
    p.s. Spindoctor sorry for your Java problems.
    create a new user account and all apps,
    No not new apps, just to see is the problem is system wide; )

Maybe you are looking for