Debug an Applet ? How ?

I probably cant see the wood for the trees, but no mater how hard I try, I cannot debug an applet class. Whenever I right-click and run I get
init:
deps-jar:
compile-single:
run-applet:
Warning: <param name=... value=...> tag requires name attribute.
Warning: <param name=... value=...> tag requires name attribute.
Warning: <param name=... value=...> tag requires name attribute.
Warning: <param name=... value=...> tag requires name attribute.
BUILD SUCCESSFUL (total time: 0 seconds)
I have followed the help guide and have the html file in the src directory. I can run the html file ok in a normal browser. but for the life of me I cannot see where or how to either attach the debugger to the applet process, or even run it and hit a breakpoint.
I canot run it like a normal application as there is no "Main Class" and trying to set that up is a nightmare in itself. I have only just started using the IDE and although it has similarities with .NET (hope thats not a bad word here) it does seem to be a lot more complex when youre trying to recall everything you forgot from years ago.
Can anyone explain is an easy straight foward basic language what I need to do ? I find the help files assume that one already has a vast amount of background. The learning curve for me is very steep at the moment.
Thanks for your time and help.
Kess

Quote:
Copy the MyApplet.html launcher file from the build folder to the package where the applet class lives in the src folder (in this case, to org.me.hello). Make sure that the MyApplet.html launcher file has the same name as the applet class.
Note that later it says....
Note that applets run in the virtual machine of the IDE's default web browser. The IDE uses a different virtual machine and therefore applets are not included in a web application's debug session. Debug the applet within the Java project, as explained above.
So, if you create the htm file and add in some parameters, it becomes a web application and the caveat is that no breakpoints can be set and you cant step into the code.
Which is the problem I am having.
Of course none of the examples or help pages only ever give the most simplest of the "Hello Word" examples, and it would appear that doing something a little more complex is beyond the help articles.......
I am still stuck, and would much prefer someone to state excatly how to debug an applet.....
I cant believe this beyond some of the experts here.
Thanks for your comments so far.

Similar Messages

  • How to Debug multiple Applets in a IDE

    Hi,
    I am relatively new to Java. At work, I have a client-server style application where applets are deployed to the clients in an html page.
    Background:*
    The sequence is something like this:
    - Client goes to the relevant url
    - The returned html page has an embedded login applet
    - Upon successful login, an html page is returned that has two embedded applets
    - On the client side, navigation buttons within the applets take them to other applets
    On the server there is an application running that listens to the relevant socket (that the client sends data to) and sends out appropriate responses and data.
    Question:*
    How do i setup this system in any IDE (any IDE is ok with me) so that i can do the following:
    - Step through and debug the applets (appletviewer doesnt work because it seems to work with independent applets only. In my case, all the applets have relationships among them. eg. unless the login applet successfully completes, the other applets cannot work... etc)
    - Visually view / edit existing applets UI (something like a WYSIWYG tool)
    Thank you so much.
    schinni

    Hi,
    I am actually, working in an applet too, and I also need to debug it. With Eclipse you will easily get it, just click with Right button on the project�s name and choose: Debug As-> Java Applet. You can arrive also by: Debug As-> Open Debug Dialog. At the end you will have a window where you will be able to add the applet parameters in the Parameters tab. Finally you only have to set breakpoint (double click in the left side of any code line) and with F5, F6 and F7 you will get the absolute control. I don't think you've problems even you run multiple applets.
    Hope it helps you (sorry for my poor English).

  • Debug an applet that has a run-time (logic) error how?

    hi,
    I have an applet that has a non-terminating loop in it...I found it after eye-balling my code.
    How would one debug an applet? I have bought sooooo many books on java, & NONE provide/identify a process for debugging applets. I use JTextPad & would appreciate a method i can use to debug applets....ppppllleezzzz

    TheStijn is correct about stepping thru code - you'd need a development environment. However, the better of these for use in a commercial environment are usually expensive (>$1000). The free ones are not so good (although given that WSAD is based on Eclipse and I think WSAD is pretty good, maybe you could go for Eclipse). They also take some time to get to grips with.
    You could instead litter your code with System.out.println() statements to see what it is doing. These can be viewed from the browser's Java console. On IE, you enable the console by doing Tools > Internet Options > Advanced. Scroll down to "Microsoft VM" and select "Java Console enabled". Then the console is visible (after re-starting IE) from the View menu (at the bottom).
    With Netscape (4.7), you do Communicator > Tools > Java Console. You can also view it on other browsers thru similar mechanisms. Hope this helps in the short-term.

  • How to Debug Java Applet called in a BSP Component

    Hi All,
    In CRM Marketing->Segments->Graphical Modeler
    A click on settings button will load a Java Applet window.
    The settings window displays some elements. I want to translate a text displayed in that Java Applet window.
    Please let me know the ways to debug a Java applet loaded from BSP Component or ways the data is loaded into Java applet from SAP.
    Your help would be appreciated and points will be rewarded.
    Thanks a lot in advance.

    For the newbies, like me:
    Instruction to setup and debug an applet in Eclipse IDE via your Browser
    Java Console Setup for Applet debugging:
    1. Open up the Java Console Application by double clicking on it at C:\Program Files (x86)\Java\jre1.6.0_03\bin\javacpl.exe
    2. Select the Java Tab
    3. View Applet Runtime Settings button
    4. Enter in the Java Runtime Parameters the following: -Xdebug -Xrunjdwp:transport=dt_socket,address=5555,server=y,suspend=y
    5. Note: the port address 5555 can be anytime you want. You will need to enter whatever number you select into Eclipse IDE.
    6. Note: if you don�t need to debug code in the Applet�s init() method, then use....suspend=n (Not tested yet.)
    Eclipse setup for Applet debugging:
    1. Open up Eclipse and create your Applet. Once you are ready to debug go to the next step.
    2. Select the top level Run menu
    3. Pick the Open Debug Dialog� option
    4. In the left column select Remote Java Application
    5. Then select the �New� button to create a debug configuration for the remote session (the new button looks like a page with a yellow plus in the upper right hand corner)
    6. Give your session a name. I used the class name followed with the work remote for example: mainclassnameRemote
    7. Set connection type to Standard (Socket Attached)
    8. Host to localhost
    9. Port to 5555, or whatever you used in Java Console Setup step 5.
    10. Due not check the �Allow termination of remote VM�
    11. Due not close this window.
    Start debugging:
    1. Go to your Applet html launch file and launch in a browser
    2. Then go back to eclipse and select the debug button
    3. Eclipse should now throw you into the debugger mode.
    4. If it hangs, just retry again. It seems to work ok most of the time. A few time I need to close the browser and start over and then it seems to work.

  • Netbeans debugging an applet

    I have a class called JScriptBroker which extends Applet.
    I have a class SearchPeaple that extends JScriptBroker and therefore is an applet.
    How do I tell netbeans it is an applet because it keeps bugging me the main method is
    missing?
    Allso I cannot debug an applet that uses JSObject, this is because the applet cannot be
    run with the appletviewer. None of the html elements are visible in the appletviewer.
    Adding the applet to a jsp or html page in a web project doesn't solve the problem
    because breakpoints in the applet are ignored. The following is from the help of
    NetBeans
    Applets run in the virtual machine of the IDE's default web browser. The IDE uses a different virtual machine and therefore applets are not included in a web application's debug session.
    I havent used Netbeans for about 3 years now but I do remember it used to be
    possible to debug an applet in the html/jsp file of your choice. Does anybody know how to
    do this?

    Thanks for your reply, i see I made a mistake in my post
    Allso I cannot debug an applet that uses JSObject, this is because the applet cannot be
    run with the appletviewer. None of the html elements are visible in the appletviewer.
    should be
    Allso I cannot debug an applet that uses JSObject, this is because the applet cannot be
    run in inaything but the appletviewer. None of the html elements are visible in the appletviewer.
    About debugging an applet that extends a class that extends an applet:
    Opened a new java class library project in netbeans 4.0 using jre 1.5
    Added a class called AppletClass
    import java.applet.*;
    public class AppletClass extends Applet{
        public void init(){
            System.out.println("OK, this works");
    }Right clicked the file and choose debug, that works.
    Added a class called SubAppletClass that extends AppletClass
    Right clicked it and choose debug, the error is:
    Class "SubAppletClass" does not have a main method.

  • When loading applet, how can show loading bar?

    Hi, everybody.
    I have one applet including one class extended from Applet and several sub classes of it.
    Now I want to show loading bar when web browser is loading this applet, how can I do?
    Give me some tips or advise.
    Thank you.

    >
    ..I want to show loading bar when web browser is loading this applet, how can I do?>See my reply to this thread, for some tips.
    <http://forum.java.sun.com/thread.jspa?messageID=10031386>
    >
    Give me some tips or advise.>Sure. One tip I have is.. Adding Dukes shows interest, but 1 Duke indicates 'not much interest'. ;-)

  • Debug STK applet   with  JCOP 3.0

    Hi all
    i want to debug my STK applet with JCOP tools in eclipse plugin.but somehow i am not able to debug my SIM toolkit with JCOP.
    first ques , is it possible?
    right now i m debuging in manu project---->debug
    then i m choosing java card application to debug,but its not working:(
    how can i proceed step by step for debuging?
    one more ques,
    is it possible to load applet on java card only with JCOP tools?(means without any s/w like views professional or aspects developer.)
    Regards
    Divyesh.

    Hi all.
    I'm having the same problem. I know that a html file is created everytime the applet is invoked (clicking on debug or run) with a diferent name to be called as argument of appletviewer.
    But I will join to the question... How can we use our testpage to do a test of a devel applet?
    Because mine has to be used with javascript and it's very difficult to test it without a custom test page or appletviewer...
    Thank you all

  • In Applet  how to send an ' image' and 'string' as parameter

    Hi,
    In web application, how to use post method in applet to send an ' image' and 'string' as a parameter, I can able to send the image alone form applet to servlet.

    869665 wrote:
    Hi,
    In web application, how to use post method in applet to send an ' image' and 'string' as a parameter, I can able to send the image alone form applet to servlet.One way to do this is to convert your binary image data to base64 (convert it to plain text) and send it along with your other String parameter, delimited with a & of course.
    Edited by: maheshguruswamy on Aug 2, 2011 11:59 AM

  • In a java applet , how to call other jar file?

    i have i programm, this programm is a java application,
    also, i already put these program into jar file, and then if i double this jar file , its work!
    but , now i need to run this program in web browser,
    i thing that i will write a simple applet with a button
    after i click this jButton, how the java applet call and run the java file?
    please help me.. it is because this is my project! thx..........
    [email protected]

    I have a solution write one batch file in that you specify class path and java home.
    then give
    java -jar Test.jar
    then call this batch file from program using Java runtime
    Runtime.exec method...
    Hope will this work

  • JMF Diagnostics applet - how to resolve "JMF Classes not found"

    I am still having problems trying to get my USB camera to run in an applet.
    I'm using Windows XP with IE 6.
    I found the JMF Diagnostic Applet and when I run it, I get the following:
    Java 1.1 compliant browser.....Maybe
    JMF classes.....Not Found
    The text below says that CLASSPATH needs to include jmf.jar
    I have checked that and it does. I added all the jar files to the CLASSPATH as well and that did not help.
    I saw another post that said the JMFHOME environment variable needed to be set to the main JMF directory.
    I did that and still get the same error.
    Can anyone tell me what I need to set in order to make the JMF Diagnostic applet work???
    Thanks,

    I have exactly the same problem. Running XP pro and Java 5. Installed JMF2.1.1e and the diagnostic doesn't work. Don't know how to verify or set the CLASSPATH but assumed it was more plug and play.
    I'm a student and am writing my final year project which is supposed to be a multi-client concurrency based video clip app. All the sample codes I've seen make it look quite easy. I was wanting to prototype my concepts before I continue (glad there are some nifty buffer controls) I've unistalled, reinstalled, restarted an no joy and the only help that seems might work includes loads more files than what my distribution has (just have jmf.jar, customizer.jar, multiplayer,jar, mediaplayer.jar and sound.jar and that's it.
    I was a little worred about the need to have the API on my test client machines (aka housemates) now I'm really worried.

  • Internet explorer warns about my applet, how can I stop it?

    I get the warning "To help protect your security, Internet Explorer has restricted this web page from running scripts or ActiveX controls ..." when running the applet whose code is included below. How can I stop the warning from appearing, it is annoying?
    * @(#)*****.java
    * ******* Applet application
    * @author
    * @version 1.00 2008/2/10
    import java.awt.*;
    import java.applet.*;
    import javax.swing.*;
    public class ****** extends JApplet implements Runnable {
         static int red=0,green=100,blue=0;
         public void init() {
         public void start()
              Thread th = new Thread(this);
              th.start();
         public void run()
              for(int i=1;i<=5;i++)
                   red=i*10;
                   blue=i*8;
                   green=i*15;
                   try{
                        Thread.sleep (200);
                   catch(Exception ex)
                   repaint();
         public void paint(Graphics g) {
              Color hej = new Color(red,green,blue);
              g.drawString("Welcome to Java!!! ", 50, 60 );
    //          setColor(hej.getBlue());
              g.setColor (hej);
              g.fillOval(100,100,500,400);
    }

    You can probably alter your Internet Explorer browser settings by going to the menu <tools><internet options><security> and change one or more of the settings. Be careful about decreasing your security too much. Also, dont expect end-users to lower thier security settings to run your code.

  • How to debug to observe how query collect the data

    Hi,
    I have a query with serveral variables, which I restrict the values through master data read class on info object level.
    Our problem is that the query can not find data in infoprovider with the resticted values whild running.
    I want to know how query handle the selected values in background, is there any way to debug?
    thanks
    regards

    Hi Alex,
    I have tried RSRT and Aanlyzer to debug. My master data read class works good and the query can find values with the restricted values, but when I excute the query in Query designer, the query can not find the values any more.
    Do you have any idea where the problem is?
    thanks
    regards

  • Java applet - how to do this?

    I am translating a Midlet project to JApplet project. Microedition, UDPDatagramConnection, not available and lots more. How can tune this for JavaSE?
    // code..........
    package sip;
    import javax.swing.JApplet;
    import javax.microedition.io.*;
    //import javax.microedition.midlet.*;
    //import javax.microedition.lcdui.*;
    import java.io.*;
    import net.*;
    import iax.audio.*;
    //import iax.audio.gsm.*;
    //import rtp.*;
    public class InviteMIDlet extends JApplet implements CommandListener, SIPProviderListener {
    // Vaiables to assign
    private Display display;
    public Form form;
    private TextField To;
    private Command sendCmd;
    private Command exitCmd;
    private Command hangupCmd;
    public int sdpPort = 0;
    private UDPDatagramConnection rtpCon = null;
    private boolean incall = false;
    // Sip Digest parameters
    private String UserName = "";
    private String passwd = "123";
    private String SipServerIP = "212.";
    private int SipServerPort = 5060;
    // Sip parameters
    private SIPProvider provider;
    private String MediaIP = null;
    private int MediaPort = 0;
    // Thread assign
    private UDPSend udpSend;
    private UDPReceive udpReceive;
    private AudioCapture audioCapture;
    private AudioPlayer audioPlayer;
    // End of Thread assign
    // Main midlet parameters
    public InviteMIDlet() {
    form = new Form("SIP Dialer");
    try {
    display = Display.getDisplay(this);
    To = new TextField("To:", "0012127773456", 40, TextField.LAYOUT_LEFT);
    form.append(To);
    sendCmd = new Command("Call", Command.ITEM, 1);
    form.addCommand(sendCmd);
    hangupCmd = new Command("Hangup", Command.ITEM, 2);
    form.addCommand(hangupCmd);
    exitCmd = new Command("Exit", Command.EXIT, 3);
    form.addCommand(exitCmd);
    form.setCommandListener(this);
    rtpCon = (*UDPDatagramConnection*) Connector.open("datagram://:");
    sdpPort = rtpCon.getLocalPort();
    provider = new SIPProvider(UserName,passwd,SipServerIP, SipServerPort, 1225);
    provider.start();
    provider.addSIPProviderListener(this);
    } catch (Exception ex1) {
    ex1.printStackTrace();
    }

    shamuntoha wrote:
    UDPDatagramConnection is available under MIDP/Midlet. But after migration to j2se, it shows microedition does not exist. What is that mean?.. None of the J2ME (or JME - I forget what they're calling it this instant) classes are available in J2SE ((J)Applets, (J)Frames etc.).
    Usually there is a J2SE equivalent. The JavaDocs for J2SE are available for download, or for web browsing at [http://java.sun.com/javase/6/docs/api/index.html]. I say usually since I can find no letter for letter equivalent of UDPDatagramConnection in the J2SE. There are a variety of classes that mention Datagram. Perhaps if you start there, you will figure how to do what J2ME does.
    ..i want to switch the same code, concept, in to j2se.
    rtpCon = (UDPDatagramConnection) Connector.open("datagram://:");
    sdpPort = rtpCon.getLocalPort();BTW - the advice to use code tags still stands. Most people will not so much as glance at code that is not formatted. After all, which is easier to read, this..
    rtpCon = (UDPDatagramConnection) Connector.open("datagram://:");
    sdpPort = rtpCon.getLocalPort();
    ..or this?
    rtpCon = (UDPDatagramConnection) Connector.open("datagram://:");
    sdpPort = rtpCon.getLocalPort();

  • Run 2 systems command in applet, how?

    I have an applet in which the following code works fine on a windows machine for a VM windows-based router I am developing:
    Process f;
    String cmd="tftp -i 192.168.1.101 GET router_image.exe";
    try{
         f=Runtime.getRuntime().exec(cmd);
    }But I also need to add a 5 second pause and then run the router_image.exe.
    Using the above commands (or modifications thereto), is this possible? If so, what would need to be done.
    Thanks.

    bulgin wrote:
    I've looked over many of your other posts, a snippet of the over 18,000 you have posted over 10 years -- wow, that's quite a record of trying to prove oneself.Congratulations. Next, try the "living in your parent's basement" line.
    So you told me to "Just stick those lines in after the exec." to be cynical and prove to me how little I know?I told you that because it answered the question.
    To set a trap that you could then refer back to in your apish chest-pounding display of machismo?No, and quite frankly that interpretation of the events is paranoid.
    What level of assistance did you expect? That I'd read your mind regarding what problems you were having understanding the issue and the goals of the project, review all your code to see if it matched, correct it all, and provide the completed work to you?
    If you feel that my knowledge of Java which I admit is meager, is not up to snuff for the "New to Java" forum, then perhaps you can suggest to the forum administrators that they open another another one. I'm sure you will have no problem contributing."New to Java" doesn't mean "bears no responsibility to express the nature of the problem fully" or "all work will be performed for the newbie".
    As for me, I'm going to click on the abuse link at the top and report you. The nature of the abuse being, I gave you some advice, you followed it, another problem turned up, you complained because you expect everything to work perfectly the first time and so you felt the advice was somehow backhanded, and when I gave you more advice, you felt that it was disparaging.
    You've certainly made my initial inquiry into java a great learning experience! If you learned that you don't get to be spoonfed, and that coding involves repeated corrections, and that not everyone is your parent, then that would be great. Sadly, I suspect you may have failed to learn that lesson.
    Thanks!You're welcome, Captain Sarcasm.

  • Testing applets - how to clear cache?

    I test an applet. Fix a bug and retest, but the old applet's still in cache so my browser doesn't bother to reload. Closing and restarting the browser works, but is slow. Adding a version suffix (app_a, app_b, ...) is also slow.
    I'm testing in Netscape, IE, Firefox and Opera. They all cache applets much too tenaciously.
    This came to a head when I wrote a trivial applet to launch something, and had a typo-driven button that said "Lauch ...". Went back, added an "n" and retested. Of course it still said "Lauch ..." and I really don't like being reminded of how dumb I can be. Help!

    Answer found for IE 6:
    Tools/Internet Options/General/Delete Files...
    Three browsers to go and Netscape is probably the same as Firefox.

Maybe you are looking for

  • ITUNES WONT OPEN COMES UP WITH ERROR MESSAGE

    ITUNES WONT OPEN COMES UP WITH ERROR MESSAGE (send error report one)

  • Sort Key Figure in a Query

    I have a situation where I have to use a query (not possible to use a view - long story, but limitations on views make it so) I have a simple query that has products on rows, and Month and Sales Value on the columns. I want to sort the Sales value de

  • SQl Error while executing query in BEx

    Hi All, We are executing a Report in Bex 7.0 and we get the selection screen once i give the slections and execute it after running for few mins ( say 3 mins), its giving the below error message. Error Sql: 1578 Error ORA-01578 ORACLe DATA BLOCK Corr

  • I bought ipad 2. how do i transfer my data from ipad 1 to new ipad

    I bought a ipad 2. How do I transfer all my data from my "old" ipad to my new one before I sell it?

  • HT1920 itunes library on dead laptop.

    Long story short. Son had full amount of devices being used and now after his/my laptop went dead awhile back i made my own account. But wanted to know how to access my old library if possible.