How to use jdb sample of TTY?

i am learning jdb (very new), when i compile and execute example of TTY, error says "handle is not available".
i use windows. i think i miss something because TTy code tries to load a file in user directory, but i don't have the file - if this is reason, what is content of the file?
thanks for all.

I just compiled and ran the example source for jdb on my PC.
Here is how I did it:
% cd C:/j2sdk1.4.2/demo/jpda
% jar -xf examples.jar
% javac -classpath "$JAVA_HOME/lib/tools.jar;." com/sun/tools/example/debug/tty/TTY.java
% javac -g HelloWorld.java
% java -classpath "$JAVA_HOME/lib/tools.jar;." com.sun.tools.example.debug.tty.TTY HelloWorld
Initializing jdb ...
stop in HelloWorld.main
Deferring breakpoint HelloWorld.main.
It will be set after the class is loaded.
run
run HelloWorld
Set uncaught java.lang.Throwable
Set deferred uncaught java.lang.Throwable
>
VM Started: Set deferred breakpoint HelloWorld.main
Breakpoint hit: "thread=main", HelloWorld.main(), line=3 bci=0
3            System.out.println("Hello, world!");
main[1]If this does not answer your question, please copy/paste the
commands you are using and the full text of the error message(s).
Then we will try to help you out.

Similar Messages

  • How to use jdb.exe

    I want to know how to use jdb.exe program
    i want to use debugger so how i use this jdb.exe
    plz reply me
    byeee

    I would suggest looking at the debugger in eclipse. www.eclipse.org
    It is GUI based, much simpler to use and in many ways more powerful.

  • How to use jdb debugger.......?

    hi frnds.. iam develped the application Mulithreaded server which is going to handle the n number of client requests.Iam using the jdb run command to execute the application,i dont know how to use other commands....?can anyone tell the way

    JDB has a good documentation bundled with standard JSE distribution. But simple multi-threaded server code could be much easier to debug by you own eyes, I think.

  • How to use  jdb.exe tool

    i've come across the JDB.EXE tool provided by the JRE in some books., but could not practically implement it. how can i use this tool in order to debug my programs.
    i tried this utility by typing "jdb" at the prompt and strat running the program using the "run" command. i need a way to utilise this tool efficiently.

    Search the web. There are plenty of tutorials on the JDB, or Java Debugger.

  • How to use jdb for debugging a servlet?

    I'm using Apache/JServ with jdk 1.4 (via Textpad on win2K SP 3).
    The 'gospel' I'm trying to follow is:
    'Start the server manually and record the password for remote debugging
    (this is displayed on the console).'
    'Start the Java debugger:'
    'jdb -host your_host -password the_password'
    'You should be able to debug your Java classes now using the jdb
    command.'
    My problem is that I can't find the password from Apache.
    I normally start/restart apache as a windows Service.
    If I start it from DOS I get:
    'C:\orant9i\Apache\Apache>apache -k start'
    'Oracle HTTP Server Powered by Apache/1.3.12 (Win32) ApacheJServ/1.1
    mod_ssl/2.6.4 OpenSSL/0.9.5a mod_perl/1.24 running...'
    I've searched the log, conf & property files but can't find any password.
    I've also searched the Apache website for 'jdb' without luck.
    I've printed out (and read!) the 'Using Apache with MS Windows' manual.
    I did a Google:
    --Someone suggested starting Apache using using the -X flag, but I don't
    seem to have this option.
    --Someone else suggested changing jvm12.conf, but I don't have one.
    I have tried the following, just-in-case I don't really need a password,
    but it doesn't tell me a lot, and I would appreciate some help:
    JDB -sourcepath E:\javaPackages org.apache.jserv.JServServletManager
    C:\orant9i\Apache\Apache>JDB org.apache.jserv.JServServletManager
    Initializing jdb ...
    > run
    run org.apache.jserv.JServServletManager
    Set uncaught java.lang.Throwable
    Set deferred uncaught java.lang.Throwable
    >
    VM Started:
    Exception occurred: java.lang.ClassNotFoundException (uncaught)"thread=main", java.net.URLClassLoader$1.run(), line=199 bci=72
    main[1] list
    Source file not found: URLClassLoader.java
    main[1]
    Thanks,
    Peter.
    Posted to alt.apache.configuration, comp.lang.java, http://groups.yahoo.com/group/win-apache and
    comp.infosystems.www.servers.misc with no response

    Hello
    You wrote:
    I added the following to jserv.properties:
    wrapper.bin.parameters=-Xdebug
    wrapper.bin.parameters=-Xrunjdwp:transport=dt_socket,address=2930,suspend=n,server=y
    and it ran the servlet okay.Fine so far. This means your debugee VM is started and running. The "suspend=n" means it
    will start running without waiting for a debugger to attach... so you can attach later whenever you
    decide to debug. Note that 'later' could be weeks later, or possibly never.
    Now: Time to attach jdb to the victim/debugee process you started above.
    You wrote:
    But I get the following when I try to start jdb:
    jdb -connect com.sun.jdi.SocketAttach:hostname=localhost,port=2930 org.apache.jserv.JServServletManager
    gives:
    Cannot specify command line with connector:
    com.sun.jdi.SocketAttach:hostname=localhost,port=2930,
    and
    jdb -attach localhost:2930 org.apache.jserv.JServServletManager
    gives:
    Cannot specify command line with connector: com.sun.jdi.SharedMemoryAttach:name=localhost:2930,The problem here is that you are trying to supply too much information to jdb.
    When you are using the attach connectors, all you need to supply is the
    host name and socket (for the socket connectors), or the name of the shared memory
    area (for the shared memory connector). The connectors you tried above are throwing
    an error because you are trying to supply something extra (the class name).
    When doing an attach, the debugee VM is already launched. The debugger will
    attach to it and inspect the classes loaded.
    If you are still running with the wrapper.bin.parameters you listed above,
    then all you need to connect with jdb is:
      jdb -connect com.sun.jdi.SocketAttach:hostname=localhost,port=2930 You should get a jdb prompt, and you will be able to inspect the debugee
    VM by entering commands such as threads and classes. Typically
    the next thing would be to set some breakpoints (stop in package.class.method,
    or stop at package.class:line. Then restart the debugee with a resume.

  • How to use jdb comiler

    what is use of it .how do we work with this compiler

    Note: This thread was originally posted in the [Java Compiler|http://forums.sun.com/forum.jspa?forumID=7] forum, but moved to this forum for closer topic alignment.

  • PFI as an DI or DO? How to use DO sample clock?

    Hi guys,
    I want to use PFI as an DI and this as a trigger for another channel. By the way i am using all 8 DO P0.0:0.7 for DOs and using USB 6221
    thanks in advance

    Hey Leee,
    you can find an example for this in the NI example finder:
    Hardware Input and Output>DAQmx>Analog Measurements>Voltage>ContAcq-ExtClk-DigStart.prj
    The command you need is:
    DAQmxCfgDigEdgeStartTrig(gTaskHandle,triggerSource,triggerEdge)
    I hope this helps.
    Gregor
    Best Regards,
    Gregor

  • How to use the LAN NetStream for peer transmission, please help, write a sample code

    How to use the LAN NetStream for peer transmission, please help, write a sample code

    No reply, I reply, Oh

  • I am a high school teacher.  My district purchased the entire CC Suite.  Where can I find a tutorial in book form to learn how to use your products?  Do you all provide free book samples to teachers?

    I am a high school teacher.  My district purchased the entire CC Suite.  Where can I find a tutorial in book form to learn how to use your products?  Do you all provide free book samples to teachers?

    Good day!
    This is a user to user Forum, so you are not really addressing Adobe here, even though some Adobe employees thankfully have been dropping by. (edit: Actually they are more likely to frequent the regular Photoshop Forum.)
    Regards,
    Pfaffenbichler

  • Can I get a sample code on how to use CL_GUI_ALV_GRID........

    Can I get a sample code and documents on how to use CL_GUI_ALV_GRID, cl_gui_custom_container. Or cl_salv_table
    I want to create an ALV report and pick my columns with header information.
    Thanks,
    Eric.
    Moderator Message: There are enough sample codes and documents on how to use CL_GUI_ALV_GRID. Please search for them.
    Edited by: kishan P on Nov 12, 2010 10:53 AM

    Hi Eric Adinku,
    There are many reports available. In SE38 check reports starting with BCALV & SALV. Few examples include :
    BCALV_EDIT_01
    BCALV_EDIT_02
    Thanks & Regards,
    Faheem.

  • Need samples how to use classes in WebDynpro

    Hi,
    I Need To simple Samples how to use classes in WebDynpro.
    Regards

    Continued....
    and in the model
    right click->create model
    select the radio button import java bean .
    next ADD jars option will be seen
    Browse the jar on the dekstop.
    now add this model to the used models by right clicking on it.
    Now if you go to Data Modeler.
    You will find the used model.
    From there map to the component controller->view Controller.
    And continue with ur coding.
    Hope this helps you.
    Thanks & Regards,
    Lokesh.

  • Sample project how to use Itext (pdf) in webdynpro

    Hi all,
    Have someone a sample how to use Itext in a webdynpro.
    Richard

    Hi Roberto and Bala,
    Sorry, I was thinking the wrong way!!
    Please can you check my source, I a'm get an error by opening the new window. the error : D:\PDFfromJava.pdf (The system cannot find the file specified)
    this my source:
        //@@begin wdDoInit()
        wdContext.currentPersonalDataElement().setFirstName("Richard");
        wdContext.currentPersonalDataElement().setLastName("Middelburg");
         Document document = new Document();
         try {
          PdfWriter.getInstance(document, new FileOutputStream("D:
    PDFfromJava.pdf"));
           document.open();
           document.add(new Paragraph("Hi, this is demo PDF file from JAVA!"));
         catch(DocumentException de) {
         //     wdComponentAPI.getMessageManager().reportException(de.getMessage(),false);
         wdContext.currentContextElement().setTest("fout1");
         }catch(IOException ioe) {
         //     wdComponentAPI.getMessageManager().reportException(ioe.getMessage(),false);
         wdContext.currentContextElement().setTest("fout2");
         File file = new File("D:
    PDFfromJava.pdf");// from iText library
         try
              IWDResource wr = WDResourceFactory.createCachedResource(getBytesFromFile(file), "PDF Report", WDWebResourceType.PDF);
              IWDWindow w = wdComponentAPI.getWindowManager().createNonModalExternalWindow(wr.getUrl(0), "PDF Report");
              w.show();
         catch (Exception e)
              wdComponentAPI.getMessageManager().reportException(e.getLocalizedMessage(), false);
              wdContext.currentContextElement().setTest("fout3");
        //@@end
    //@@begin others
      public static byte[] getBytesFromFile(File file) throws IOException {
                    InputStream is = new FileInputStream(file);
                    // Get the size of the file
                    long length = file.length();
                    // You cannot create an array using a long type.
                    // It needs to be an int type.
                    // Before converting to an int type, check
                    // to ensure that file is not larger than Integer.MAX_VALUE.
                    if (length > Integer.MAX_VALUE) {
                         // File is too large
                    // Create the byte array to hold the data
                    byte[] bytes = new byte[(int)length];
                    // Read in the bytes
                    int offset = 0;
                    int numRead = 0;
                    while (offset < bytes.length
                             && (numRead=is.read(bytes, offset, bytes.length-offset)) >= 0) {
                         offset += numRead;
                    // Ensure all the bytes have been read in
                    if (offset < bytes.length) {
                         throw new IOException("Could not completely read file "+file.getName());
                    // Close the input stream and return bytes
                    is.close();
                    return bytes;
      //@@end
    Richard

  • How to use Alt-Fn to switch into tty under awesome?

    Now I use awesome WM and do not define any Alt+Fn keys for it.
    Unlike metacity ( I have used that before ) or other WMs, in which Alt+Fn are defined, Ctrl+Alt+Fn must be used for changing to tty.
    So I wanna use Alt+Fn instead of Ctrl+Alt+Fn. Could anyone help me? Thanks a lot!

    It's possible. I did a fair amount of research, but here is how I did it.
    First I use the chvt command to switch to the ttys, but it requires root access. You can give the command suid permission by:
    # chmod u+s /usr/bin/chvt
    Now you can switch terminal using the chvt command as regular user. To switch you have to type "chvt N" where N is from /dev/ttyN. So if you want to switch to tty1, you type: chvt 1. Pretty simple.
    Now comes the next part, xbindkeys. You are going to assign the commands to the Alt+Fn keys. From the wiki here, I used the "xbindkeys -k" to assign a shortcut key by pressing Alt+F1 and got something like this:
    "(Scheme function)"
    m:0x8 + c:67
    Alt + F1
    You need to add this to the ~/.xbindkeysrc file and replace "(Scheme function)" with the appropriate command to the Fn key, such as "chvt 1" to the "Alt+F1" shortcut:
    "chvt 1"
    m:0x8 + c:67
    Alt + F1
    You can do this so on for the other shortcuts. Restart X after you're done. Have fun!
    Last edited by Acecero (2009-10-25 03:08:25)

  • How to use wsus api samples

    hi
    i want to use ComplianceReport from wsus api. what shall i do?
    please guide me
    best regards

    I'm confused... are you looking for instruction on how to use Visual Basic?
    Have you read the
    API Samples and Tools Readme?
    Having asked that, a couple of items of significant note:
    You've apparently downloaded the *WSUS v2* Samples and Tools (not sure why it's still linked, but it is). What you'll need to download is the
    *WSUS v3* Samples and Tools.
    The "Compliance Report" you are trying to use is no longer included in the Samples and Tools package because it's now incorporated into the product itself. Have you reviewed the IN-CONSOLE reports yet? Specifically the "...For Approved Updates"
    reports.
    Lawrence Garvin, M.S., MCSA, MCITP:EA, MCDBA
    SolarWinds Head Geek
    Microsoft MVP - Software Packaging, Deployment & Servicing (2005-2014)
    My MVP Profile: http://mvp.microsoft.com/en-us/mvp/Lawrence%20R%20Garvin-32101
    http://www.solarwinds.com/gotmicrosoft
    The views expressed on this post are mine and do not necessarily reflect the views of SolarWinds.

  • Sample code to get 1st 5 characters of a field and also how to use help ?

    hi ABAP4 experts,
    We are kind of new at ABAP4. We'd be appreciated if you would provide sample code to get 1st 5 characters of a field and also let us know on how to use ABAP4 help to look for such kind solution that next time we don't have to bother you guys here!
    We will give you reward points!
    Message was edited by: Kevin Smith

    Hi Kevin,
    here is the Example for the offset which you want
    DATA TIME TYPE T VALUE '172545'.
    WRITE TIME.
    WRITE / TIME+2(2).
    CLEAR TIME+2(4).
    WRITE / TIME.
    <u>The output appears as follows:</u>
    172545
    25
    170000
    <i>First, the minutes are selected by specifying an offset in the WRITE statement. Then, the minutes and seconds are set to their initial values by specifying an offset in the clear statement.</i>
    <b>2nd Example:-</b>
    DATA: F1(8) VALUE 'ABCDEFGH',
    F2(8).
    DATA: O TYPE I VALUE 2,
    L TYPE I VALUE 4.
    MOVE F1 TO F2.      WRITE F2.
    MOVE F1+O(L) TO F2.      WRITE / F2.
    MOVE F1 TO F2+O(L). WRITE / F2.
    CLEAR F2.
    MOVE F1 TO F2+O(L). WRITE / F2.
    MOVE F1O(L) TO F2O(L). WRITE / F2.
    This produces the following output:
    ABCDEFGH
    CDEF
    CDABCD
      ABCD
      CDEF
    First, the contents of F1 are assigned to F2 without offset specifications. Then, the same happens for F1 with offset and length specification. The next three MOVE statements overwrite the contents of F2 with offset 2. Note that F2 is filled with spaces on the right, in accordance with the conversion rule for source type C.
    if you want more info
    http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb341a358411d1829f0000e829fbfe/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3294358411d1829f0000e829fbfe/content.htm
    hope this solves your Problem
    Thanks
    Sudheer

Maybe you are looking for

  • Exception caught and not thrown (CF9 Server)

    Hello, everyone. I've recently started seeing a JavaScript error with EVERY click of any link on the site. (I know this isn't the JavaScript forum - please give this a glance.. it's CF related, I promise.) I've tracked it down to "cfajax.js", which i

  • Box wise packing slip

    hi, the packing scenario is a under: 1. finished items packed in a small box. One item in one samll box. 2. the small boxes are then packed into corrugated box. suppose 10 small boxes are packed in one corrugated box. 3. then corrugated boxes are pac

  • When I rename a paragraph style can I automatically apply it to the paragraphs using the old style?

    I am using RoboHelp 8. I want to rename a paragraph style from Body to Bodytext (because the new css we have to use uses Bodytext). When I rename the Body style to Bodytext, all my body text switches to the Normal paragraph style. Is there no way to

  • What r the steps to create task based user interface for interaction center

    Hi all,             Can any one please let me know the steps to create task based user interface for interaction center? It would be great             if anyone can share document with step by step. Thanks, Baasanthi

  • Broken keys, can't unlock my macbook. help?

    My 'T', 'E' and '5' keys on my macbook pro is broken so i can't type my password to unlock it.  Are there plug and play keyboards i could use, or is there a way i could connect my old macbook via a cord to utilize its keyboard?  not sure if its a rep