ClassNotFoundException in applet-urgent

Hai
I am having an applet "tstapplet" whose class file is stored in a jar file and the applet is inside a package named test.
I wrote the following applet tag
<applet code="tstapplet.class" archive="../deploy/showj.jar">
</applet>
I am getting ClassNotFoundException ; tstapplet.class
What should I do Is the applet code wrong
Plz help urgent
tintuthilak

<applet code="test.tstapplet" archive="../deploy/showj.jar">
</applet>
Try to open it with Firefox or Mozilla (you can be sure MSJVM does not try to open
the applet).
When it works convert the html page with [jdk.home]\bin\htmlconverter.exe

Similar Messages

  • DOM parsing In Applet (URgent)

    Is it possible to implement DOM parsing in Applet?
    I am getting classnotfoundException .
    I am giving the code below. pl read the code.
    Applet.(parserapplet.java)
    =========================
    import java.io.*;
    import java.awt.*;
    import java.net.*;
    import java.util.*;
    import java.applet.*;
    import com.security.*;
    // for DOM parsing ....
    import javax.xml.parsers.*;
    import org.xml.sax.*;
    import org.w3c.dom.Document;
    import org.w3c.dom.DOMException;
    public class parserapplet extends Applet
    public void init()
    public void start()
    try
    if (Class.forName("com.ms.security.PolicyEngine") != null)
    {  // required for IE
         PolicyEngine.assertPermission( PermissionID.SYSTEM );
    catch (Throwable cnfe)
         System.out.println("Policy Engine Exception: " + cnfe);
    try
         String str = "<?xml
    version=\"1.0\"?><html><body></body></html>";
         ByteArrayInputStream bis = new
    ByteArrayInputStream(str.getBytes());
         System.out.println("After creating input stream");
         BufferedInputStream bufIn     = new BufferedInputStream(new
    DataInputStream(bis));
         parseXMLMessage     (bufIn);
    catch(Exception e){}
    // Actual DOM parsing goes here.....
    public void parseXMLMessage(InputStream xmlMessage)
    Document document      = null;
         DocumentBuilder documentBuilder           = null;
         DocumentBuilderFactory documentBuilderFactory     = null;
         try
         documentBuilderFactory = DocumentBuilderFactory.newInstance();
         documentBuilder     = documentBuilderFactory.newDocumentBuilder();
         document     = documentBuilder.parse(xmlMessage);
         System.out.println("Document node: " + document);
         catch(FactoryConfigurationError fce)
         System.out.println("Exception Factory configuration error " + fce);
         catch(ParserConfigurationException pce)
         System.out.println("Exception Parser configuration Exception " pce);
         catch(SAXException saxe)
         System.out.println("Exception SAX error " + saxe);
         catch(Exception e)
         System.out.println("Exception " + e);
    Html code:
    =========
    <html>
    <body>
    <APPLET code="parserapplet.class" archive = "xalan.jar" width=0
    height=0
    MAYSCRIPT>
    <param name=cabbase value=MyApplet.cab>
    </APPLET>
    </body>
    </html>
    I have signed the Applet using signcode utility and i have put the
    parserapplet.class in the MyApplet cab file and signed it. On invoking
    the html file, it request for permission, and after clicking yes, the
    applet loads.Fine.
    No problem upto this stage.
    But after loading of the applet the following exception is thrown in
    Javaconsole.
    Exception:
    =========
    com.ms.security.SecurityExceptionEx[Host]: cannot access file
    C:\WINNT\Java\lib\jaxp.properties
    at com/ms/security/permissions/FileIOPermission.check
    at com/ms/security/PolicyEngine.deepCheck
    at com/ms/security/PolicyEngine.checkPermission
    at com/ms/security/StandardSecurityManager.chk
    at com/ms/security/StandardSecurityManager.checkRead
    at java/io/File.exists
    at javax/xml/parsers/DocumentBuilderFactory.findFactory
    at javax/xml/parsers/DocumentBuilderFactory.newInstance
    at parserapplet.parseXMLMessage
    at parserapplet.init
    at com/ms/applet/AppletPanel.securedCall0
    at com/ms/applet/AppletPanel.securedCall
    at com/ms/applet/AppletPanel.processSentEvent
    at com/ms/applet/AppletPanel.processSentEvent
    at com/ms/applet/AppletPanel.run
    at java/lang/Thread.run
    javax.xml.parsers.FactoryConfigurationError:
    java.lang.ClassNotFoundException:
    org/apache/crimson/jaxp/DocumentBuilderFactoryImpl
    at javax/xml/parsers/DocumentBuilderFactory.newInstance
    at parserapplet.parseXMLMessage
    at parserapplet.init
    at com/ms/applet/AppletPanel.securedCall0
    at com/ms/applet/AppletPanel.securedCall
    at com/ms/applet/AppletPanel.processSentEvent
    at com/ms/applet/AppletPanel.processSentEvent
    at com/ms/applet/AppletPanel.run
    at java/lang/Thread.run
    I dont know which .jar file to archive (i tried xalan,crimson, jaxp
    but which of no use). I was surprised why the security Exception is
    thrown , when parsing.
    I have not accessed the System files!( but it searches for
    jaxp.properties file!). I think the jar file is not downloaded. How to
    verify that it is downloaded in applet?
    The above code is only for sample.
    If anybody who knows how to correct it please mail me at:
    "[email protected]" with corrected code. I want this very
    urgently.
    Help meeeeeeeeeeeeeeeeeeee!!!!!
    Prasanna.

    Have you found the answer to this problem? I am having a similar problem when running the parser in an ActiveX Bean.
    THanks

  • ClassNotFoundException in Applets

    I get a ClassNotFoundException when displaying a web page with an Applet on it. It's a general problem with every site on the Internet, it does work when I use an Applet locally. I have the jdk1.4 plug-in installed and I'm using IE 5.5(SP2) on W2K in a network environment in my company. Any idea if that is a configuration/installation problem or has something to do with network/firewall?

    But why!?!?!
    I've noticed this as well, but would actually like to start using the Sun VM for applets in IE. Has anyone heard if this is an official bug? Is Sun going to fix this?!?

  • Getting ClassNotFoundException in Applet by using JDK1.6_20

    In my web application, we are using an applet which gets invoked from the jsp.
    Its working fine with jdk1.5 and 1.4 but when I am executing it on machine having JDK1.6_20 its throwing ClassNotFoundException. (Please see the log below)
    I cleared the cache and history but still getting this issue.
    I tried by switching off to Next Generation Java Plugin but still its not working.
    load: class com.idautomation.linear.BCApplet not found.
    java.lang.ClassNotFoundException: com.idautomation.linear.BCApplet
         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)
    Please provide the solution of it.

    am_mehra wrote:
    Hi,
    In my jsp, we have used the following lines to show an apple.
    <applet name="myApplet" width="390" height="105" align="Baseline">
    <param name="code" value="com.idautomation.linear.BCApplet">
    <param name="archive" value="LinearBarCode.jar">
    <param name="name" value="BarCodeApplet">
    <param name = "BARCODE" value = "<%= boOrderReturn.getString("return_no")%>">
    <param name = "CODE_TYPE" value = "CODE128">
    <param name = "BAR_HEIGHT" value = "2">
    <param name = "LEFT_MARGIN" value = "0">
    <param name = "TEXT_FONT" value = "ARIAL|BOLD|11">
    <param name="scriptable" value="true">
    </applet>Looking at this in code tags, which makes things more clear, suggests various problems to me..
    <applet name="myApplet" width="390" height="105" align="Baseline">
    <param name="code" value="com.idautomation.linear.BCApplet">
    <param name="archive" value="LinearBarCode.jar">
    <param name="name" value="BarCodeApplet">
    <param name = "BARCODE" value = "<%= boOrderReturn.getString("return_no")%>">
    <param name = "CODE_TYPE" value = "CODE128">
    <param name = "BAR_HEIGHT" value = "2">
    <param name = "LEFT_MARGIN" value = "0">
    <param name = "TEXT_FONT" value = "ARIAL|BOLD|11">
    <param name="scriptable" value="true">
    </applet>1) [Values for align|http://www.w3.org/TR/REC-html40/struct/objects.html#adef-align-IMG] can be bottom|middle|top|left|right. Note that none of those is 'Baseline'. You cannot just 'make up' HTML and expect it to work.
    2) The code and archive attributes should be in the applet opening element, not specified as params.
    3) Does that applet truly accept a 'name' param?
    4) The barcode param value looks suspiciously like it it is malformed.
    Fixing those things (barring point 4, but also removing the redundant spaces in the param elements) might result in something like..
    <applet
         name="myApplet"
         code="com.idautomation.linear.BCApplet"
         archive="LinearBarCode.jar"
         width="390"
         height="105"
         align="bottom">
    <param name="name" value="BarCodeApplet">
    <param name="BARCODE" value='<%= boOrderReturn.getString("return_no")%>'>
    <param name="CODE_TYPE" value="CODE128">
    <param name="BAR_HEIGHT" value="2">
    <param name="LEFT_MARGIN" value="0">
    <param name="TEXT_FONT" value="ARIAL|BOLD|11">
    <param name="scriptable" value="true">
    </applet>
    The above code is working in JDK1.4 and 1.5 but throwing classnotfoundexception.Did you mean ClasNotFoundException? If so, then please use the correct capitals, so there is no confusion. This is even more important on an international technical forum.
    I am not clear with the response "Change line 114, column 28 of the source from a '.' to a ','. All the problems should be gone." , kindly explain where I need to change this.That was commonly known as sarcasm. It meant I cannot fix code that I cannot see. That is why I requested you post the SSCCE (please read the link).
    It's an internal application not publicly available.OK - understood.

  • ClassNotFoundException in applet

    Hi,
    I have a class which contains:
    "Class.forName("oracle.jdbc.driver.OracleDriver");"
    If I run it using java myclass, everything is fine and
    the application gives a result set from Oracle.
    If I run it under applet, I got "ClassNotFoundException"
    error.
    Anyone can give a help?
    Thanks,

    What do you use to run the applet? Not the jdk's appletviewer, I suspect?

  • ClassNotFoundException: Jar - Applet - WebServer ?

    I'm running an applet (IE 5.0 whith plug-in) from a web server (MIIS). The applet uses some other classes. If I put the html page, the applet and the other classes in the same directory, everything works fine.
    If, instead of it, I put in that directory the html page, the applet (*.class) and a jar file containing the classes the applet need, I get the ClassNotFoundException. What is wrong with this?
    Can anybody help? I have read a lot of messages from this forum, looking for a similar problem, but nobody seems to have it.
    Thank you in advance.
    [email protected]

    Placing your class files in a jar is nice for speeding up the download process, but you don't necessarily have to have them in the same jar. You have a couple of options at your disposal.
    1. Use the html archive tag to specify multiple jars. There is nothing wrong with the specifing multiple jars in the archive value - just seperate them with commas.
    ex. archive="one.jar, two.jar, images/three.jar"
    2. Use the download extension mechanism. Place your classes in a jar, and create a custom manifest for that jar specifing a Class-Path attribute that refers to another (or multiple) jar file(s).
    ex. Class-Path: one.jar, two.jar, images/three.jar
    When specifing the additional files, in most cases use relative paths. When this is not possible, an absolute URL may also be used (but with some care - it's not obvious in some cases).
    Be warned though, that trying to traverse up a directory tree (by using "..") can lead to a security exception in some browsers, so try to plan ahead and not do this.
    Hope this helps,
    -Ron

  • Display DB SQL in APPLET (Urgent)

    Hi,
    I want de learn about How to display a Table in MS-SQL 7.0 in Applet.
    Can you please give me web resources, where I can found informations.
    Thanks in advance.
    Sam

    something like this for Access?
    http://www.geocities.com/rmlchan/dba.html

  • How to show a html page in a swing applet -- URGENT!!!

    Hi All,
    I'm trying to show a html page inside a swing applet... is it possible to do that?? if so is there any built-in classes available for that?? If anyone have some examples, plz help me with that....
    Thanks,
    Ragu

    i havent tested.. but this should work. i am no expert on these either, just to give you an example.. :-)
    JEditorPane ePane = new JEditorPane();
    HTMLEditorKit html = new HTMLEditorKit();
    ePane.setEditorKit(html);
    HTMLDocument htmld = new HTMLDocument();
    try{
    URL url = new URL("http://hcs.harvard.edu/~undercon/");
    InputStream ins = url.openStream();
    ePane.setDocument(htmld);
    html.read(ins,htmld, 0);
    this.getContentPane().add(new JScrollPane(ePane),BorderLayout.CENTER);
    catch(Exception e)
    e.printStackTrace();
    }

  • Applet Urgent Help Plz

    Hello Everyone, im having a major problem with this applet.I am trying to create a Black Jack card game to play around.It is compiling with no errors however the applet doesnt seem to get initialised thus it is not possible to be viewed in the applet viewer. What im trying to achieve is being able to draw 2 cards in the deck. Ever since i tried to use the showBlackjackScore() method as well as the init()method things started to get serious.These methods implementations were taken from: http://nifty.stanford.edu/2004/EstellCardGame/code.html were the Card, Deck, Hand, Rank, and Suit classes are also implemented, and are used with this program. Would appreciate any help! Other than that, the Gui is of my own and is a really nice example for ideas in your future java programs.Thanks in Advance!
    import javax.swing.*;     
    import java.awt.*;     
    import java.awt.event.*;
    import javax.swing.border.*;
    import java.util.*;
    public class BlackJackClient extends JApplet
         private Deck cardDeck;
        private BlackjackHand myHand;
        private final int SIZE_OF_HAND = 2;
        private final String directory = "cards/";
            private JLabel[] handLbl = new JLabel[ SIZE_OF_HAND ];
         private Container container;
         private JPanel panel1,panel2,Flow,Opponent,Player;
         private JPanel cardsTop,cardsBottom;
         private JLabel Player_Status;
         private JLabel top_card1,top_card2,top_card3,top_card4,top_card5;
         private JLabel bottom_card1,bottom_card2,bottom_card3,bottom_card4,bottom_card5;
         private TitledBorder opponent,player;
         private TitledBorder Cr1,Cr2,Cr3,Cr4,Cr5;
         private TitledBorder B1,B2,B3,B4,B5;
         private JPanel box1,box2,box3,box4,box5,box6,box7,box8,box9,box10;
         private JTextArea Messages;
         private JButton Hit,Stand,JButton1;
         private JLabel scoreLbl;
        public BlackJackClient()//CONSTRUCTOR
             container=getContentPane();
             container.setLayout(new BoxLayout(container,BoxLayout.Y_AXIS));
             scoreLbl.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
              scoreLbl.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
              getContentPane().add(scoreLbl);
              scoreLbl.setForeground(java.awt.Color.black);
              scoreLbl.setFont(new Font("Dialog", Font.BOLD, 64));
              scoreLbl.setBounds(252,48,103,88); 
             //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++PANELS
             JPanel p = new JPanel();
              p.setLayout(new BoxLayout(p, BoxLayout.X_AXIS));
              Opponent=new JPanel();
             Player=new JPanel();
             cardsTop=new JPanel(new FlowLayout(FlowLayout.CENTER,10,15));
             cardsBottom=new JPanel(new FlowLayout(FlowLayout.CENTER,10,15));
             panel1=new JPanel();          
             panel2=new JPanel();     
             box1=new JPanel();
             box2=new JPanel();
             box3=new JPanel();
             box4=new JPanel();
             box5=new JPanel();
             box6=new JPanel();
             box7=new JPanel();
             box8=new JPanel();
             box9=new JPanel();
             box10=new JPanel(); 
             Flow=new JPanel(new FlowLayout(FlowLayout.RIGHT,3,0));
              //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
              JLabel label=new JLabel("Welcome To BlackJack 21",SwingConstants.CENTER);
              label.setForeground(Color.white);
              label.setFont(new Font("Futura",Font.BOLD,19));
              panel1.add(label);
              panel1.setBackground(Color.black);
             Icon card1=new ImageIcon("Trapula/c1.png");
             top_card1=new JLabel(card1);
             Icon card2=new ImageIcon("Trapula/d1.png");
             top_card2=new JLabel(card2);
             Icon card3=new ImageIcon("Trapula/h1.png");
             top_card3=new JLabel(card3);
             Icon card4=new ImageIcon("Trapula/s1.png");
             top_card4=new JLabel(card4);
             Icon card5=new ImageIcon("Trapula/ck.png");
             top_card5=new JLabel(card5);
             box1.add(top_card1);
             cardsTop.add(box1);
             box2.add(top_card2);
             cardsTop.add(box2);
             box3.add(top_card3);
             cardsTop.add(box3);
             box4.add(top_card4);
             cardsTop.add(box4);
             box5.add(top_card5);
             cardsTop.add(box5);
                Cr1 = new TitledBorder(new LineBorder(Color.black,2), "");
                 box1.setBorder(Cr1);
                 box1.setBackground(Color.gray);
             Cr2 = new TitledBorder(new LineBorder(Color.black,2), "");
                 box2.setBorder(Cr2);
                 box2.setBackground(Color.gray);
                 Cr3 = new TitledBorder(new LineBorder(Color.black,2), "");
                 box3.setBorder(Cr3);
                 box3.setBackground(Color.gray);
                 Cr4 = new TitledBorder(new LineBorder(Color.black,2), "");
                 box4.setBorder(Cr4);
                 box4.setBackground(Color.gray);
                 Cr5 = new TitledBorder(new LineBorder(Color.black,2), "");
                 box5.setBorder(Cr5);
                 box5.setBackground(Color.gray);
                 opponent=new TitledBorder(new LineBorder(Color.black,5),"Opponent");
                 Opponent.setBorder(opponent);
                 Opponent.add(cardsTop);
                 Opponent.setBackground(Color.green);
             cardsTop.setBackground(Color.green); 
             //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                 Icon card6=new ImageIcon("Trapula/s4.png");
                bottom_card1=new JLabel(card6);
                 Icon card7=new ImageIcon("Trapula/s5.png");
                 bottom_card2=new JLabel(card7);
                 Icon card8=new ImageIcon("Trapula/s6.png");
                 bottom_card3=new JLabel(card8);
                 Icon card9=new ImageIcon("Trapula/s7.png");
                 bottom_card4=new JLabel(card9);
                 Icon card10=new ImageIcon("Trapula/s8.png");
                 bottom_card5=new JLabel(card10);
                 box6.add(bottom_card1);
             cardsBottom.add(box6);
             box7.add(bottom_card2);
             cardsBottom.add(box7);
             box8.add(bottom_card3);
             cardsBottom.add(box8);
             box9.add(bottom_card4);
             cardsBottom.add(box9);
             box10.add(bottom_card5);
             cardsBottom.add(box10);
                 B1=new TitledBorder(new LineBorder(Color.black,2), "");
                 box6.setBorder(B1);
                 box6.setBackground(Color.gray);
                 B2=new TitledBorder(new LineBorder(Color.black,2), "");
                 box7.setBorder(B2);
                 box7.setBackground(Color.gray);
                 B3=new TitledBorder(new LineBorder(Color.black,2), "");
                 box8.setBorder(B3);
                 box8.setBackground(Color.gray);
                 B4=new TitledBorder(new LineBorder(Color.black,2), "");
                 box9.setBorder(B4);
                 box9.setBackground(Color.gray);
                 B5=new TitledBorder(new LineBorder(Color.black,2), "");
                 box10.setBorder(B5);
                 box10.setBackground(Color.gray);
                 player=new TitledBorder(new LineBorder(Color.black,5),"Player");
                 player.setTitleColor(Color.black);
                 Player.setBorder(player);
                 JPanel Hand=new JPanel();
             JButton1=new JButton("Draw Hand");
                 JButton1.setActionCommand("Draw a Hand");
                 JButton1.addActionListener(new ActionListener()
                 {     public void actionPerformed(ActionEvent e)
                      {     Object object=e.getSource();
                                if(e.getSource()==object)
                                {     cardDeck.restoreDeck();
                                  cardDeck.shuffle();
                                  myHand.discardHand();
                                       for ( int i = 0; i < SIZE_OF_HAND; i++ )
                                       {   Card c = cardDeck.dealCard();
                                               myHand.addCard( c );
                                               handLbl.setIcon( c.getCardImage() );
                                            handLbl[i].setText( c.toString() );
                        showBlackjackScore();
         Hand.add(JButton1);
         Hand.setBackground(Color.green);
         cardsBottom.setBackground(Color.green);
         Player.setBackground(Color.green);
         Player.add(cardsBottom);
         //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
         Messages=new JTextArea("----------------------------------------------------Messages-------------------------------------------------\n\n\n",10,42);
         JScrollPane scroller=new JScrollPane(Messages);
         Messages.setEditable(false);
         Messages.setForeground(Color.white);
         Messages.setBackground(Color.gray);
         panel2.setBackground(Color.green);
         panel2.add(scroller);
         //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
         JButton Exit=new JButton("Exit");
         Exit.setToolTipText("Disconnect");
         Hit=new JButton("Hit");
         Hit.setToolTipText("Ask another card?");
         Stand=new JButton("Stand");
         Stand.setToolTipText("Satisfied with your card/s?");
         JLabel l1=new JLabel(" ");
         JLabel l2=new JLabel(" ");
         JLabel l3=new JLabel(" ");
         JLabel l4=new JLabel(" ");
         JLabel l5=new JLabel(" ");
         Exit.addActionListener(new ActionListener()
                   {public void actionPerformed(ActionEvent e)
                        {System.out.println("Disconnected from BlackJack Thank you for Gambling!");
                         System.exit(0);
         Hit.addActionListener(new ActionListener()
                   {public void actionPerformed(ActionEvent e)
                        {Messages.append("Hit Me!!\n");}
         Stand.addActionListener(new ActionListener()
                   {public void actionPerformed(ActionEvent e)
                        {Messages.append("Stand\n");}
         Flow.add(l1);
         Flow.add(l2);
         Flow.add(l3);
         Flow.add(l4);
         Flow.add(l5);
         Flow.add(Exit);
         Flow.add(Hit);
         Flow.add(Stand);          
         Flow.setBackground(Color.green);
         p.add(Flow);
         //++++++++++++++++++++++++++++++++++++++++++++++++++++
         container.add(panel1);
         container.add(Opponent);
         container.add(Player);
         container.add(Hand);
         container.add(panel2);
         container.add(p);
    }//end of Black Jack client constructor
         public void init()
         {     cardDeck = new Deck();
                   Iterator suitIterator = Suit.VALUES.iterator();
                        while ( suitIterator.hasNext() )
                        {   Suit suit = (Suit) suitIterator.next();
                        Iterator rankIterator = Rank.VALUES.iterator();
                             while ( rankIterator.hasNext() )
                                  {     Rank rank = (Rank) rankIterator.next();
                                  String imageFile = directory + Card.getFilename( suit, rank );
                             ImageIcon cardImage = new ImageIcon( getImage( getCodeBase(), imageFile ) );
                             Card card = new Card( suit, rank, cardImage );
                             cardDeck.addCard( card );
         }//end of init      
    private void showBlackjackScore()
         int score = myHand.evaluateHand();
              if( score == 21 )
              {     scoreLbl.setText( score + "!" );
              scoreLbl.setForeground( Color.red );
              else
              {     scoreLbl.setText( "" + score );
              scoreLbl.setForeground( Color.black );
              }//end of showBlackjackScore      
    }//end of class Black Jack client

    I might be wrong, but maybe the init() method isn't showing any GUI because you're not creating or adding any components there.
    Rather than putting all the Swing code in your constructor, put it in a method that returns your top-level component, such as:
    private Component createComponents() {
            // blah
    }Then, in your init() method, try something like:
         public void init() {
              try {
                   SwingUtilities.invokeLater(new Runnable() {
                        public void run() {
                             createComponents();
              catch (Exception e) {
                   System.err.println("Applet could not be created succesfully");
                   e.printStackTrace();
         }Do you get any error messages with your current program?
    Message was edited by:
    Djaunl

  • JDBC in applet URGENT

    Hi,
    I have created an application by using JDBC,now i would like to convert this application into applet and put it online. So i register a domain name, create a jar file for this application and use browser to load it. But so far from what i know, online features have to be done by using JSP,so is it possible to use JDBC to connect to database and do functions online?If not,it means i have to replace JDBC by JSP?
    Thanks for any help.

    Hi
    Please make note of some points:
    1. You can very well create your application as an Applet and then connect to a database through JDBC.
    2. If you think you can make use of the server resources properly you can go ahead with your applet. Otherwise you can switch to JSP, but you may not get any useful resources like Swing, JFC and other stuff through plain jsp, for all these you need an applet as a container for these.
    The problems you are facing is because applets are not secure, you need to sign your applet so as to make use of the system resources available and the applet to interact with your client machines. when you create your jar file you have to sign it using the jarsigner bound to a security certificate installed. Through java you can create your own self signed certificate with the keytool option available in your jdk. Then you have to use the HTMLConverter and pass the HTML file containing the applet tags pointing to your class file, this will convert the applet into browser readable format. Then you are all set, open the applet through your browser and <b>BINGO</b> you are up and moving.
    If you have any more doubts please feel free to ask me.
    Thanks
    Swaraj

  • Images in applet URGENT!!

    Hi. how do i display an image on an applet or a frame without using swing? Any code sample will help. Thanx
    -Raam

    try adding an icon to a Label

  • List in Applet URGENT

    In Java applet how do I set the size for a list.

    <applet code="test.tstapplet" archive="../deploy/showj.jar">
    </applet>
    Try to open it with Firefox or Mozilla (you can be sure MSJVM does not try to open
    the applet).
    When it works convert the html page with [jdk.home]\bin\htmlconverter.exe

  • Font problem in Applet (Urgent)

    Hi all,
    i m using a font to render the japneese character in an applet.and i m doing some text manipulations with that.and the font is TrueType font.Now if the client has that font file it renders with the japneese text.it is fine.but when the client system doesnt have the font file installed it still gives the font object(i think it is default font object supported by the JRE) which is not of TrueType.so my text manipulations behaving wrongly which i dont want to happen.If i able to find the font object returned is of TrueType or not then i can resolve this issue.
    So anybody can help me,is there any method (or anyother way to achieve it) to find whether the created font object is of TrueType or not.i have seen the Font class and its related api ,i couldnt found such method.SO can anyone help in this regard.it will be greatfull.
    thanx
    prakash

    However, if you upload the font onto your server, there is a way
    that you can use that font file, rather than relying on your user's fonts. but can any one tell me about the way to use the font file from the server , rather than relaying on the user's fonts??
    Rana.

  • Netscape.javascript.JSObject without applets - Urgent!

    Hi,
    I need to evaluate some Javascript expressions inside my java code... BUT my code is not inside an Applet class. Does anyone know how to do it?
    I chose to use the netscape.javascript package, it work well inside an applet.. but my application doesn't run inside an applet. When I try to run it inside a standalone application it fails (even if the application extends from the Applet class).
    Here is part of the code:
    public class Applet1 extends Applet {
    public void init() {
    try {
    String out;
    JSObject win = JSObject.getWindow(this);
    out=win.eval("2+3;").toString();
    jLabel1.setText(out);
    System.out.print(out);
    public static void main(String[] args){
    Applet1 app=new Applet1();
    app.init();
    The code runs perfect inside Internet explorer, but it crashes when running in standalone mode.
    Thanks.

    I need to evaluate some Javascript expressions inside
    my java code... BUT my code is not inside an Applet
    class. Does anyone know how to do it?Haven't actually used it, but Mozilla has the Rhino JavaScript interpreter:
    http://www.mozilla.org/rhino/
    Also you could Google for FESI, which is an ECMAScript interpreter (basicly an early version of JavaScript that went through the standards process).

  • JDBC & Applets(urgent)

    Hi,
    On my pc i have installed only JDK 1.1.6. Do i need to install some more plugins for my JDBC connection to work on my applet?Do i need to have the SDK?
    Please reply

    JDBC connection to work on my applet?How are you running the applet? How do you intend to run the applet?
    If you are running in the AppletViewer then you have everything you need.
    An applet to jdbc connection should never be used over the internet regardless of the connection type used. So if that is your intent I suggest you re-think the design.
    Running 1.1.6 jdbc in a browser is significantly different than for 1.2. I am not sure what needs to be done. Either it is very easy or you need to write your own Security Manager.

Maybe you are looking for