URGENT! debugger for debugging java mixed with c Program

hi,
i am assigned to do a project to develop a tool which can debug java program
in which calls to native functions are made .Can anyone give some valuable
suggestions how to proceed.bye

thanks for the reply.i went through the suggested
site but i could'nt
obtain any implementation issues of such a
debugger.can u suggest a way
to implement such a debugger.Well, you have the source for jdb, which is in
$JAVA_HOME/demo/jpda/examples.jar. This
is an example of how you control the Java Language
portions of the debugee (breakpoints, stepping,
viewing program state, etc...). In order to do
this, jdb accesses the Java Virtual Machine to look
up threads, stack frames, local variables, Objects
in the heap, and so on). jdb does this using the
Java Debug Interface (JDI), which is described
here:
http://java.sun.com/j2se/1.4.1/docs/guide/jpda/architecture.html
http://java.sun.com/j2se/1.4.1/docs/guide/jpda/jdi/index.html
To add native debugging to this mix, you will need to
provide similar capabilities when executing native code.
One example would be setting a breakpoint in a native
method in the debugee. Later on, what do you do when that
breakpoint is hit? How do you represent the native stack,
threads, and other program state? How do you map from a
machine instruction to the corresponding program source?
You will also need to keep the two views (Java and native)
synchronized as execution moves along.
I suggest you take a look at the source for a native
debugger to get a feel for what is involved, and then
think about adding mixed language support to it. One
example would be the Gnu debugger (gdb), which is available
here (and on many other mirror sites):
ftp://ftp.gnu.org/gnu/gdb/index.html

Similar Messages

  • How to debug Java adventure with jdb

    Hi,
    I'm learning J2ee and I'd like to use and debug
    Java adventure. I tried to find some information but found nothing.
    What I tried to debug , is to start the j2ee server by adding the following options into the bin/asadmin.bat file:
    -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
    This it doesn't work because the j2ee server is started with the javaw.exe virtual machine. So I'm stuck here.
    My first question: 1- what visual debugger is great to debug J2ee apps ??
    I'd like to known what are the steps to:
    2- how to start the j2ee server in order to attach the jdb or a visual
    debugger ?
    3- when starting the j2ee server, what do i have to do in order to step
    into the code source of Java adventure and follow function calls ?
    4- how do I have to start the jdb to attach to the J2ee server ?
    5- Any useful tip to debug J2ee apps ! :-)
    Thanks in advance !
    Waltereo

    Hi,Hello
    I'm learning J2ee and I'd like to use and debug
    Java adventure. I tried to find some information but
    found nothing.
    What I tried to debug , is to start the j2ee server by
    adding the following options into the bin/asadmin.bat
    file:
    -Xdebug
    ug
    -Xrunjdwp:transport=dt_socket,address=8000,server=y,sus
    end=nThat looks OK.
    This it doesn't work because the j2ee server is
    started with the javaw.exe virtual machine. So I'm
    stuck here.javaw.exe implies you are on a win32 machine. The default
    debugging transport on win32 is shared memory... but you specify
    a socket connection on the debugee command line above. This
    means you need to specify sockets on the debugger side as well.
    For example:
    jdb -connect com.sun.jdi.SocketAttach:hostname=localhost,port=8000
    Note the port number (8000) matches the value you specified
    when starting the debugee.
    >
    My first question: 1- what visual debugger is great
    to debug J2ee apps ??For a list of debugging tools, check this web page:
    http://java.sun.com/products/jpda/using.html
    Many of these products work well in a J2EE environment.
    Most of them are either free, or come with an introductory
    "try before you buy" offer.
    I'd like to known what are the steps to:
    2- how to start the j2ee server in order to attach
    the jdb or a visual
    debugger ?You are on the right track with the flags/options you
    mentioned.
    3- when starting the j2ee server, what do i have to
    do in order to step
    into the code source of Java adventure and follow
    low function calls ?The code you want to examine needs to be compiled
    with the "-g" flag added to the javac command line.
    When -g is specified, javac will save information
    in the .class files that is used later during debugging.
    4- how do I have to start the jdb to attach to the
    J2ee server ?See above...
    For more coverage on this topic, refer to:
    JPDA Connection and Invocation Details
    http://java.sun.com/j2se/1.4.2/docs/guide/jpda/conninv.html
    5- Any useful tip to debug J2ee apps ! :-)That is a bit outside the scope of this forum... sorry.
    Any useful tips will depend on what J2EE app server you
    are using. Most of the well-known servers come with
    a debugging guide. For example, take a look at:
    Debugging J2EE Applications in the SunOne Application Server
    documentation:
    http://docs.sun.com/source/817-2171-10/dgdebug.html
    Thanks in advance !Best Regards...

  • Signal ILL trying to debug java process with dbx

    Hello,
    I'm trying to debug a java process to find an error in JNI code. I get this message when dbx stops in a C breakpoint:
    t@18 (l@19) signal ILL (illegal trap) in (unknown) t@18 (l@19) signal ILL (illegal trap) in (unknown) at 0xf848ed28
    0xf848ed28:     tne     0x12This signal is not launched when running application without debugger, and after launching this exception and exiting dbx, the java process generates a core.
    I've tried to find out unsuccessfully whether my dbx version is compatible with my Java version, but it seems this could be the problem.
    This is my current configuration:
    java �version:
    java version "1.5.0_06"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
    Java HotSpot(TM) Server VM (build 1.5.0_06-b05, mixed mode)
    opt/SUNWspro/bin/version:
    Machine hardware:   sun4u
    OS version:         5.8
    Processor type:     sparc
    Hardware:           SUNW,Sun-Blade-2500
    The following components are installed on your system:
    Forte C++ 6 update 2
            Sun WorkShop 6 update 2 Compilers C    
            Sun WorkShop 6 update 2 Compilers C++
            Sun WorkShop 6 update 2 Tools.h++ 7.1
            Sun WorkShop 6 update 2 Standard 64-bit Class Library for C++
            Sun WorkShop 6 update 2 Memory Monitor for C++
            Sun WorkShop 6 update 2 Visual
            Sun WorkShop 6 update 2 Development Environment
            Sun WorkShop 6 update 2 TeamWare
            Sun WorkShop 6 update 2 FileMerge
            Sun WorkShop 6 update 2 DBX Debugging Tools
            Sun WorkShop 6 update 2 Performance Analyzer
            Sun WorkShop 6 update 2 LockLint
            XEmacs 20.4 Source Distribution
            Sun WorkShop 6 update 2 Documentation Set
    Sun WorkShop 6 update 2 Building SoftwareAnd this is how I launch java application:
    java -Djava.compiler=NONE -Xdebug -Xnoagent -Xrundbx_agent -jar jarname.jar -mainOptionsDid I miss something important? Does anyone know if it is possible debugging with this configuration?
    Best Regards,
    Alberto

    - Native code has been compiled with -g option.
    - It fails in my code, but only when debugging.
    - Stack trace (executing "where" in dbx):
    (dbx) where
    current thread: t@18
      [1] 0xf848ef68(0xf01537d8, 0xf443b7b0, 0x0, 0xf84181b0, 0x21e9, 0xef581050), at 0xf848ef68
      [2] 0xf8458354(0xf15faea8, 0xf01537d8, 0xf0151a88, 0xf8419368, 0x21e8, 0x0), at 0xf8458354
      [3] 0xf848c9a0(0xf15faea8, 0xf01537d8, 0xf0151a58, 0xf0151a38, 0xf0153830, 0x0), at 0xf848c9a0
      [4] 0xf84577c8(0xf15faea8, 0xb6, 0x0, 0xf84181b0, 0xf0158f80, 0xef581118), at 0xf84577c8
      [5] 0xf8405764(0xf15faea8, 0xb6, 0x0, 0xf8419320, 0xf0158f80, 0xef5811c8), at 0xf8405764
      [6] 0xf8405764(0xf15faea8, 0xb6, 0x0, 0xf84195a0, 0xf0158f80, 0xef581250), at 0xf8405764
      [7] 0xf8405764(0xf0151a38, 0xb8, 0x0, 0xf8419320, 0xf0125258, 0xef5812d8), at 0xf8405764
      [8] 0xf8405874(0xf15fb6c8, 0xb8, 0x0, 0xf8419720, 0xf0125258, 0xef581360), at 0xf8405874
      [9] 0xf8405764(0xf15fae98, 0xb6, 0x0, 0xf8419770, 0xf00f0088, 0xef5813f0), at 0xf8405764
      [10] 0xf8405874(0xf15fae98, 0xb6, 0x0, 0xf8419320, 0x1465, 0xef581478), at 0xf8405874
      [11] 0xf8405874(0xf16315b0, 0xb6, 0x0, 0xf8419320, 0xf00f0088, 0xef581500), at 0xf8405874
      [12] 0xf8405764(0xf16315b0, 0xf45744c0, 0x0, 0xf8419320, 0xf45744c0, 0xef581588), at 0xf8405764
      [13] 0xf8405c2c(0xf16315d0, 0xb7, 0x0, 0xf84198a0, 0xf00f0088, 0xef581618), at 0xf8405c2c
      [14] 0xf8405764(0xf009c018, 0xf402c8b8, 0x0, 0xf84195a0, 0x8800, 0xef5816a8), at 0xf8405764
      [15] 0xf8405c2c(0x2000, 0x2, 0x0, 0xf84198f0, 0xef50e0f8, 0xef581720), at 0xf8405c2c
      [16] 0xf8400218(0xef581808, 0xef581a08, 0xa, 0xf402dae8, 0xf840ba20, 0xef581920), at 0xf8400218
      [17] JavaCalls::call_helper(0x1, 0x65d188, 0xef581918, 0xef581818, 0x4, 0xef581a08), at 0xfdd9a808
      [18] JavaCalls::call_virtual(0x7a9c, 0x65d188, 0x3570f8, 0x357104, 0x357100, 0xf00bc770), at 0xfdec319c
      [19] thread_entry(0xf402fc58, 0x65d188, 0x3574e4, 0xfe424640, 0xfe424710, 0xfe424130), at 0xfdee2700
      [20] JavaThread::run(0x65d188, 0x18, 0xfe40c790, 0x6c00, 0x7dd4, 0x7c00), at 0xfdede29c
      [21] _start(0x65d188, 0x3b62, 0xfe3be000, 0x0, 0x4f24, 0x4c00), at 0xfe264240 - Stack trace (obtained from core generated after ILL signal):
    -----------------  lwp# 19 / thread# 18  --------------------
    ff3791f0 __sigprocmask (ff37b7f4, 0, 0, ef581d98, ff38c000, 0) + 8
    ff36dd0c _sigon   (ef581d98, ff3938a8, 6, ef58083c, ef581d98, ff39321c) + d0
    ff370d4c _thrp_kill (0, 12, 6, ff38c000, 12, ff2c0458) + f8
    ff24bce0 raise    (6, 0, 0, ffffffff, ff2c03c4, 8400) + 40
    ff235984 abort    (ff2bc008, fe3be000, fe26a8e0, fe4133c4, 0, 331c8) + 100
    fe264724 __1cCosFabort6Fi_v_ (1, 0, fe3f2614, fe3be000, 73b4, 7000) + 58
    fe2f08f0 __1cHVMErrorOreport_and_die6M_v_ (0, fe419ad8, fe41339c, 1, fe268a14, fe41339c) + c84
    fde76878 JVM_handle_solaris_signal (4, ef580fd8, ef580d20, 7800, 11, 65d188) + aac
    ff37b118 __sighndlr (4, ef580fd8, ef580d20, fde75d94, ef581e40, ef581e30) + c
    ff37811c sigacthandler (4, ef581d98, 0, 0, 0, ff38c000) + 708
    --- called from signal handler with signal 4 (SIGILL) ---
    f848ef68 ???????? (f15faea8, f01537d8, f0151a88, f8419368, 21e8, 0)
    f848c9a0 ???????? (f15faea8, f01537d8, f0151a58, f0151a38, f0153830, 0)
    f84577c8 ???????? (f15faea8, b6, 0, f84181b0, f0158f80, ef581118)
    f8405764 ???????? (f15faea8, b6, 0, f8419320, f0158f80, ef5811c8)
    f8405764 ???????? (f15faea8, b6, 0, f84195a0, f0158f80, ef581250)
    f8405764 ???????? (f0151a38, b8, 0, f8419320, f0125258, ef5812d8)
    f8405874 ???????? (f15fb6c8, b8, 0, f8419720, f0125258, ef581360)
    f8405764 ???????? (f15fae98, b6, 0, f8419770, f00f0088, ef5813f0)
    f8405874 ???????? (f15fae98, b6, 0, f8419320, 1465, ef581478)
    f8405874 ???????? (f16315b0, b6, 0, f8419320, f00f0088, ef581500)
    f8405764 ???????? (f16315b0, f45744c0, 0, f8419320, f45744c0, ef581588)
    f8405c2c ???????? (f16315d0, b7, 0, f84198a0, f00f0088, ef581618)
    f8405764 ???????? (f009c018, f402c8b8, 0, f84195a0, 8800, ef5816a8)
    f8405c2c ???????? (2000, 2, 0, f84198f0, ef50e0f8, ef581720)
    f8400218 ???????? (ef581808, ef581a08, a, f402dae8, f840ba20, ef581920)
    fdd9a808 __1cJJavaCallsLcall_helper6FpnJJavaValue_pnMmethodHandle_pnRJavaCallArguments_pnGThread__v_ (1, 65d188, ef581918, ef581818, 4, ef581a08) + 5a0
    fdec319c __1cJJavaCallsMcall_virtual6FpnJJavaValue_nGHandle_nLKlassHandle_nMsymbolHandle_5pnGThread__v_ (7a9c, 65d188, 3570f8, 357104, 357100, f00bc770) + 188
    fdee2700 __1cMthread_entry6FpnKJavaThread_pnGThread__v_ (f402fc58, 65d188, 3574e4, fe424640, fe424710, fe424130) + 134
    fdede29c __1cKJavaThreadDrun6M_v_ (65d188, 18, fe40c790, 6c00, 7dd4, 7c00) + 1d8
    fe264240 __1cG_start6Fpv_0_ (65d188, 3b62, fe3be000, 0, 4f24, 4c00) + 208
    ff37b01c _thread_start (65d188, 0, 0, 0, 0, 0) + 40
    -----------------  lwp# 20 / thread# 19  --------------------
    ff29f474 _lwp_sema_wait (ff3934c8, ff392e40, 0, 1, 0, 0) + c
    ff371c2c thr_yield (0, 0, 0, 0, 0, 0) + 8c
    -----------------  lwp# 21  --------------------------------
    ff379200 private___lwp_cond_wait (fa5a3d98, ff38cd6c, ff38c000, 3, ff38c000, 1) + 8
    ff36a358 _lwp_start (fa5a3d98, 0, 4000, fb28162c, 0, 0) + 18
    ff371c2c thr_yield (0, 0, 0, 0, 0, 0) + 8c
    -----------------  lwp# 22  --------------------------------
    ff379200 private___lwp_cond_wait (fa4d3d98, ff38cd6c, ff38c000, 3, ff38c000, 1) + 8
    ff36a358 _lwp_start (fa4d3d98, 0, 4000, fb28162c, 0, 0) + 18
    ff371c2c thr_yield (0, 0, 0, 0, 0, 0) + 8c
    -----------------  lwp# 23  --------------------------------
    ff379200 private___lwp_cond_wait (fa4c3d98, ff38cd6c, ff38c000, 3, ff38c000, 1) + 8
    ff36a358 _lwp_start (fa4c3d98, 0, 4000, fb28162c, 0, 0) + 18
    ff371c2c thr_yield (0, 0, 0, 0, 0, 0) + 8c
    -----------------  lwp# 24  --------------------------------
    ff379200 private___lwp_cond_wait (fa493d98, ff38cd6c, ff38c000, 3, ff38c000, 1) + 8
    ff36a358 _lwp_start (fa493d98, 0, 4000, fb28162c, 0, 0) + 18
    ff371c2c thr_yield (0, 0, 0, 0, 0, 0) + 8c
    -----------------  lwp# 25  --------------------------------
    ff379200 private___lwp_cond_wait (fa483d98, ff38cd6c, ff38c000, 3, ff38c000, 1) + 8
    ff36a358 _lwp_start (fa483d98, 0, 4000, fb28162c, 0, 0) + 18
    ff371c2c thr_yield (0, 0, 0, 0, 0, 0) + 8c
    -----------------  lwp# 26  --------------------------------
    ff379200 private___lwp_cond_wait (fa473d98, ff38cd6c, ff38c000, 3, ff38c000, 1) + 8
    ff36a358 _lwp_start (fa473d98, 0, 4000, fb28162c, 0, 0) + 18
    ff371c2c thr_yield (0, 0, 0, 0, 0, 0) + 8c
    -----------------  lwp# 1 / thread# 1  --------------------
    ff29d600 _poll    (fe4124d8, 0, 1, 18e, 37020, fe3be000) + 8
    fdd90cd0 __1cCosFsleep6FpnGThread_xi_i_ (6e58, 6c00, fdf04534, 1, 7, 4) + 25c
    fdf0ca4c JVM_Sleep (1c08, fe406e44, 37020, fe412d84, 38680, fe3be000) + 260
    f840e22c ???????? (b9, ffbee73c, ffbee6b8, ffffff80, 0, 0)
    f840e1d0 ???????? (0, b8, 0, 8, f402fc58, ffbee6d0)
    f8405764 ???????? (f15996c8, fe4163d4, 0, f8419770, 8800, ffbee768)
    f8405764 ???????? (f01778f8, fe4163d4, 0, f8419370, 8800, ffbee820)
    f8405764 ???????? (2000, 2, 0, f8419320, ffb7c110, ffbee8b8)
    f8400218 ???????? (ffbee9a0, ffbeeb00, a, f41c4038, f840ba20, ffbeea88)
    fdd9a808 __1cJJavaCallsLcall_helper6FpnJJavaValue_pnMmethodHandle_pnRJavaCallArguments_pnGThread__v_ (1, 37020, ffbeea80, ffbee9b0, 4, ffbeeb00) + 5a0
    fdedea14 jni_CallStaticVoidMethod (fe412d84, 381ec, 36750, 37020, 36748, 37cb8) + 500
    000121fc main     (38648, 1e7fa2, fe40a630, 1d8, fded413c, 1) + 115c
    00011088 _start   (0, 0, 0, 0, 0, 0) + 108
    -----------------  lwp# 2 / thread# 2  --------------------
    ff29edc4 _signotifywait (ff38c000, 0, 0, 0, 0, 0) + 8
    ff371c2c thr_yield (0, 0, 0, 0, 0, 0) + 8c
    -----------------  lwp# 3  --------------------------------
    ff379200 private___lwp_cond_wait (ff325d98, ff38cd6c, ff38c000, 0, 0, 4) + 8
    ff29c9c0 _door_return (ff325cd8, ff36a358, 0, 0, 0, 0) + 68
    -----------------  lwp# 4 / thread# 4  --------------------
    ff29f428 ___lwp_cond_wait (35d68, 35d50, fdb81978, 0, 0, fdb81970) + 8
    ff296a7c _lwp_cond_timedwait (2958790, 44b36755, fdb81a50, 35d50, 35d68, a95a) + 98
    fddc3258 __1cHMonitorEwait6Mil_i_ (35cf8, 11dce0, fff0bc00, fe3be000, 6000, 35d28) + 328
    fdf6b4fc __1cIVMThreadDrun6M_v_ (fe4124d8, fe420c84, 0, fe420c70, fe420c80, 1) + 1b4
    fe264240 __1cG_start6Fpv_0_ (11dce0, 3b62, fe3be000, 0, 4f24, 4c00) + 208
    ff37b01c _thread_start (11dce0, 0, 0, 0, 0, 0) + 40
    -----------------  lwp# 5  --------------------------------
    ff29c968 _door_return (4, ff38d658, ff38d670, 3, ff38c000, 1) + 10
    ff36a358 _lwp_start (fe785d98, 0, 6000, ff325b9c, 0, 0) + 18
    ff371c2c thr_yield (0, 0, 0, 0, 0, 0) + 8c
    -----------------  lwp# 6 / thread# 5  --------------------
    ff29f428 ___lwp_cond_wait (120148, 120130, 0, ff2968f0, 0, 1) + 8
    fdeb4768 __1cNObjectMonitorEwait6MxipnGThread__v_ (120370, 9408, 8c00, fe3be000, 11fdc0, 120390) + 59c
    fdeb5978 __1cSObjectSynchronizerEwait6FnGHandle_xpnGThread__v_ (120372, 86d4, 0, 11fdc0, 8400, fe3be000) + e8
    fdeb5628 JVM_MonitorWait (0, e7a14, 11fdc0, fe412d84, 0, 1) + 31c
    f840e22c ???????? (51, fda816ec, fda81670, ffffff80, fdd2e808, 0)
    f840e1d0 ???????? (f15817e0, b6, 0, c, 0, fda81688)
    f8405764 ???????? (f15817e0, b6, 0, f8419354, 80000000, fda81708)
    f8405764 ???????? (0, fe411508, 0, f8419770, 7bac, fda817a0)
    f8400218 ???????? (fda81888, fda81a88, a, f40901d0, f840ba20, fda819a0)
    fdd9a808 __1cJJavaCallsLcall_helper6FpnJJavaValue_pnMmethodHandle_pnRJavaCallArguments_pnGThread__v_ (1, 11fdc0, fda81998, fda81898, 4, fda81a88) + 5a0
    fdec319c __1cJJavaCallsMcall_virtual6FpnJJavaValue_nGHandle_nLKlassHandle_nMsymbolHandle_5pnGThread__v_ (7a9c, 11fdc0, e7a00, e7a0c, e7a08, f0000760) + 188
    fdee2700 __1cMthread_entry6FpnKJavaThread_pnGThread__v_ (f402fc58, 11fdc0, e7dec, fe424640, fe424710, fe424130) + 134
    fdede29c __1cKJavaThreadDrun6M_v_ (11fdc0, 0, fe40c790, 6c00, 7dd4, 7c00) + 1d8
    fe264240 __1cG_start6Fpv_0_ (11fdc0, 3b62, fe3be000, 0, 4f24, 4c00) + 208
    ff37b01c _thread_start (11fdc0, 0, 0, 0, 0, 0) + 40
    -----------------  lwp# 7 / thread# 6  --------------------
    ff29f428 ___lwp_cond_wait (121cc8, 121cb0, 0, ff2968f0, 0, 1) + 8
    fdeb4768 __1cNObjectMonitorEwait6MxipnGThread__v_ (1203b8, 9408, 8c00, fe3be000, 121530, 1203d8) + 59c
    fdeb5978 __1cSObjectSynchronizerEwait6FnGHandle_xpnGThread__v_ (1203ba, 86d4, 0, 121530, 8400, fe3be000) + e8
    fdeb5628 JVM_MonitorWait (0, 121714, 121530, fe412d84, 0, 1) + 31c
    f840e22c ???????? (59, fb3817ec, fb381768, ffffff80, 0, 0)
    f840e1d0 ???????? (f1581760, b6, 0, c, 80000000, fb381780)
    f8405764 ???????? (f1581768, b6, 0, f8419354, 8800, fb381820)
    f8405874 ???????? (f1581768, b6, 0, f8419354, f402af58, fb3818a0)
    f8405874 ???????? (0, fe411508, 0, f8419720, 7bac, fb381920)
    f8400218 ???????? (fb381a08, fb381c08, a, f4090ab8, f840ba20, fb381b20)
    fdd9a808 __1cJJavaCallsLcall_helper6FpnJJavaValue_pnMmethodHandle_pnRJavaCallArguments_pnGThread__v_ (1, 121530, fb381b18, fb381a18, 4, fb381c08) + 5a0
    fdec319c __1cJJavaCallsMcall_virtual6FpnJJavaValue_nGHandle_nLKlassHandle_nMsymbolHandle_5pnGThread__v_ (7a9c, 121530, 121700, 12170c, 121708, f0000858) + 188
    fdee2700 __1cMthread_entry6FpnKJavaThread_pnGThread__v_ (f402fc58, 121530, 121aec, fe424640, fe424710, fe424130) + 134
    fdede29c __1cKJavaThreadDrun6M_v_ (121530, 0, fe40c790, 6c00, 7dd4, 7c00) + 1d8
    fe264240 __1cG_start6Fpv_0_ (121530, 3b62, fe3be000, 0, 4f24, 4c00) + 208
    ff37b01c _thread_start (121530, 0, 0, 0, 0, 0) + 40
    -----------------  lwp# 8 / thread# 7  --------------------
    ff29f428 ___lwp_cond_wait (1b65f0, 1b65d8, fb281890, ff296918, ff29691c, fb281888) + 8
    ff296a7c _lwp_cond_timedwait (2964ae0, 44b36756, fb281910, 1b65d8, 1b65f0, 153180) + 98
    fe2606e0 __1cCosHSolarisFEventEpark6Mx_i_ (1b65b0, 6a60, fe4238d8, 1b65f0, fe406ef0, fb281910) + 1bc
    fe25ff28 __1cNObjectMonitorIraw_wait6MxipnGThread__i_ (1b65b0, fe214b70, 7bac, 0, 1b59e8, 12a188) + 20c
    fe1f4b8c __1cIJvmtiEnvORawMonitorWait6MpnPJvmtiRawMonitor_x_nKjvmtiError__ (fb2, 12a188, 0, 7d0, 4, 1b59e8) + a8
    fe7d87ec process_next_event (fe40b864, 10000, fe7f24a0, fe7f4b90, fe7f25f0, fe7f25ec) + 108
    fe7c7630 agent_bar (1b5aa4, fe7f2ae8, ff38c000, fe7f24c8, 0, 0) + 1c
    fe7c7bc4 jvmti_debug_agent (fe7f2400, 1b5aa4, 0, 1678, 1, fe7f252c) + d4
    fe211c74 __1cQJvmtiAgentThreadTcall_start_function6M_v_ (1b59e8, 7800, 8c94, fe3be000, fe4123c4, fe4163d4) + 150
    fdede29c __1cKJavaThreadDrun6M_v_ (1b59e8, 18, fe40c790, 6c00, 7dd4, 7c00) + 1d8
    fe264240 __1cG_start6Fpv_0_ (1b59e8, 3b62, fe3be000, 0, 4f24, 4c00) + 208
    ff37b01c _thread_start (1b59e8, 0, 0, 0, 0, 0) + 40
    -----------------  lwp# 9 / thread# 8  --------------------
    ff29f474 _lwp_sema_wait (fb181e60, ff38c000, 0, fb181d98, 0, 0) + c
    ff3690d8 _swtch   (fb181d98, ffffffff, ff38c000, 5, 1000, fe4170c4) + 158
    ff36c860 sema_wait (fe4217e8, ff39785c, 5000, 10000, 534d, 1) + bc
    fdf61dc0 __1cVcheck_pending_signals6Fi_i_ (1, fe4124d8, fe4123c0, 1b6ab8, fe3be000, a) + 254
    fdf58ec8 __1cTsignal_thread_entry6FpnKJavaThread_pnGThread__v_ (7428, 1b6ab8, 1b7088, fe3be000, 4ff61c, 1b7080) + 34
    fdede29c __1cKJavaThreadDrun6M_v_ (1b6ab8, 18, fe40c790, 6c00, 7dd4, 7c00) + 1d8
    fe264240 __1cG_start6Fpv_0_ (1b6ab8, 3b62, fe3be000, 0, 4f24, 4c00) + 208
    ff37b01c _thread_start (1b6ab8, 0, 0, 0, 0, 0) + 40
    -----------------  lwp# 10 / thread# 9  --------------------
    ff29f428 ___lwp_cond_wait (36548, 36530, fe423d60, 0, 0, ff29695c) + 8
    fddc33ec __1cHMonitorEwait6Mil_i_ (364d8, 1b7998, 1b8510, fe3be000, 1b7998, 36508) + 4bc
    fdf35d00 __1cNCompileBrokerUcompiler_thread_loop6F_v_ (fe4124d8, 1b54c0, 1b7998, fe407360, 8c00, 364d8) + 22c
    fdede29c __1cKJavaThreadDrun6M_v_ (1b7998, 18, fe40c790, 6c00, 7dd4, 7c00) + 1d8
    fe264240 __1cG_start6Fpv_0_ (1b7998, 3b62, fe3be000, 0, 4f24, 4c00) + 208
    ff37b01c _thread_start (1b7998, 0, 0, 0, 0, 0) + 40
    -----------------  lwp# 11 / thread# 10  --------------------
    fdd0c200 __1cENodeSremove_dead_region6MpnIPhaseGVN_i_i_ (9132d4, fa6809f4, 1, 9132d4, 9132f4, 68ad00) + 2c
    fdd3332c __1cHMemNodeMIdeal_common6MpnIPhaseGVN_i_pnENode__ (fa6809f4, fa6809f4, 1, 800, 9132d4, 9132f4) + 3c
    fdd68a78 __1cJStoreNodeFIdeal6MpnIPhaseGVN_i_pnENode__ (9132d4, fa6809f4, 1, 0, fdd4be74, fe3fbb44) + c
    fdcf887c __1cMPhaseIterGVNNtransform_old6MpnENode__2_ (fa6809f4, 9132d4, 89e938, fdd68a6c, 20000000, c7) + 28
    fdde3b98 __1cMPhaseIterGVNIoptimize6M_v_ (fa6809f4, 14, 9132d4, 0, fa680b44, ffffffff) + ac
    fde048d8 __1cOPhaseIdealLoop2t6MrnMPhaseIterGVN_pk0i_v_ (fa68087c, ffffffff, fa680fb0, 2, 0, fa680880) + c34
    fde7fb28 __1cHCompileIOptimize6M_v_ (fa680fb0, 1b55b0, 0, 0, fe3be000, 1000) + 200
    fde82740 __1cHCompile2t6MpnFciEnv_pnKC2Compiler_pnIciMethod_ii_v_ (fa680fb0, 0, 36ee0, 0, fe3384f8, fa680fb0) + be8
    fde786f8 __1cKC2CompilerOcompile_method6MpnFciEnv_pnIciMethod_i_v_ (fa6818ac, fe324608, 9269b8, ffffffff, 36ee0, 1000001) + b0
    fde793b4 __1cNCompileBrokerZinvoke_compiler_on_method6FpnLCompileTask__v_ (597690, 1b8eb4, 1b55b0, 1b88d8, fe338ea7, fa6818ac) + 4cc
    fdf35f20 __1cNCompileBrokerUcompiler_thread_loop6F_v_ (fe4124d8, 1b5550, 1b88d8, f4368380, 1b8eb0, 0) + 44c
    fdede29c __1cKJavaThreadDrun6M_v_ (1b88d8, 18, fe40c790, 6c00, 7dd4, 7c00) + 1d8
    fe264240 __1cG_start6Fpv_0_ (1b88d8, 3b62, fe3be000, 0, 4f24, 4c00) + 208
    ff37b01c _thread_start (1b88d8, 0, 0, 0, 0, 0) + 40
    -----------------  lwp# 12 / thread# 11  --------------------
    ff29f428 ___lwp_cond_wait (365d8, 365c0, fe423d60, 0, 0, ff29695c) + 8
    fddc33ec __1cHMonitorEwait6Mil_i_ (36568, 1b9818, 1ba390, fe3be000, 1b9818, 36598) + 4bc
    fdf35d00 __1cNCompileBrokerUcompiler_thread_loop6F_v_ (fe4124d8, 1b5550, 1b9818, fe407360, 1b9df0, 36568) + 22c
    fdede29c __1cKJavaThreadDrun6M_v_ (1b9818, 18, fe40c790, 6c00, 7dd4, 7c00) + 1d8
    fe264240 __1cG_start6Fpv_0_ (1b9818, 3b62, fe3be000, 0, 4f24, 4c00) + 208
    ff37b01c _thread_start (1b9818, 0, 0, 0, 0, 0) + 40
    -----------------  lwp# 13 / thread# 12  --------------------
    ff29f428 ___lwp_cond_wait (34858, 34840, 1, 0, 1, 1bb248) + 8
    fddc309c __1cHMonitorEwait6Mil_i_ (347e8, 1bb1a0, fff0bc00, fe3be000, f4000, 34818) + 16c
    fdf64b44 __1cRLowMemoryDetectorbGlow_memory_detector_thread_entry6FpnKJavaThread_pnGThread__v_ (1bb1a0, 347e8, 9000, fe411604, fe3be000, 1) + 2ec
    fdede29c __1cKJavaThreadDrun6M_v_ (1bb1a0, 18, fe40c790, 6c00, 7dd4, 7c00) + 1d8
    fe264240 __1cG_start6Fpv_0_ (1bb1a0, 3b62, fe3be000, 0, 4f24, 4c00) + 208
    ff37b01c _thread_start (1bb1a0, 0, 0, 0, 0, 0) + 40
    -----------------  lwp# 14 / thread# 13  --------------------
    ff29d600 _poll    (fe4124d8, 32, 0, 0, 8400, fe3be000) + 8
    fdd90cd0 __1cCosFsleep6FpnGThread_xi_i_ (6e58, 6c00, 1, 0, 2, 4) + 25c
    fdfa5194 __1cNWatcherThreadDrun6M_v_ (1bc4c8, 1b5460, 32, fe3be000, fe417db8, 0) + e8
    fe264240 __1cG_start6Fpv_0_ (1bc4c8, 3b62, fe3be000, 0, 4f24, 4c00) + 208
    ff37b01c _thread_start (1bc4c8, 0, 0, 0, 0, 0) + 40
    -----------------  lwp# 15 / thread# 14  --------------------
    ff29d600 _poll    (fe4124d8, 0, 1, f1, 3baea0, fe3be000) + 8
    fdd90cd0 __1cCosFsleep6FpnGThread_xi_i_ (6e58, 6c00, fdf04534, 1, 7, 4) + 25c
    fdf0ca4c JVM_Sleep (ba8, fe406e44, 3baea0, fe412d84, 3bb180, fe3be000) + 260
    f840e22c ???????? (c9, eff818f4, eff81870, ffffff80, f00e5250, 0)
    f840e1d0 ???????? (0, b8, 0, 8, f00e5250, eff81888)
    f8405764 ???????? (2000, 2, 0, f8419754, eff0e110, eff81920)
    f8400218 ???????? (eff81a08, eff81c08, a, f423b868, f840ba20, eff81b20)
    fdd9a808 __1cJJavaCallsLcall_helper6FpnJJavaValue_pnMmethodHandle_pnRJavaCallArguments_pnGThread__v_ (1, 3baea0, eff81b18, eff81a18, 4, eff81c08) + 5a0
    fdec319c __1cJJavaCallsMcall_virtual6FpnJJavaValue_nGHandle_nLKlassHandle_nMsymbolHandle_5pnGThread__v_ (7a9c, 3baea0, 254948, 254954, 254950, f01aaaf8) + 188
    fdee2700 __1cMthread_entry6FpnKJavaThread_pnGThread__v_ (f402fc58, 3baea0, 254d34, fe424640, fe424710, fe424130) + 134
    fdede29c __1cKJavaThreadDrun6M_v_ (3baea0, 18, fe40c790, 6c00, 7dd4, 7c00) + 1d8
    fe264240 __1cG_start6Fpv_0_ (3baea0, 3b62, fe3be000, 0, 4f24, 4c00) + 208
    ff37b01c _thread_start (3baea0, 0, 0, 0, 0, 0) + 40
    -----------------  lwp# 16 / thread# 15  --------------------
    ff29d600 _poll    (fe4124d8, 0, 1, f0, 358da0, fe3be000) + 8
    fdd90cd0 __1cCosFsleep6FpnGThread_xi_i_ (6e58, 6c00, fdf04534, 1, 7, 4) + 25c
    fdf0ca4c JVM_Sleep (368, fe406e44, 358da0, fe412d84, 358f98, fe3be000) + 260
    f840e22c ???????? (91, efe81874, efe817f0, ffffff80, f00dfeb0, 0)
    f840e1d0 ???????? (0, b8, 0, 8, f00dfeb0, efe81808)
    f8405764 ???????? (2000, 2, 0, f8419754, efe0e110, efe818a0)
    f8400218 ???????? (efe81988, efe81b88, a, f423b868, f840ba20, efe81aa0)
    fdd9a808 __1cJJavaCallsLcall_helper6FpnJJavaValue_pnMmethodHandle_pnRJavaCallArguments_pnGThread__v_ (1, 358da0, efe81a98, efe81998, 4, efe81b88) + 5a0
    fdec319c __1cJJavaCallsMcall_virtual6FpnJJavaValue_nGHandle_nLKlassHandle_nMsymbolHandle_5pnGThread__v_ (7a9c, 358da0, 254d48, 254d54, 254d50, f01b4270) + 188
    fdee2700 __1cMthread_entry6FpnKJavaThread_pnGThread__v_ (f402fc58, 358da0, 255134, fe424640, fe424710, fe424130) + 134
    fdede29c __1cKJavaThreadDrun6M_v_ (358da0, 18, fe40c790, 6c00, 7dd4, 7c00) + 1d8
    fe264240 __1cG_start6Fpv_0_ (358da0, 3b62, fe3be000, 0, 4f24, 4c00) + 208
    ff37b01c _thread_start (358da0, 0, 0, 0, 0, 0) + 40
    -----------------  lwp# 17 / thread# 16  --------------------
    ff29d600 _poll    (fe4124d8, 0, 1, f5, 3dd8a8, fe3be000) + 8
    fdd90cd0 __1cCosFsleep6FpnGThread_xi_i_ (6e58, 6c00, fdf04534, 1, 7, 4) + 25c
    fdf0ca4c JVM_Sleep (1628, fe406e44, 3dd8a8, fe412d84, 3c5f98, fe3be000) + 260
    f840e22c ???????? (c1, efb015fc, efb01570, ffffff80, efb, 0)
    f840e1d0 ???????? (0, b8, 0, 8, 8800, efb01588)
    f8405764 ???????? (2000, 2, 0, f8419770, efa8e110, efb01620)
    f8400218 ???????? (efb01708, efb01908, a, f422e650, f840ba20, efb01820)
    fdd9a808 __1cJJavaCallsLcall_helper6FpnJJavaValue_pnMmethodHandle_pnRJavaCallArguments_pnGThread__v_ (1, 3dd8a8, efb01818, efb01718, 4, efb01908) + 5a0
    fdec319c __1cJJavaCallsMcall_virtual6FpnJJavaValue_nGHandle_nLKlassHandle_nMsymbolHandle_5pnGThread__v_ (7a9c, 3dd8a8, 3568f8, 356904, 356900, f007a910) + 188
    fdee2700 __1cMthread_entry6FpnKJavaThread_pnGThread__v_ (f402fc58, 3dd8a8, 356ce4, fe424640, fe424710, fe424130) + 134
    fdede29c __1cKJavaThreadDrun6M_v_ (3dd8a8, 18, fe40c790, 6c00, 7dd4, 7c00) + 1d8
    fe264240 __1cG_start6Fpv_0_ (3dd8a8, 3b62, fe3be000, 0, 4f24, 4c00) + 208
    ff37b01c _thread_start (3dd8a8, 0, 0, 0, 0, 0) + 40
    -----------------  lwp# 18 / thread# 17  --------------------
    ff29f428 ___lwp_cond_wait (65b7a0, 65b788, ef681128, fe4123c4, ff2968f4, ef681120) + 8
    ff296a7c _lwp_cond_timedwait (2ea2b88, 44b36759, ef681248, 65b788, 65b7a0, ff2969e4) + 98
    fdeb4974 __1cNObjectMonitorEwait6MxipnGThread__v_ (120400, fe406ef0, fe4238d8, fe3be000, 65b550, 120420) + 7a8
    fdeb5978 __1cSObjectSynchronizerEwait6FnGHandle_xpnGThread__v_ (120402, 86d4, 0, 65b550, 8400, fe3be000) + e8
    fdeb5628 JVM_MonitorWait (0, 3dcdb4, 65b550, fe412d84, 0, 1) + 31c
    f840e22c ???????? (91, ef6814b4, ef681430, ffffff80, ef6, 0)
    f840e1d0 ???????? (f1631648, b6, 0, c, f00d7f28, ef681448)
    f8405764 ???????? (f007ea58, fe4163d4, 0, f8419354, 8800, ef681508)
    f8405764 ???????? (2000, 2, 0, f84195a0, ef60e110, ef6815a0)
    f8400218 ???????? (ef681688, ef681888, a, f456d6b8, f840ba20, ef6817a0)
    fdd9a808 __1cJJavaCallsLcall_helper6FpnJJavaValue_pnMmethodHandle_pnRJavaCallArguments_pnGThread__v_ (1, 65b550, ef681798, ef681698, 4, ef681888) + 5a0
    fdec319c __1cJJavaCallsMcall_virtual6FpnJJavaValue_nGHandle_nLKlassHandle_nMsymbolHandle_5pnGThread__v_ (7a9c, 65b550, 3dcda0, 3dcdac, 3dcda8, f007ea58) + 188
    fdee2700 __1cMthread_entry6FpnKJavaThread_pnGThread__v_ (f402fc58, 65b550, 3dd18c, fe424640, fe424710, fe424130) + 134
    fdede29c __1cKJavaThreadDrun6M_v_ (65b550, 18, fe40c790, 6c00, 7dd4, 7c00) + 1d8
    fe264240 __1cG_start6Fpv_0_ (65b550, 3b62, fe3be000, 0, 4f24, 4c00) + 208
    ff37b01c _thread_start (65b550, 0, 0, 0, 0, 0) + 40
    --------------------------  thread# 3  --------------------
    ff36d9b8 _reap_wait (ff390980, 1e924, 0, ff38c000, 0, 0) + 38
    ff36d710 _reaper  (ff38ce00, ff392708, ff390980, ff38cdd8, 1, fe400000) + 38
    ff37b01c _thread_start (0, 0, 0, 0, 0, 0) + 40

  • Which tool is the best one for debug java program?

    thanks for your help

    Eclipse 2.0 (www.eclipse.org) debugger can take advantage of the Java 1.4 JVM Hot Swap facility allowing you to modify your code while debugging it so you can try something, change it, try it again without having to even restart your program. Great for server-side development.
    Not a suprising facility since Eclipse is positioned by IBM as the replacement of Visual Age for Java which will not see further development. And unlike VAJ, it does not depend upon extremely tight coupling between IDE and JVM, it uses a file-based approach rather than the single workspace file mechanism of VAJ, allow it to have greater integration with many, many tools.
    Its free, open source and is supported by a consortium including IBM, BEA WebGain, Borland, Red Hat, SuSe, Rational, TogetherSoft and Object Technology. They position it as the Apache of development tools. Some of these guys obviously want to sell you their high end plugins (Rational XDE is one good example) while others seem to be best servered by making sure their own IDE's fully support Eclipse plugins (like Borland and WebGain).
    Chuck

  • Utility for compiling java files with options.

    i want to create a utility application in java which can compile a java source file with options like -d , -classpath,-help etc.
    there is a java.lang.Compiler class which can be used to compile a source file but how can i supply compile time options?
    help.

    Welcome to the forum!
    >
    i want to create a utility application in java which can compile a java source file with options like -d , -classpath,-help etc.
    there is a java.lang.Compiler class which can be used to compile a source file but how can i supply compile time options?
    >
    Is this an interview question? An intellectual exercise to see if you can do it?
    Why do you want to do this when there is already a freely available utility, javac, that can already do all of that?
    Please provide more information and a sample user session that shows what you are really trying to accomplish.
    And the class you mentioned is not really for the purpose you say you want
    >
    The Compiler class is provided to support Java-to-native-code compilers and related services. By design, the Compiler class does nothing; it serves as a placeholder for a JIT compiler implementation.

  • Venkman Javascript Debugger for debugging an extension

    I used to debug the extension I am developing with Javascript debugger, but it no longer seems to work. It does not break and does not show me all the code from my extension.

    Thanks. I had googled, of course, but none of the hits points to a manual. Being as you thought it should, I persevered and eventually discovered one that with sufficient 'Next' links leads to
    http://developer.apple.com/library/safari/#documentation/AppleApplications/Conce ptual/SafariDeveloper_Guide/DebuggingYourWebsite/DebuggingYourWebsite.html%23//appleref/doc/uid/TP40007874-CH8-SW2
    It's not what I would call a manual, but better than nothing.

  • URGENT!!! Need help with drawImage program.

    Hi...,
    This is my first time dealing with drawImage. This is my program:
    public void init ()
    img=getImage (getDocumentBase (), "knight.gif");
    do
    row=Integer.parseInt (JOptionPane.showInputDialog ("Enter starting row: "));
    while (row<1 || row>8);
    do
    col=Integer.parseInt (JOptionPane.showInputDialog ("Enter starting col: "));
    while (col<1 || col>8);
    moves=1;
    board=new int[9][9];
    public void paint (Graphics g)
    createBoard (g);
    if (checkPos (col+1, row+1))
    board[row][col]=moves;
    g.drawImage (img, col*50, row*50, this);
    g.drawString (Integer.toString(moves), ((col*50)+25), ((row*50)+25));
    moves++;
    makeMove ();
    I just include these 2 mehtods because there is something wrong when I execute this. In the paint method, I only do the drawImage once, but I don't know why it draws twice when I execute it. And when I put the "g.drawImage" line in comment, it's doing ok.
    I hope you guys understand me.
    Please help me. Thx

    Hi JeroenBoven,
    Thanks for your help. But, this is what I put in the createBoard method.
    private void createBoard (Graphics g)
              g.setColor (Color.black);
              for (int l=1; l<=9; l++)
                   g.drawLine (50*l, 50, 50*l, 450);
                   g.drawLine (50, 50*l, 450, 50*l);
    From what I think, the createBoard only drawLines and make a 8 * 8 board.

  • Debugging Java code from c++ through JNI

    I have c++ application calling java methods through JNI. From c++ when I call the java method through JNI how do I debug the java code? It would be of great help if I get to know the settings that I need to do. I am using VC 6.0 for C++ and JBUIlder 8 for JAVA application.OS used is Windows 2000.

    Put
    _asm { int 3 } to C code in the proper place and start your java application. When C code reaches this debug break it shows a dialog to attach the debugger. Attach C debugger and debug Java and C codes.

  • Any tutorials on debugging apex apps with firefox?

    Hi
    Does any one know of any good tutorials for debugging apex applications with firefox?
    regards
    Tony

    Hi Tony,
    what do you want to debug? Javascript, APEX or PL/SQL?
    Only Javascript would be specific for Firefox, in that case I would suggest that you have a look at http://www.getfirebug.com/ it has an excellent Javascript debugger.
    Patrick
    *** New *** Oracle APEX Essentials *** http://essentials.oracleapex.info/
    My Blog, APEX Builder Plugin, ApexLib Framework: http://www.oracleapex.info/

  • Urgent - Looking for captivate developer for freelance work in South of UK

    Hi,
    We are urgently looking for some freelance developer with atleast 1-2 years of experience in Captivate 7 and atleast some experience in captivate 8. If interested can you please get in touch with me on [email protected]
    Thanks
    Ganesh

    Hi,
    I have a good experience in adobe captivate * UI Design.
    Looking forward to you reply.
    Thanks
    Puneet

  • Java using GUI's mixed with opengl... needs help...urgent....

    guys, i need help.... is anyone there have an idea about opengl...? ill attach 4 files that needs to be enhanced or debug for possible errors. to see the canvas... you should have atleast all the needed lib and jar of opengl in your pc.
    its urgent, its for our thesis actually....ill be dividing the codes with the use of (" **** ")sign...
    * Main.java
    * Created on 29 January 2007, 08:12
    * To change this template, choose Tools | Template Manager
    * and open the template in the editor.
    package longgong;
    * @author welcome
    public class Main {
        /** Creates a new instance of Main */
        public Main() {
         * @param args the command line arguments
        public static void main(String[] args) {
            // TODO code application logic here
            frmMain f = new frmMain();
    * frmMain.java
    * Created on November 10, 2006, 10:52 AM
    * To change this template, choose Tools | Template Manager
    * and open the template in the editor.
    package longgong; // create a floder named longgong and add the class inside
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import java.awt.*;
    * @author all user
    public class frmMain extends JFrame implements ActionListener, ChangeListener, ItemListener{
        JPanel pnlWest, pnlEast, pnlCenter, pnlSouth, pnlTitle, pnlSlider, pnlPlayers;
        JSlider slrSpeed;
        JList lstResults;
        String varResults [] = new String[31];
        JLabel lblPlayers, lblTitle;
        JCheckBox lblPlayer1, lblPlayer2, lblPlayer3, lblPlayer4, lblPlayer5, lblPlayer6;
        ImageIcon imgDice1;
        MyCanvas canvas;
        JButton btnStart, btnStop;
        JMenuBar menuBar;
        JMenu menuFile, menuView, menuHelp;
        JMenuItem menuNew, menuExit, menuIn, menuOut, menuHigh, menuPlay, menuAbout;
        boolean isNew = false;
        /** Creates a new instance of frmMain */
        public frmMain() {
            setLayout(new BorderLayout());
            setTitle("Longgong");
            setSize(780,600);
            canvas = new MyCanvas(getSize().width, getSize().height);
            imgDice1 = new ImageIcon("c:\\java\\images\\one.png");
            menuBar = new JMenuBar();
            menuFile = new JMenu("File");
            menuView = new JMenu("View");
            menuHelp = new JMenu("Help");
            menuNew = new JMenuItem ("New Game");
            menuNew.addActionListener(this);
            menuExit = new JMenuItem ("Exit");
            menuExit.addActionListener(this);
            menuIn = new JMenuItem ("Zoom In");
            menuIn.addActionListener(this);
            menuOut = new JMenuItem ("Zoom Out");
            menuOut.addActionListener(this);
            menuHigh = new JMenuItem ("High Score");
            menuPlay = new JMenuItem ("How To Play");
            menuPlay.addActionListener(this);
            menuAbout = new JMenuItem ("About");
            menuAbout.addActionListener(this);
            menuFile.add(menuNew);
            menuFile.add(menuExit);
            menuView.add(menuIn);
            menuView.add(menuOut);
            menuView.add(menuHigh);
            menuHelp.add(menuPlay);
            menuHelp.add(menuAbout);
            menuBar.add(menuFile);
            menuBar.add(menuView);
            menuBar.add(menuHelp);
            setJMenuBar(menuBar);
            varResults[0] = "Dice Results";
            varResults[1] = "1. 3-4-2";
            varResults[2] = "2. 3-1-4";
            varResults[3] = "3. 3-6-5";
            slrSpeed = new JSlider(0, 100, 0);
            slrSpeed.setPaintTicks(true);
            slrSpeed.setMinorTickSpacing(1);
            slrSpeed.setPaintLabels(true);
            slrSpeed.setSnapToTicks(true);
            slrSpeed.addChangeListener(this);
            slrSpeed.setEnabled(false);
            btnStart =  new JButton("Start");
            btnStart.addActionListener(this);
            btnStop =  new JButton("Stop");
            btnStop.addActionListener(this);
            pnlWest = new JPanel();
            pnlEast = new JPanel();
            pnlCenter = new JPanel();
            pnlSouth = new JPanel();
            pnlTitle = new JPanel();
            pnlSlider = new JPanel();       
            pnlPlayers = new JPanel();
            pnlWest.setLayout(new BorderLayout());
            pnlEast.setLayout(new BorderLayout());
            pnlEast.setPreferredSize(new Dimension(100,400));
            pnlCenter.setLayout(new BorderLayout());
            pnlSouth.setLayout(new FlowLayout());
            pnlTitle.setLayout(new FlowLayout());
            pnlSlider.setLayout(new FlowLayout());       
            pnlPlayers.setLayout(new BoxLayout(pnlPlayers,BoxLayout.Y_AXIS));
            pnlPlayers.setPreferredSize(new Dimension(150,400));
            lblPlayers = new JLabel("  Players: Choice (s)");
            lblPlayer1 = new JCheckBox("None");
            lblPlayer1.addItemListener(this);
            lblPlayer2 = new JCheckBox("None");
            lblPlayer2.addItemListener(this);
            lblPlayer3 = new JCheckBox("None");
            lblPlayer3.addItemListener(this);
            lblPlayer4 = new JCheckBox("None");
            lblPlayer4.addItemListener(this);
            lblPlayer5 = new JCheckBox("None");
            lblPlayer5.addItemListener(this);
            lblPlayer6 = new JCheckBox("None");
            lblPlayer6.addItemListener(this);
            lstResults = new JList(varResults);
            pnlPlayers.add(lblPlayers);
            pnlPlayers.add(lblPlayer1);
            pnlPlayers.add(lblPlayer2);
            pnlPlayers.add(lblPlayer3);
            pnlPlayers.add(lblPlayer4);
            pnlPlayers.add(lblPlayer5);
            pnlPlayers.add(lblPlayer6);
            pnlSlider.add(slrSpeed);
            pnlSlider.add(btnStart);
            pnlSlider.add(btnStop);
            pnlEast.add(BorderLayout.CENTER, lstResults);
            pnlCenter.add(BorderLayout.SOUTH, pnlSlider);    
            pnlCenter.add(BorderLayout.CENTER, canvas);    
            lblTitle = new JLabel("LONGGONG DICE GAME SIMULATION");
            pnlTitle.add(lblTitle);
            getContentPane().add(BorderLayout.NORTH,pnlTitle);   
            getContentPane().add(BorderLayout.WEST,pnlPlayers);
            getContentPane().add(BorderLayout.EAST,pnlEast);
            getContentPane().add(BorderLayout.CENTER, pnlCenter);
            getContentPane().add(BorderLayout.SOUTH,pnlSouth);
            setResizable(false);
            canvas.start();
            show();       
        //name change when player is selected
        public void itemStateChanged(ItemEvent e) {
        Object source = e.getItemSelectable();
        int choice;
        if (source == lblPlayer1) {
            if (lblPlayer1.isSelected()) {
                frmChoices fchoices = new frmChoices(lblPlayer1);
        if (source == lblPlayer2) {
            if (lblPlayer2.isSelected()) {
                frmChoices fchoices = new frmChoices(lblPlayer2);
        if (source == lblPlayer3) {
            if (lblPlayer3.isSelected()) {
                frmChoices fchoices = new frmChoices(lblPlayer3);
        if (source == lblPlayer4) {
            if (lblPlayer4.isSelected()) {
                frmChoices fchoices = new frmChoices(lblPlayer4);
        if (source == lblPlayer5) {
            if (lblPlayer5.isSelected()) {
                frmChoices fchoices = new frmChoices(lblPlayer5);
        if (source == lblPlayer6) {
            if (lblPlayer6.isSelected()) {
                frmChoices fchoices = new frmChoices(lblPlayer6);
           // if (e.getStateChange() == ItemEvent.DESELECTED)
            //...make a note of it...
        //slider speed change
        public void stateChanged(ChangeEvent e){      
               canvas.speed(slrSpeed.getValue());
        public void actionPerformed (ActionEvent e){
            if (e.getActionCommand().equals ("Exit")){
                System.exit (0);     
            //connects to frmNew
            if (e.getActionCommand().equals ("New Game")){
                frmNew n = new frmNew(this);   
                lblPlayer1.setText("None");
                lblPlayer2.setText("None");
                lblPlayer3.setText("None");
                lblPlayer4.setText("None");
                lblPlayer5.setText("None");
                lblPlayer6.setText("None");
                isNew = true;
                lblPlayer1.setSelected(false);
                lblPlayer2.setSelected(false);
                lblPlayer3.setSelected(false);
                lblPlayer4.setSelected(false);
                lblPlayer5.setSelected(false);
                lblPlayer6.setSelected(false);
            if (e.getActionCommand().equals ("Start")){
               slrSpeed.setEnabled(true);
               canvas.setRandomDicePosition();
            if (e.getActionCommand().equals ("Stop")){
                slrSpeed.setValue(0);
                slrSpeed.setEnabled(false);
            //ADDED
             if (e.getActionCommand().equals ("New Game")){
               frmNew n = new frmNew(this);           
            if (e.getActionCommand().equals ("Zoom In")){
                canvas.zoomIn();          
            if (e.getActionCommand().equals ("Zoom Out")){
                canvas.zoomOut();          
            if (e.getActionCommand().equals ("How To Play")){
                frmPlay p = new frmPlay();           
            if (e.getActionCommand().equals ("About")){
                frmAbout a = new frmAbout();           
    package longgong;
    // Java  classes
       import java.awt.*;
       import java.awt.event.*;
       import java.net.URL;
    // GL4Java classes
       import gl4java.GLContext;
       import gl4java.awt.GLAnimCanvas;
       import gl4java.utils.textures.*;
       class MyCanvas extends GLAnimCanvas implements KeyListener, MouseListener
         // holds information on which keys are held down.
          boolean[] keys=new boolean[256];
          float     xrot;                    // X Rotation ( NEW )
          float     yrot;                    // Y Rotation ( NEW )
          float     zrot;                    // Z Rotation ( NEW )
          float[] diceRotX = new float[3];
          float[] diceRotY = new float[3];
          float[] diceRotZ = new float[3];
          float[] diceTranX = new float[3];
          float[] diceTranY = new float[3];
          float[] diceTranZ = new float[3];     
          float speedValue;
          Dice[] D;
          float zoom = -15.0f;
          public MyCanvas(int w, int h)
             super(w, h);
             //Registers this canvas to process keyboard events, and Mouse events
             addKeyListener(this);
             addMouseListener(this);  
             setAnimateFps(60); // seemed to be essential in getting any performance
             speedValue=0.0f;
             diceTranX[0] = -2.0f;
             diceTranY[0] = 2.0f;
             diceTranZ[0] = zoom;
             diceTranX[1] = 2.0f;
             diceTranY[1] = 1.0f;
             diceTranZ[1] = zoom;
             diceTranX[2] = 0.0f;
             diceTranY[2] = -2.0f;
             diceTranZ[2] = zoom;
          public void zoomIn(){
              zoom=zoom+1.0f;
           public void zoomOut(){
              zoom=zoom-1.0f;
          public void speed(float s){
            speedValue=s/100;
        /** void reshape(int width, int height) Called after the first paint command.  */  
          public void reshape(int width, int height)
             if(height==0)height=1;
             gl.glViewport(0, 0, width, height);                       // Reset The Current Viewport And Perspective Transformation
             gl.glMatrixMode(GL_PROJECTION);                           // Select The Projection Matrix
             gl.glLoadIdentity();                                      // Reset The Projection Matrix
             glu.gluPerspective(45.0f, width / height, 0.1f, 100.0f);  // Calculate The Aspect Ratio Of The Window
             gl.glMatrixMode(GL_MODELVIEW);                            // Select The Modelview Matrix
             gl.glLoadIdentity();                                      // Reset The ModalView Matrix     
       /** void preInit() Called just BEFORE the GL-Context is created. */  
          public void preInit()
          { doubleBuffer = true; stereoView = false; // buffering but not stereoview
          public void setRandomDicePosition(){
             for (int i=0; i<3; i++){
               D.setCoordinates(diceRotX[i],diceRotY[i],diceRotZ[i],diceTranX[i],diceTranY[i],diceTranZ[i]);
    D[i].getRandomDice();
    /** void init() Called just AFTER the GL-Context is created. */
    public void init()
    //float width = (float)getSize().width;
    //float height = (float)getSize().height;
    D = new Dice[5];
    D[0] = new Dice(this);
    D[1] = new Dice(this);
    D[2] = new Dice(this);
    //initialize dice location
    for (int i=0; i<3; i++){
    D[i].setCoordinates(diceRotX[i],diceRotY[i],diceRotZ[i],diceTranX[i],diceTranY[i],diceTranZ[i]);
    D[i].getRandomDice();
    gl.glEnable(GL_TEXTURE_2D);                              //Enable Texture Mapping ( NEW )
    gl.glShadeModel(GL_SMOOTH); //Enables Smooth Color Shading
    gl.glClearColor(0.0f, 0.0f, 0.0f, 0.0f); //This Will Clear The Background Color To Black
    gl.glClearDepth(1.0); //Enables Clearing Of The Depth Buffer
    gl.glEnable(GL_DEPTH_TEST); //Enables Depth Testing
    gl.glDepthFunc(GL_LEQUAL); //The Type Of Depth Test To Do
    gl.glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST); //Really Nice Perspective Calculations
    public void DrawBoundaries(){
    double x,y;
    double radius = 5.0f;
    gl.glLoadIdentity();                                             // Reset The View
    gl.glTranslatef(0.0f,0.0f,zoom-1.0f);
    gl.glRotatef(90.0f,0.0f,0.0f,1.0f);
    gl.glColor3f(0.6f,0.3f,0.3f);
    gl.glBegin(gl.GL_POLYGON);
    // angle is
    // x = radius * (cosine of angle)
    // y = radius * (sine of angle)
    for (double a=0; a<360; a++) {
    x = radius * (Math.cos(a));
    y = radius * (Math.sin(a));
    gl.glVertex3d(x, y, 0.0f);
    gl.glEnd();
    gl.glColor3f(1.0f,1.0f,1.0f);
    public void DrawGLScene()
    gl.glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);     // Clear The Screen And The Depth Buffer
    DrawBoundaries();
    for (int i=0; i<3; i++){
    D[i].startDiceMovement();
    D[i].setTz(zoom);
    D[i].setSpeed(speedValue);
    D[i].drawDice();
    for (int i=0; i<3; i++){
    //start of loop
    if(i!=0){    
    if (D[0].getMoveLeft()==true){        
    if ( (D[0].getTx()>=D[i].getTx()-1.0f) && (D[0].getTx()<=D[i].getTx()) ){
    if (D[0].getMoveLeft()== true) D[0].setMoveLeft(false);
    else D[0].setMoveLeft(true);
    }else{
    if ( (D[0].getTx()-1<=D[i].getTx()) && (D[0].getTx()-1>=D[i].getTx()-1) ){
    if (D[0].getMoveLeft()== true) D[0].setMoveLeft(false);
    else D[0].setMoveLeft(true);
    if (D[0].getMoveUp()==true){        
    if ( (D[0].getTy()>=D[i].getTy()-1.0f) && (D[0].getTy()<=D[i].getTy()) ){
    if (D[0].getMoveUp()== true) D[0].setMoveUp(false);
    else D[0].setMoveUp(true);
    }else{
    if ( (D[0].getTy()-1<=D[i].getTy()) && (D[0].getTy()-1>=D[i].getTy()-1) ){
    if (D[0].getMoveUp()== true) D[0].setMoveUp(false);
    else D[0].setMoveUp(true);
    }//end of if i!=0
    if(i!=1){    
    if (D[1].getMoveLeft()==true){        
    if ( (D[1].getTx()>=D[i].getTx()-1.0f) && (D[1].getTx()<=D[i].getTx()) ){
    if (D[1].getMoveLeft()== true) D[1].setMoveLeft(false);
    else D[1].setMoveLeft(true);
    }else{
    if ( (D[1].getTx()-1<=D[i].getTx()) && (D[1].getTx()-1>=D[i].getTx()-1) ){
    if (D[1].getMoveLeft()== true) D[1].setMoveLeft(false);
    else D[1].setMoveLeft(true);
    if (D[1].getMoveUp()==true){        
    if ( (D[1].getTy()>=D[i].getTy()-1.0f) && (D[1].getTy()<=D[i].getTy()) ){
    if (D[1].getMoveUp()== true) D[1].setMoveUp(false);
    else D[1].setMoveUp(true);
    }else{
    if ( (D[1].getTy()-1<=D[i].getTy()) && (D[1].getTy()-1>=D[i].getTy()-1) ){
    if (D[1].getMoveUp()== true) D[1].setMoveUp(false);
    else D[1].setMoveUp(true);
    }//end of if i!=1
    if(i!=2){    
    if (D[2].getMoveLeft()==true){        
    if ( (D[2].getTx()>=D[i].getTx()-1.0f) && (D[2].getTx()<=D[i].getTx()) ){
    if (D[2].getMoveLeft()== true) D[2].setMoveLeft(false);
    else D[2].setMoveLeft(true);
    }else{
    if ( (D[2].getTx()-1<=D[i].getTx()) && (D[2].getTx()-1>=D[i].getTx()-1) ){
    if (D[2].getMoveLeft()== true) D[2].setMoveLeft(false);
    else D[2].setMoveLeft(true);
    if (D[2].getMoveUp()==true){        
    if ( (D[2].getTy()>=D[i].getTy()-1.0f) && (D[2].getTy()<=D[i].getTy()) ){
    if (D[2].getMoveUp()== true) D[2].setMoveUp(false);
    else D[2].setMoveUp(true);
    }else{
    if ( (D[2].getTy()-1<=D[i].getTy()) && (D[2].getTy()-1>=D[i].getTy()-1) ){
    if (D[2].getMoveUp()== true) D[2].setMoveUp(false);
    else D[2].setMoveUp(true);
    }//end of if i!=2
    //end of loop for i
    /** void display() Draw to the canvas. */
    // Purely a Java thing. Simple calls DrawGLScene once GL is Initialized
    public void display()
    for(int i=0;i<3;i++){
    glj.gljMakeCurrent(); //Ensure GL is initialised correctly
    DrawGLScene();
    glj.gljSwap(); //Swap buffers
    glj.gljFree(); // release GL
    // Key Listener events
    public void keyTyped(KeyEvent e){
    public void keyPressed(KeyEvent e){
    switch(e.getKeyCode())
    //Kill app
    case KeyEvent.VK_ESCAPE:
    System.exit(0);
    break;
    default :
    if(e.getKeyCode()<250) // only interested in first 250 key codes, are there more?
    keys[e.getKeyCode()]=true;     
    break;
    public void keyReleased(KeyEvent e){
    if(e.getKeyCode()<250) // only interested in first 250 key codes, are there more?
    keys[e.getKeyCode()]=false;
    // mouse listener events
    public void mouseEntered( MouseEvent evt )
    Component comp = evt.getComponent();
    if( comp.equals(this ) )
    //requestFocus();
    public void mouseExited( MouseEvent evt ){
    public void mousePressed( MouseEvent evt ){
    public void mouseReleased( MouseEvent evt ){
    public void mouseClicked( MouseEvent evt )
    Component comp = evt.getComponent();
    if( comp.equals(this ) )
    requestFocus();
    * Dice.java
    * Created on 08 February 2007, 22:26
    * To change this template, choose Tools | Template Manager
    * and open the template in the editor.
    package longgong;
    import java.net.URL;
    import gl4java.GLContext;
    import gl4java.awt.GLAnimCanvas;
    import gl4java.utils.textures.*;
    * @author welcome
    public class Dice {
          GLAnimCanvas glCanvas ;
          URL codeBase;
          int[]texture1 = new int[1]; //Storage for one texture ( NEW )    
          int[]texture2 = new int[1]; //Storage for one texture ( NEW )    
          int[]texture3 = new int[1]; //Storage for one texture ( NEW )    
          int[]texture4 = new int[1]; //Storage for one texture ( NEW )    
          int[]texture5 = new int[1]; //Storage for one texture ( NEW )    
          int[]texture6 = new int[1]; //Storage for one texture ( NEW )    
          float rx;
          float ry;
          float rz;
          float tx;
          float ty;
          float tz;
          float speed;
          boolean txMoveLeft;
          boolean tyMoveUp;
          boolean tzMoveFront;
        /** Creates a new instance of Dice */
        public Dice(GLAnimCanvas g) {
            glCanvas = g;       
            if(!LoadGLTexture("c:\\java\\images\\one.png",texture1)){
                System.out.println("Failed to load Textures,Bailing!");
                System.exit(0);
            if(!LoadGLTexture("c:\\java\\images\\two.png",texture2)){
                System.out.println("Failed to load Textures,Bailing!");
                System.exit(0);
            if(!LoadGLTexture("c:\\java\\images\\three.png",texture3)){
                System.out.println("Failed to load Textures,Bailing!");
                System.exit(0);
            if(!LoadGLTexture("c:\\java\\images\\four.png",texture4)){
                System.out.println("Failed to load Textures,Bailing!");
                System.exit(0);
            if(!LoadGLTexture("c:\\java\\images\\five.png",texture5)){
                System.out.println("Failed to load Textures,Bailing!");
                System.exit(0);
            if(!LoadGLTexture("c:\\java\\images\\six.png",texture6)){
                System.out.println("Failed to load Textures,Bailing!");
                System.exit(0);
            txMoveLeft = true;
            tyMoveUp = true;
         public boolean inCircleBoundaries(float x, float y, float radius)
            float r;       
            r = (float)Math.sqrt((x*x) + (y*y));
            if (r <= radius)
                return  true;
            else
                return false;
        public void setCoordinates(float corRx,float corRy,float corRz,float corTx,float corTy,float corTz){
            rx = corRx;
            ry = corRy;
            rz = corRz;
            tx = corTx;
            ty = corTy;
            tz = corTz;
        public void getRandomDice(){
            int num = (int)(Math.random() * 6);
            if (num==1){
                rx=0.0f;
                ry=0.0f;
                rz=0.0f;
            else if (num==2){
                rx=90.0f;
                ry=0.0f;
                rz=0.0f;
            else if (num==3){
                rx=0.0f;
                ry=-90.0f;
                rz=0.0f;
            else if (num==4){
                rx=0.0f;
                ry=90.0f;
                rz=0.0f;
            else if (num==5){
                rx=-90.0f;
                ry=0.0f;
                rz=0.0f;
            else{
                rx=180.0f;
                ry=0.0f;
                rz=0.0f;
        public float getTx(){
            return tx+0.5f;
        public float getTy(){
            return ty+0.5f;
        public float getTz(){
            return tz+0.5f;
        public void setTz(float z){
            tz=z;
        public boolean getMoveLeft(){
            return txMoveLeft;
        public boolean getMoveUp(){
            return tyMoveUp;
        public void setMoveLeft(boolean m){
            txMoveLeft = m;
        public void setMoveUp(boolean m){
            tyMoveUp = m;
        public void startDiceMovement(){    
            if (txMoveLeft==true) {
                tx+=speed;           
            else {
                tx-=speed;
            if (tyMoveUp==true) {
                ty+=speed;
            else {
                ty-=speed;
            ry+=(speed*4);
            rx+=(speed*4);
            //rz+=(speed*2);
            //tx+=speed;
            //ty+=speed;
            //tz+=speed;             
         if (inCircleBoundaries(tx,ty,3.5f)==false) {  
            if (tx>=3.0f) txMoveLeft = false;
            if (tx<=-3.0f) txMoveLeft = true;
            if (ty>=3.0f) tyMoveUp = false;
            if (ty<=-3.0f) tyMoveUp = true;
        public void setSpeed(float s){
            speed = s;
         public void drawDice(){        
             glCanvas.gl.glLoadIdentity();                                             // Reset The View
             glCanvas.gl.glTranslatef(tx,ty,tz);
             glCanvas.gl.glRotatef(rx,1.0f,0.0f,0.0f);
             glCanvas.gl.glRotatef(ry,0.0f,1.0f,0.0f);
             glCanvas.gl.glRotatef(rz,0.0f,0.0f,1.0f);
             glCanvas.gl.glBindTexture(glCanvas.gl.GL_TEXTURE_2D, texture1[0]);        
             glCanvas.gl.glBegin(glCanvas.gl.GL_QUADS);        
                // Front Face
             glCanvas.gl.glTexCoord2f(0.0f, 0.0f); glCanvas.gl.glVertex3f(-1.0f, -1.0f,  1.0f);
             glCanvas.gl.glTexCoord2f(1.0f, 0.0f); glCanvas.gl.glVertex3f( 1.0f, -1.0f,  1.0f);
             glCanvas.gl.glTexCoord2f(1.0f, 1.0f); glCanvas.gl.glVertex3f( 1.0f,  1.0f,  1.0f);
             glCanvas.gl.glTexCoord2f(0.0f, 1.0f); glCanvas.gl.glVertex3f(-1.0f,  1.0f,  1.0f);
             glCanvas.gl.glEnd();
             glCanvas.gl.glBindTexture(glCanvas.gl.GL_TEXTURE_2D, texture6[0]);
             glCanvas.gl.glBegin(glCanvas.gl.GL_QUADS);        
               // Back Face          
             glCanvas.gl.glTexCoord2f(1.0f, 0.0f); glCanvas.gl.glVertex3f(-1.0f, -1.0f, -1.0f);
             glCanvas.gl.glTexCoord2f(1.0f, 1.0f); glCanvas.gl.glVertex3f(-1.0f,  1.0f, -1.0f);
             glCanvas.gl.glTexCoord2f(0.0f, 1.0f); glCanvas.gl.glVertex3f( 1.0f,  1.0f, -1.0f);
             glCanvas.gl.glTexCoord2f(0.0f, 0.0f); glCanvas.gl.glVertex3f( 1.0f, -1.0f, -1.0f);
             glCanvas.gl.glEnd();
             glCanvas.gl.glBindTexture(glCanvas.gl.GL_TEXTURE_2D, texture2[0]);
             glCanvas.gl.glBegin(glCanvas.gl.GL_QUADS);        
                // Top Face
             glCanvas.gl.glTexCoord2f(0.0f, 1.0f); glCanvas.gl.glVertex3f(-1.0f,  1.0f, -1.0f);
             glCanvas.gl.glTexCoord2f(0.0f, 0.0f); glCanvas.gl.glVertex3f(-1.0f,  1.0f,  1.0f);
             glCanvas.gl.glTexCoord2f(1.0f, 0.0f); glCanvas.gl.glVertex3f( 1.0f,  1.0f,  1.0f);
             glCanvas.gl.glTexCoord2f(1.0f, 1.0f); glCanvas.gl.glVertex3f( 1.0f,  1.0f, -1.0f);
             glCanvas.gl.glEnd();
             glCanvas.gl.glBindTexture(glCanvas.gl.GL_TEXTURE_2D, texture5[0]);
             glCanvas.gl.glBegin(glCanvas.gl.GL_QUADS);        
                // Bottom Face
             glCanvas.gl.glTexCoord2f(1.0f, 1.0f); glCanvas.gl.glVertex3f(-1.0f, -1.0f, -1.0f);
             glCanvas.gl.glTexCoord2f(0.0f, 1.0f); glCanvas.gl.glVertex3f( 1.0f, -1.0f, -1.0f);
             glCanvas.gl.glTexCoord2f(0.0f, 0.0f); glCanvas.gl.glVertex3f( 1.0f, -1.0f,  1.0f);
             glCanvas.gl.glTexCoord2f(1.0f, 0.0f); glCanvas.gl.glVertex3f(-1.0f, -1.0f,  1.0f);
             glCanvas.gl.glEnd();
             glCanvas.gl.glBindTexture(glCanvas.gl.GL_TEXTURE_2D, texture3[0]);
             glCanvas.gl.glBegin(glCanvas.gl.GL_QUADS);        
                // Right face
             glCanvas.gl.glTexCoord2f(1.0f, 0.0f); glCanvas.gl.glVertex3f( 1.0f, -1.0f, -1.0f);
             glCanvas.gl.glTexCoord2f(1.0f, 1.0f); glCanvas.gl.glVertex3f( 1.0f,  1.0f, -1.0f);
             glCanvas.gl.glTexCoord2f(0.0f, 1.0f); glCanvas.gl.glVertex3f( 1.0f,  1.0f,  1.0f);
             glCanvas.gl.glTexCoord2f(0.0f, 0.0f); glCanvas.gl.glVertex3f( 1.0f, -1.0f,  1.0f);
             glCanvas.gl.glEnd();
             glCanvas.gl.glBindTexture(glCanvas.gl.GL_TEXTURE_2D, texture4[0]);
             glCanvas.gl.glBegin(glCanvas.gl.GL_QUADS);        
                // Left Face
             glCanvas.gl.glTexCoord2f(0.0f, 0.0f); glCanvas.gl.glVertex3f(-1.0f, -1.0f, -1.0f);
             glCanvas.gl.glTexCoord2f(1.0f, 0.0f); glCanvas.gl.glVertex3f(-1.0f, -1.0f,  1.0f);
             glCanvas.gl.glTexCoord2f(1.0f, 1.0f); glCanvas.gl.glVertex3f(-1.0f,  1.0f,  1.0f);
             glCanvas.gl.glTexCoord2f(0.0f, 1.0f); glCanvas.gl.glVertex3f(-1.0f,  1.0f, -1.0f);
             glCanvas.gl.glEnd();
          public boolean LoadGLTexture(String fileName, int textureNumber[])
             PngTextureLoader texLoader = new PngTextureLoader(glCanvas.gl, glCanvas.glu);
             if(codeBase!=null)  
                texLoader.readTexture(codeBase, fileName);
             else
                texLoader.readTexture(fileName);
             if(texLoader.isOk())
                //Create Texture
                glCanvas.gl.glGenTextures(1, textureNumber);
                glCanvas.gl.glBindTexture(glCanvas.gl.GL_TEXTURE_2D, textureNumber[0]);
                glCanvas.gl.glTexParameteri(glCanvas.gl.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        

    ill attach 4 files that needs to be
    enhanced or debug for possible errors. i hate to break it to you, but even if you post this for the seventh time, finding and fixing errors in your code remains your task.

  • Urgent :-Need Help in DOtnet Dll integration with CFM 8. for error "java.lang.NullPointerException"

    Hi Everyone,
    I am trying to intergrate Dotnet DLL with coldfusion. The basic perpose of this DLL is putting value in cache.
    My code is working fine on my local machine but it giving me problem on live server.
    It is throwing "java.lang.NullPointerException" error.
    Description of task:-
    DLL:-
    made in : Dotnet 3.0
    Functions:-
    setCache:- setting a string into cache.
    getCache:- getting value from cache.
    ClearCache:- Clearing all value from Cache.
    Local Machine:-
    OS: window server 2003
    Coldfusion version :MX8
    coldfusion Product level:-Developer
    Result:-Task is working fine.No error what so ever.
    Live server:-
    OS: window server 2003
    Coldfusion version :MX8
    coldfusion Product level:-Standred
    Result:-Task is throwing error "java.lang.NullPointerException"

    Thanks for your response, but surely if the .NET Services was not running how can CF instantiate and dump the object with all the correct methods?
    Anyway for some strange reason there is no Coldfusion .NET service in my services control panel even though I am running CF8. I have since downloaded the .NET service installer, run it and done a restart but I can still see no such service and the error continues?
    I am running CF8 Dev on IIS 6 – Window XP pro and here is debug
    java.lang.NullPointerException
                   at com.jnbridge.jnbcore.clientTransports.d$b.close(Unknown Source)
                   at java.net.Socket.<init>(Socket.java:368)
                   at java.net.Socket.<init>(Socket.java:209)
                   at com.jnbridge.jnbcore.clientTransports.d$b.<init>(Unknown Source)
                   at com.jnbridge.jnbcore.clientTransports.d.if(Unknown Source)
                   at com.jnbridge.jnbcore.clientTransports.c.a(Unknown Source)
                   at com.jnbridge.jnbcore.clientTransports.f.a(Unknown Source)
                   at com.jnbridge.jnbcore.DotNetSideProxy.int(Unknown Source)
                   at com.jnbridge.jnbcore.DotNetSideProxy.getObjectStaticProperty(Unknown Source)
                   at System.Environment.Get_CurrentDirectory()
                   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                   at java.lang.reflect.Method.invoke(Method.java:597)
                   at coldfusion.runtime.java.JavaProxy.invoke(JavaProxy.java:87)
                   at coldfusion.runtime.dotnet.DotNetProxy.invoke(DotNetProxy.java:38)
                   at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2272)
                   at cftestDotNet2ecfm215937280.runPage(C:\Inetpub\wwwroot\his_clothing\testDotNet.cfm:20)
                   at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:196)
                   at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:370)
                   at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)
                   at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:273)
                   at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
                   at coldfusion.filter.PathFilter.invoke(PathFilter.java:86)
                   at coldfusion.filter.LicenseFilter.invoke(LicenseFilter.java:27)
                   at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70)
                   at coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:74)
                   at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
                   at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
                   at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46)
                   at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
                   at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
                   at coldfusion.CfmServlet.service(CfmServlet.java:175)
                   at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
                   at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)
                   at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)
                   at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
                   at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
                   at jrun.servlet.FilterChain.service(FilterChain.java:101)
                   at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
                   at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
                   at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)
                   at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
                   at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)
                   at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)
                   at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
                   at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)
                   at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

  • Complete working code for Gmail POP3 & SMTP with SSL - Java mail API

    Finally, your code-hunt has come to an end!!!!
    I am presenting you the complete solution (with code) to send and retrieve you mails to & from GMAIL using SMTP and POP3 with SSL & Authenticaion enabled. [Even starters & newbies like me, can easy try, test & understand - But first download & add JAR's of Java Mail API & Java Activation Framework to Netbeans Library Manager]
    Download Java Mail API here
    http://java.sun.com/products/javamail/
    Read Java Mail FAQ's here
    http://java.sun.com/products/javamail/FAQ.html
    Download Java Activation Framework [JAF]
    http://java.sun.com/products/javabeans/jaf/downloads/index.html
    Also, The POP program retrieves the mail sent with SMTP program :) [MOST IMPORTANT & LARGELY IN DEMAND]okey.. first things first... all of your thanks goes to the following and not a s@!te to me :)
    hail Java !!
    hail Java mail API !!
    hail Java forums !!
    hail Java-tips.org !!
    hail Netbeans !!
    Thanks to all coders who helped me by getting the code to work in one piece.
    special thanks to "bshannon" - The dude who runs this forum from 97!!I am just as happy as you will be when you execute the below code!! [my 13 hours of tweaking & code hunting has paid off!!]
    Now here it is...I only present you the complete solution!!
    START OF PROGRAM 1
    SENDING A MAIL FROM GMAIL ACCOUNT USING SMTP [STARTTLS (SSL)] PROTOCOL OF JAVA MAIL APINote on Program 1:
    1. In the code below replace USERNAME & PASSWORD with your respective GMAIL account username and its corresponding password!
    2. Use the code to make your Gmail client [jsp/servlets whatever]
    //Mail.java - smtp sending starttls (ssl) authentication enabled
    //1.Open a new Java class in netbeans (default package of the project) and name it as "Mail.java"
    //2.Copy paste the entire code below and save it.
    //3.Right click on the file name in the left side panel and click "compile" then click "Run"
    import javax.mail.*;
    import javax.mail.internet.*;
    import java.util.*;
    public class Main
        String  d_email = "[email protected]",
                d_password = "PASSWORD",
                d_host = "smtp.gmail.com",
                d_port  = "465",
                m_to = "[email protected]",
                m_subject = "Testing",
                m_text = "Hey, this is the testing email.";
        public Main()
            Properties props = new Properties();
            props.put("mail.smtp.user", d_email);
            props.put("mail.smtp.host", d_host);
            props.put("mail.smtp.port", d_port);
            props.put("mail.smtp.starttls.enable","true");
            props.put("mail.smtp.auth", "true");
            //props.put("mail.smtp.debug", "true");
            props.put("mail.smtp.socketFactory.port", d_port);
            props.put("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
            props.put("mail.smtp.socketFactory.fallback", "false");
            SecurityManager security = System.getSecurityManager();
            try
                Authenticator auth = new SMTPAuthenticator();
                Session session = Session.getInstance(props, auth);
                //session.setDebug(true);
                MimeMessage msg = new MimeMessage(session);
                msg.setText(m_text);
                msg.setSubject(m_subject);
                msg.setFrom(new InternetAddress(d_email));
                msg.addRecipient(Message.RecipientType.TO, new InternetAddress(m_to));
                Transport.send(msg);
            catch (Exception mex)
                mex.printStackTrace();
        public static void main(String[] args)
            Main blah = new Main();
        private class SMTPAuthenticator extends javax.mail.Authenticator
            public PasswordAuthentication getPasswordAuthentication()
                return new PasswordAuthentication(d_email, d_password);
    END OF PROGRAM 1-----
    START OF PROGRAM 2
    RETRIVE ALL THE MAILS FROM GMAIL INBOX USING Post Office Protocol POP3 [SSL] PROTOCOL OF JAVA MAIL APINote:
    1.Log into your gmail account via webmail [http://mail.google.com/]
    2.Click on "settings" and select "Mail Forwarding & POP3/IMAP"
    3.Select "enable POP for all mail" and "save changes"
    4.In the code below replace USERNAME & PASSWORD with your respective GMAIL account username and its corresponding password!
    PROGRAM 2 - PART 1 - Main.java
    //1.Open a new Java class file in the default package
    //2.Copy paste the below code and rename it to Mail.java
    //3.Compile and execute this code.
    public class Main {
        /** Creates a new instance of Main */
        public Main() {
         * @param args the command line arguments
        public static void main(String[] args) {
            try {
                GmailUtilities gmail = new GmailUtilities();
                gmail.setUserPass("[email protected]", "PASSWORD");
                gmail.connect();
                gmail.openFolder("INBOX");
                int totalMessages = gmail.getMessageCount();
                int newMessages = gmail.getNewMessageCount();
                System.out.println("Total messages = " + totalMessages);
                System.out.println("New messages = " + newMessages);
                System.out.println("-------------------------------");
    //Uncomment the below line to print the body of the message. Remember it will eat-up your bandwidth if you have 100's of messages.            //gmail.printAllMessageEnvelopes();
                gmail.printAllMessages();
            } catch(Exception e) {
                e.printStackTrace();
                System.exit(-1);
    END OF PART 1
    PROGRAM 2 - PART 2 - GmailUtilities.java
    //1.Open a new Java class in the project (default package)
    //2.Copy paste the below code
    //3.Compile - Don't execute this[Run]
    import com.sun.mail.pop3.POP3SSLStore;
    import java.io.File;
    import java.io.IOException;
    import java.io.InputStream;
    import java.util.Date;
    import java.util.Properties;
    import javax.mail.Address;
    import javax.mail.FetchProfile;
    import javax.mail.Flags;
    import javax.mail.Folder;
    import javax.mail.Message;
    import javax.mail.MessagingException;
    import javax.mail.Multipart;
    import javax.mail.Part;
    import javax.mail.Session;
    import javax.mail.Store;
    import javax.mail.URLName;
    import javax.mail.internet.ContentType;
    import javax.mail.internet.InternetAddress;
    import javax.mail.internet.MimeBodyPart;
    import javax.mail.internet.ParseException;
    public class GmailUtilities {
        private Session session = null;
        private Store store = null;
        private String username, password;
        private Folder folder;
        public GmailUtilities() {
        public void setUserPass(String username, String password) {
            this.username = username;
            this.password = password;
        public void connect() throws Exception {
            String SSL_FACTORY = "javax.net.ssl.SSLSocketFactory";
            Properties pop3Props = new Properties();
            pop3Props.setProperty("mail.pop3.socketFactory.class", SSL_FACTORY);
            pop3Props.setProperty("mail.pop3.socketFactory.fallback", "false");
            pop3Props.setProperty("mail.pop3.port",  "995");
            pop3Props.setProperty("mail.pop3.socketFactory.port", "995");
            URLName url = new URLName("pop3", "pop.gmail.com", 995, "",
                    username, password);
            session = Session.getInstance(pop3Props, null);
            store = new POP3SSLStore(session, url);
            store.connect();
        public void openFolder(String folderName) throws Exception {
            // Open the Folder
            folder = store.getDefaultFolder();
            folder = folder.getFolder(folderName);
            if (folder == null) {
                throw new Exception("Invalid folder");
            // try to open read/write and if that fails try read-only
            try {
                folder.open(Folder.READ_WRITE);
            } catch (MessagingException ex) {
                folder.open(Folder.READ_ONLY);
        public void closeFolder() throws Exception {
            folder.close(false);
        public int getMessageCount() throws Exception {
            return folder.getMessageCount();
        public int getNewMessageCount() throws Exception {
            return folder.getNewMessageCount();
        public void disconnect() throws Exception {
            store.close();
        public void printMessage(int messageNo) throws Exception {
            System.out.println("Getting message number: " + messageNo);
            Message m = null;
            try {
                m = folder.getMessage(messageNo);
                dumpPart(m);
            } catch (IndexOutOfBoundsException iex) {
                System.out.println("Message number out of range");
        public void printAllMessageEnvelopes() throws Exception {
            // Attributes & Flags for all messages ..
            Message[] msgs = folder.getMessages();
            // Use a suitable FetchProfile
            FetchProfile fp = new FetchProfile();
            fp.add(FetchProfile.Item.ENVELOPE);       
            folder.fetch(msgs, fp);
            for (int i = 0; i < msgs.length; i++) {
                System.out.println("--------------------------");
                System.out.println("MESSAGE #" + (i + 1) + ":");
                dumpEnvelope(msgs);
    public void printAllMessages() throws Exception {
    // Attributes & Flags for all messages ..
    Message[] msgs = folder.getMessages();
    // Use a suitable FetchProfile
    FetchProfile fp = new FetchProfile();
    fp.add(FetchProfile.Item.ENVELOPE);
    folder.fetch(msgs, fp);
    for (int i = 0; i < msgs.length; i++) {
    System.out.println("--------------------------");
    System.out.println("MESSAGE #" + (i + 1) + ":");
    dumpPart(msgs[i]);
    public static void dumpPart(Part p) throws Exception {
    if (p instanceof Message)
    dumpEnvelope((Message)p);
    String ct = p.getContentType();
    try {
    pr("CONTENT-TYPE: " + (new ContentType(ct)).toString());
    } catch (ParseException pex) {
    pr("BAD CONTENT-TYPE: " + ct);
    * Using isMimeType to determine the content type avoids
    * fetching the actual content data until we need it.
    if (p.isMimeType("text/plain")) {
    pr("This is plain text");
    pr("---------------------------");
    System.out.println((String)p.getContent());
    } else {
    // just a separator
    pr("---------------------------");
    public static void dumpEnvelope(Message m) throws Exception {       
    pr(" ");
    Address[] a;
    // FROM
    if ((a = m.getFrom()) != null) {
    for (int j = 0; j < a.length; j++)
    pr("FROM: " + a[j].toString());
    // TO
    if ((a = m.getRecipients(Message.RecipientType.TO)) != null) {
    for (int j = 0; j < a.length; j++) {
    pr("TO: " + a[j].toString());
    // SUBJECT
    pr("SUBJECT: " + m.getSubject());
    // DATE
    Date d = m.getSentDate();
    pr("SendDate: " +
    (d != null ? d.toString() : "UNKNOWN"));
    static String indentStr = " ";
    static int level = 0;
    * Print a, possibly indented, string.
    public static void pr(String s) {
    System.out.print(indentStr.substring(0, level * 2));
    System.out.println(s);
    }END OF PART 2
    END OF PROGRAM 2
    P.S: CHECKING !!
    STEP 1.
    First compile and execute the PROGRAM 1 with your USERNAME & PASSWORD. This will send a mail to your own account.
    STEP 2.
    Now compile both PART 1 & PART 2 of PROGRAM 2. Then, execute PART 1 - Main.java. This will retrive the mail sent in step 1. njoy! :)
    In future, I hope this is added to the demo programs of the Java Mail API download package.
    This is for 3 main reasons...
    1. To prevent a lot of silly questions being posted on this forum [like the ones I did :(].
    2. To give the first time Java Mail user with a real time working example without code modification [code has to use command line args like the demo programs - for instant results].
    3. Also, this is what google has to say..
    "The Gmail Team is committed to making sure you always can access your mail. That's why we're offering POP access and auto-forwarding. Both features are free for all Gmail users and we have no plans to charge for them in the future."
    http://mail.google.com/support/bin/answer.py?answer=13295
    I guess bshannon & Java Mail team is hearing this....
    Again, Hurray and thanks for helping me make it!! cheers & no more frowned faces!!
    (: (: (: (: (: GO JCODERS GO!! :) :) :) :) :)
    codeace
    -----                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    

    Thanks for the reply,
    I did checked by enabling session debuging and also checked pop settings it's enabled for all
    mails, I tried deleting some very old messages and now the message count is changed to 310.
    This may be the problem with gmail.
    Bellow is the output i got,
    DEBUG: setDebug: JavaMail version 1.4ea
    DEBUG: getProvider() returning javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc]
    DEBUG POP3: connecting to host "pop.gmail.com", port 995, isSSL false
    S: +OK Gpop ready for requests from 121.243.255.240 n22pf5432603pof.2
    C: USER [email protected]
    S: +OK send PASS
    C: PASS my_password
    S: +OK Welcome.
    C: STAT
    S: +OK 310 26900234
    Custom output: messageCount : 310
    C: QUIT
    S: +OK Farewell.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • There is insufficient memory for the Java Runtime Environment to continue,JVM crash with high virtual memory on windows

    Hello,
    Virtual Memory of tomcat(version is 6.0.35) is very high and jvm crash even though we decrease java heap size from 1024M to 500M.
    Below is whole log. Please give me some suggestion. Thanks.
    # There is insufficient memory for the Java Runtime Environment to continue.
    # Native memory allocation (malloc) failed to allocate 666390 bytes for jbyte in C:\BUILD_AREA\jdk6_45\hotspot\src\share\vm\prims\jni.cpp
    # Possible reasons:
    #   The system is out of physical RAM or swap space
    #   In 32 bit mode, the process size limit was hit
    # Possible solutions:
    #   Reduce memory load on the system
    #   Increase physical memory or swap space
    #   Check if swap backing store is full
    #   Use 64 bit Java on a 64 bit OS
    #   Decrease Java heap size (-Xmx/-Xms)
    #   Decrease number of Java threads
    #   Decrease Java thread stack sizes (-Xss)
    #   Set larger code cache with -XX:ReservedCodeCacheSize=
    # This output file may be truncated or incomplete.
    #  Out of Memory Error (memory/allocation.inline.hpp:44), pid=9084, tid=8100
    # JRE version: 6.0_45-b06
    # Java VM: Java HotSpot(TM) Client VM (20.45-b01 mixed mode, sharing windows-x86 )
    ---------------  T H R E A D  ---------------
    Current thread (0x045a5400):  JavaThread "Thread-69" [_thread_in_vm, id=8100, stack(0x090e0000,0x09120000)]
    Stack: [0x090e0000,0x09120000],  sp=0x0911f56c,  free space=253k
    Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
    [error occurred during error reporting (printing native stack), id 0xe0000000]
    Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
    J  com.neva.ExternalObject.toExternalHeap2([BI)I
    J  com.neva.ExternalObject.<init>([BII)V
    J  com.neva.Coroutine.addArgUnicodeString(Ljava/lang/String;)V
    j  com.neva.COMBSTR.<init>(Ljava/lang/String;)V+29
    j  com.neva.COMVariant.<init>(Ljava/lang/String;)V+19
    J  com.cpcus.jaru.protocol.impl.combridge.wizardgen.IJaruProtocol1.registerInterest(Ljava/lang/String;Ljava/lang/String;[ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;)V
    j  sun.reflect.GeneratedMethodAccessor844.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+170
    J  sun.reflect.DelegatingMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
    J  java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
    J  com.cpcus.jaru.util.concurent.ComMethodExecutor$ExecutableMethod.call()Ljava/lang/Object;
    J  EDU.oswego.cs.dl.util.concurrent.FutureResult$1.run()V
    J  com.cpcus.jaru.util.concurent.QueuedExecutor$MyRunLoop.run()V
    j  java.lang.Thread.run()V+11
    v  ~StubRoutines::call_stub
    ---------------  P R O C E S S  ---------------
    Java Threads: ( => current thread )
      0x044fe000 JavaThread "Thread-1099" daemon [_thread_blocked, id=8048, stack(0x4c4d0000,0x4c510000)]
      0x044f8c00 JavaThread "Thread-1098" daemon [_thread_blocked, id=1744, stack(0x46e50000,0x46e90000)]
      0x044cd000 JavaThread "Thread-1095" daemon [_thread_in_native, id=6176, stack(0x00bb0000,0x00c20000)]
      0x04c7f800 JavaThread "Thread-1094" daemon [_thread_blocked, id=7352, stack(0x0d340000,0x0d380000)]
      0x04c7dc00 JavaThread "Thread-1093" daemon [_thread_in_native, id=1364, stack(0x0bbd0000,0x0bc10000)]
      0x044fcc00 JavaThread "http-80-72" daemon [_thread_blocked, id=1580, stack(0x42110000,0x42150000)]
      0x044fc000 JavaThread "http-80-71" daemon [_thread_blocked, id=2996, stack(0x0cd10000,0x0cd50000)]
      0x044fb800 JavaThread "http-80-70" daemon [_thread_in_native, id=5004, stack(0x0cc90000,0x0ccd0000)]
      0x044fd800 JavaThread "http-80-69" daemon [_thread_blocked, id=8776, stack(0x0f950000,0x0f990000)]
      0x044fb400 JavaThread "http-80-68" daemon [_thread_blocked, id=8440, stack(0x0f8d0000,0x0f910000)]
      0x044f8000 JavaThread "http-80-67" daemon [_thread_in_native, id=5516, stack(0x0f850000,0x0f890000)]
      0x044fd400 JavaThread "http-80-66" daemon [_thread_blocked, id=876, stack(0x0f6d0000,0x0f710000)]
      0x044fac00 JavaThread "http-80-65" daemon [_thread_in_native, id=8332, stack(0x0f690000,0x0f6d0000)]
      0x044fa800 JavaThread "http-80-64" daemon [_thread_in_native, id=6848, stack(0x0f610000,0x0f650000)]
      0x044fc800 JavaThread "http-80-63" daemon [_thread_blocked, id=5996, stack(0x0f590000,0x0f5d0000)]
      0x044fa000 JavaThread "http-80-62" daemon [_thread_blocked, id=4876, stack(0x0cf90000,0x0cfd0000)]
      0x044f9c00 JavaThread "http-80-61" daemon [_thread_blocked, id=5532, stack(0x0f550000,0x0f590000)]
      0x044f9400 JavaThread "http-80-60" daemon [_thread_in_native, id=1764, stack(0x0f4d0000,0x0f510000)]
      0x044f8800 JavaThread "http-80-59" daemon [_thread_blocked, id=6108, stack(0x0f450000,0x0f490000)]
      0x044f7400 JavaThread "http-80-58" daemon [_thread_in_native, id=6892, stack(0x0d400000,0x0d440000)]
      0x04ab3000 JavaThread "http-80-57" daemon [_thread_in_native, id=6932, stack(0x0d2c0000,0x0d300000)]
      0x0436b400 JavaThread "http-80-56" daemon [_thread_blocked, id=644, stack(0x0d240000,0x0d280000)]
      0x0436a000 JavaThread "http-80-55" daemon [_thread_in_native, id=6772, stack(0x0d1c0000,0x0d200000)]
      0x04c80c00 JavaThread "http-80-54" daemon [_thread_in_native, id=2732, stack(0x0d140000,0x0d180000)]
      0x04c80800 JavaThread "http-80-53" daemon [_thread_in_native, id=4172, stack(0x0d0c0000,0x0d100000)]
      0x04c80000 JavaThread "http-80-52" daemon [_thread_blocked, id=2512, stack(0x0d040000,0x0d080000)]
      0x044cdc00 JavaThread "http-80-51" daemon [_thread_in_native, id=6260, stack(0x0ced0000,0x0cf10000)]
      0x04c7d400 JavaThread "http-80-50" daemon [_thread_blocked, id=4336, stack(0x0ce90000,0x0ced0000)]
      0x0436d400 JavaThread "http-80-49" daemon [_thread_blocked, id=2484, stack(0x0ce10000,0x0ce50000)]
      0x0436dc00 JavaThread "http-80-48" daemon [_thread_in_native, id=8396, stack(0x0c840000,0x0c880000)]
      0x0436cc00 JavaThread "http-80-47" daemon [_thread_blocked, id=8300, stack(0x0c9c0000,0x0ca00000)]
      0x0436c800 JavaThread "H2 Log Writer FRAMEDB" daemon [_thread_blocked, id=7556, stack(0x0cc10000,0x0cc50000)]
      0x0436bc00 JavaThread "H2 File Lock Watchdog C:\Program Files (x86)\Tomcat\webapps\emerson\vault\dbframe\h2\framedb.lock.db" daemon [_thread_blocked, id=7236, stack(0x0c940000,0x0c980000)]
      0x0436c000 JavaThread "http-80-46" daemon [_thread_in_native, id=5128, stack(0x0c8c0000,0x0c900000)]
      0x0436b000 JavaThread "http-80-45" daemon [_thread_blocked, id=7860, stack(0x0c0c0000,0x0c100000)]
      0x0436a800 JavaThread "http-80-44" daemon [_thread_in_native, id=8244, stack(0x0bfc0000,0x0c000000)]
      0x04ab2800 JavaThread "http-80-43" daemon [_thread_blocked, id=6656, stack(0x0c7c0000,0x0c800000)]
      0x04ab2000 JavaThread "http-80-42" daemon [_thread_blocked, id=8412, stack(0x0c740000,0x0c780000)]
      0x04ab1c00 JavaThread "http-80-41" daemon [_thread_in_native, id=6300, stack(0x0c6c0000,0x0c700000)]
      0x04ab1400 JavaThread "http-80-40" daemon [_thread_blocked, id=4312, stack(0x0c640000,0x0c680000)]
      0x04ab1000 JavaThread "http-80-39" daemon [_thread_blocked, id=5480, stack(0x0c5c0000,0x0c600000)]
      0x04ab0800 JavaThread "http-80-38" daemon [_thread_blocked, id=8648, stack(0x0c540000,0x0c580000)]
      0x04ab0400 JavaThread "http-80-37" daemon [_thread_blocked, id=8008, stack(0x0c4c0000,0x0c500000)]
      0x04aafc00 JavaThread "http-80-36" daemon [_thread_in_native, id=8496, stack(0x0c340000,0x0c380000)]
      0x04aaf400 JavaThread "http-80-35" daemon [_thread_blocked, id=6616, stack(0x0c2c0000,0x0c300000)]
      0x044cf000 JavaThread "http-80-34" daemon [_thread_blocked, id=3852, stack(0x0c240000,0x0c280000)]
      0x044ce800 JavaThread "http-80-33" daemon [_thread_blocked, id=8828, stack(0x0c1c0000,0x0c200000)]
      0x044ce400 JavaThread "http-80-32" daemon [_thread_blocked, id=4076, stack(0x0c140000,0x0c180000)]
      0x044cc400 JavaThread "http-80-31" daemon [_thread_blocked, id=888, stack(0x0be90000,0x0bed0000)]
      0x044cbc00 JavaThread "http-80-30" daemon [_thread_blocked, id=8524, stack(0x0be10000,0x0be50000)]
      0x044cd800 JavaThread "AWT-Windows" daemon [_thread_in_native, id=6500, stack(0x0c040000,0x0c080000)]
      0x044ccc00 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=8888, stack(0x0bf40000,0x0bf80000)]
      0x045a5800 JavaThread "MonitorThreadCountsAndMemory" daemon [_thread_blocked, id=760, stack(0x09160000,0x091a0000)]
      0x04742400 JavaThread "Thread-116" daemon [_thread_blocked, id=8208, stack(0x0bdd0000,0x0be10000)]
      0x04742c00 JavaThread "Thread-115" daemon [_thread_blocked, id=6160, stack(0x0bd30000,0x0bd70000)]
      0x04742000 JavaThread "TP-Monitor" daemon [_thread_blocked, id=4676, stack(0x0b730000,0x0b770000)]
      0x04741800 JavaThread "TP-Processor4" daemon [_thread_in_native, id=7904, stack(0x0b6b0000,0x0b6f0000)]
      0x04741000 JavaThread "TP-Processor3" daemon [_thread_blocked, id=3892, stack(0x0b630000,0x0b670000)]
      0x04740c00 JavaThread "TP-Processor2" daemon [_thread_blocked, id=8200, stack(0x0b5b0000,0x0b5f0000)]
      0x04740400 JavaThread "TP-Processor1" daemon [_thread_blocked, id=8240, stack(0x0b530000,0x0b570000)]
      0x04740000 JavaThread "http-80-29" daemon [_thread_blocked, id=8952, stack(0x0b4b0000,0x0b4f0000)]
      0x0473f800 JavaThread "http-80-28" daemon [_thread_in_native, id=5804, stack(0x0b430000,0x0b470000)]
      0x0473f400 JavaThread "http-80-27" daemon [_thread_blocked, id=8768, stack(0x0b3b0000,0x0b3f0000)]
      0x0473ec00 JavaThread "http-80-26" daemon [_thread_in_native, id=8428, stack(0x0b330000,0x0b370000)]
      0x0473e400 JavaThread "http-80-25" daemon [_thread_blocked, id=6328, stack(0x0b2b0000,0x0b2f0000)]
      0x0473e000 JavaThread "http-80-24" daemon [_thread_in_native, id=7856, stack(0x0b230000,0x0b270000)]
      0x0473d800 JavaThread "http-80-23" daemon [_thread_in_native, id=8212, stack(0x0b1b0000,0x0b1f0000)]
      0x0473d400 JavaThread "http-80-22" daemon [_thread_blocked, id=7572, stack(0x0b130000,0x0b170000)]
      0x0473cc00 JavaThread "http-80-21" daemon [_thread_in_native, id=4112, stack(0x0b0b0000,0x0b0f0000)]
      0x0473c800 JavaThread "http-80-20" daemon [_thread_in_native, id=1788, stack(0x0b030000,0x0b070000)]
      0x0473c000 JavaThread "http-80-19" daemon [_thread_blocked, id=6804, stack(0x0afb0000,0x0aff0000)]
      0x0473b800 JavaThread "http-80-18" daemon [_thread_in_native, id=1600, stack(0x0af30000,0x0af70000)]
      0x0473b400 JavaThread "http-80-17" daemon [_thread_in_native, id=5728, stack(0x0aeb0000,0x0aef0000)]
      0x04acc400 JavaThread "http-80-16" daemon [_thread_blocked, id=8728, stack(0x0ae30000,0x0ae70000)]
      0x04acbc00 JavaThread "http-80-15" daemon [_thread_blocked, id=5868, stack(0x0adb0000,0x0adf0000)]
      0x04acb800 JavaThread "http-80-14" daemon [_thread_blocked, id=6976, stack(0x0ad30000,0x0ad70000)]
      0x04acb000 JavaThread "http-80-13" daemon [_thread_blocked, id=6168, stack(0x0acb0000,0x0acf0000)]
      0x04acac00 JavaThread "http-80-12" daemon [_thread_blocked, id=2592, stack(0x0ac30000,0x0ac70000)]
      0x04aca400 JavaThread "http-80-11" daemon [_thread_in_native, id=7936, stack(0x0abb0000,0x0abf0000)]
      0x04aca000 JavaThread "http-80-10" daemon [_thread_in_native, id=7532, stack(0x0ab30000,0x0ab70000)]
      0x04ac9800 JavaThread "http-80-9" daemon [_thread_blocked, id=7704, stack(0x0aab0000,0x0aaf0000)]
      0x04ac9400 JavaThread "http-80-8" daemon [_thread_in_native, id=8852, stack(0x0aa30000,0x0aa70000)]
      0x04ac8c00 JavaThread "http-80-7" daemon [_thread_blocked, id=5052, stack(0x0a9b0000,0x0a9f0000)]
      0x04ac8400 JavaThread "http-80-6" daemon [_thread_blocked, id=5932, stack(0x0a930000,0x0a970000)]
      0x04ac8000 JavaThread "http-80-5" daemon [_thread_blocked, id=8992, stack(0x0a8b0000,0x0a8f0000)]
      0x04ac7800 JavaThread "http-80-4" daemon [_thread_in_native, id=6396, stack(0x0a830000,0x0a870000)]
      0x04ac7400 JavaThread "http-80-3" daemon [_thread_in_native, id=8764, stack(0x0a7b0000,0x0a7f0000)]
      0x04ac6c00 JavaThread "http-80-2" daemon [_thread_in_native, id=2608, stack(0x0a730000,0x0a770000)]
      0x04ac6800 JavaThread "http-80-1" daemon [_thread_in_native, id=5736, stack(0x0a6b0000,0x0a6f0000)]
      0x04ac6000 JavaThread "http-80-Acceptor-0" daemon [_thread_in_native, id=5912, stack(0x0a630000,0x0a670000)]
      0x04ac5800 JavaThread "ContainerBackgroundProcessor[StandardEngine[Catalina]]" daemon [_thread_blocked, id=6984, stack(0x0a5b0000,0x0a5f0000)]
      0x04ac5400 JavaThread "Thread-79" [_thread_in_native, id=1512, stack(0x0a530000,0x0a570000)]
      0x04ac4c00 JavaThread "QuartzScheduler_JaruQuartzSchedulerUser-3_MisfireHandler" [_thread_blocked, id=7460, stack(0x0a4b0000,0x0a4f0000)]
      0x0479f800 JavaThread "QuartzScheduler_JaruQuartzSchedulerSystem-2_MisfireHandler" [_thread_blocked, id=7164, stack(0x0a430000,0x0a470000)]
      0x0479f400 JavaThread "JaruQuartzSchedulerUser_QuartzSchedulerThread" [_thread_blocked, id=8972, stack(0x0a3b0000,0x0a3f0000)]
      0x0479ec00 JavaThread "JaruQuartzSchedulerUser_Worker-4" [_thread_blocked, id=4032, stack(0x0a330000,0x0a370000)]
      0x0479e400 JavaThread "JaruQuartzSchedulerUser_Worker-3" [_thread_blocked, id=7432, stack(0x0a2b0000,0x0a2f0000)]
      0x0479e000 JavaThread "JaruQuartzSchedulerUser_Worker-2" [_thread_blocked, id=7932, stack(0x0a230000,0x0a270000)]
      0x0479d800 JavaThread "JaruQuartzSchedulerUser_Worker-1" [_thread_blocked, id=4896, stack(0x0a1b0000,0x0a1f0000)]
      0x0479d400 JavaThread "JaruQuartzSchedulerSystem_QuartzSchedulerThread" [_thread_blocked, id=7380, stack(0x0a130000,0x0a170000)]
      0x0479cc00 JavaThread "JaruQuartzSchedulerSystem_Worker-9" [_thread_blocked, id=5416, stack(0x0a0b0000,0x0a0f0000)]
      0x0479c800 JavaThread "JaruQuartzSchedulerSystem_Worker-8" [_thread_blocked, id=5432, stack(0x0a030000,0x0a070000)]
      0x0479c000 JavaThread "JaruQuartzSchedulerSystem_Worker-7" [_thread_blocked, id=7812, stack(0x09fb0000,0x09ff0000)]
      0x0479b800 JavaThread "JaruQuartzSchedulerSystem_Worker-6" [_thread_blocked, id=8296, stack(0x09f30000,0x09f70000)]
      0x0479b400 JavaThread "JaruQuartzSchedulerSystem_Worker-5" [_thread_blocked, id=5216, stack(0x09eb0000,0x09ef0000)]
      0x0479ac00 JavaThread "JaruQuartzSchedulerSystem_Worker-4" [_thread_blocked, id=8616, stack(0x09e30000,0x09e70000)]
      0x0479a800 JavaThread "JaruQuartzSchedulerSystem_Worker-3" [_thread_blocked, id=9108, stack(0x09db0000,0x09df0000)]
      0x0479a000 JavaThread "JaruQuartzSchedulerSystem_Worker-2" [_thread_blocked, id=7928, stack(0x09d30000,0x09d70000)]
      0x04799c00 JavaThread "JaruQuartzSchedulerSystem_Worker-1" [_thread_blocked, id=5344, stack(0x09cb0000,0x09cf0000)]
      0x04799400 JavaThread "DefaultQuartzScheduler_QuartzSchedulerThread" [_thread_blocked, id=5288, stack(0x09c30000,0x09c70000)]
      0x04798c00 JavaThread "DefaultQuartzScheduler_Worker-10" [_thread_blocked, id=6200, stack(0x09bb0000,0x09bf0000)]
      0x04798800 JavaThread "DefaultQuartzScheduler_Worker-9" [_thread_blocked, id=9068, stack(0x09b30000,0x09b70000)]
      0x04798000 JavaThread "DefaultQuartzScheduler_Worker-8" [_thread_blocked, id=8576, stack(0x09ab0000,0x09af0000)]
      0x045abc00 JavaThread "DefaultQuartzScheduler_Worker-7" [_thread_blocked, id=2504, stack(0x09a30000,0x09a70000)]
      0x045ab800 JavaThread "DefaultQuartzScheduler_Worker-6" [_thread_blocked, id=7820, stack(0x099b0000,0x099f0000)]
      0x045ab000 JavaThread "DefaultQuartzScheduler_Worker-5" [_thread_blocked, id=4604, stack(0x09930000,0x09970000)]
      0x045aa800 JavaThread "DefaultQuartzScheduler_Worker-4" [_thread_blocked, id=3076, stack(0x098b0000,0x098f0000)]
      0x045aa400 JavaThread "DefaultQuartzScheduler_Worker-3" [_thread_blocked, id=8392, stack(0x09830000,0x09870000)]
      0x045a9c00 JavaThread "DefaultQuartzScheduler_Worker-2" [_thread_blocked, id=476, stack(0x097b0000,0x097f0000)]
      0x045a9800 JavaThread "DefaultQuartzScheduler_Worker-1" [_thread_blocked, id=9024, stack(0x09730000,0x09770000)]
      0x045a9000 JavaThread "JaruQuartzScheduler_QuartzSchedulerThread" [_thread_blocked, id=7576, stack(0x00820000,0x00860000)]
      0x045a8c00 JavaThread "Thread-75" [_thread_blocked, id=2132, stack(0x096b0000,0x096f0000)]
      0x045a8400 JavaThread "TacAlarmMon" [_thread_blocked, id=7244, stack(0x09630000,0x09670000)]
      0x045a7c00 JavaThread "Thread-74" [_thread_blocked, id=2728, stack(0x095b0000,0x095f0000)]
      0x045a7800 JavaThread "MonConnMgr3002" [_thread_in_native, id=7444, stack(0x09530000,0x09570000)]
      0x045a7000 JavaThread "Timer-1" [_thread_blocked, id=8272, stack(0x094b0000,0x094f0000)]
      0x045a6c00 JavaThread "Thread-72" [_thread_blocked, id=6512, stack(0x09430000,0x09470000)]
      0x045a6400 JavaThread "MonConnMgr3001" [_thread_in_native, id=5284, stack(0x093b0000,0x093f0000)]
      0x045a6000 JavaThread "Timer-0" [_thread_blocked, id=2932, stack(0x09330000,0x09370000)]
    =>0x045a5400 JavaThread "Thread-69" [_thread_in_native_trans, id=8100, stack(0x090e0000,0x09120000)]
      0x045a4c00 JavaThread "Thread-68" [_thread_blocked, id=7160, stack(0x09060000,0x090a0000)]
      0x045a4400 JavaThread "Thread-67" [_thread_blocked, id=2212, stack(0x08fe0000,0x09020000)]
      0x04875400 JavaThread "Thread-66" [_thread_blocked, id=7180, stack(0x08f60000,0x08fa0000)]
      0x04875000 JavaThread "Thread-65" [_thread_blocked, id=2672, stack(0x08ee0000,0x08f20000)]
      0x04874800 JavaThread "Thread-64" [_thread_blocked, id=8456, stack(0x08e60000,0x08ea0000)]
      0x04874000 JavaThread "Thread-63" [_thread_blocked, id=7708, stack(0x08de0000,0x08e20000)]
      0x04873c00 JavaThread "Thread-62" [_thread_blocked, id=9204, stack(0x08d60000,0x08da0000)]
      0x04873400 JavaThread "Thread-61" [_thread_blocked, id=1496, stack(0x08ce0000,0x08d20000)]
      0x04873000 JavaThread "Thread-60" [_thread_blocked, id=3480, stack(0x08c60000,0x08ca0000)]
      0x04872800 JavaThread "Thread-59" [_thread_blocked, id=7740, stack(0x08be0000,0x08c20000)]
      0x04872400 JavaThread "Thread-58" [_thread_blocked, id=3496, stack(0x08b60000,0x08ba0000)]
      0x04871c00 JavaThread "Thread-57" [_thread_blocked, id=4892, stack(0x08ae0000,0x08b20000)]
      0x04871400 JavaThread "Thread-56" [_thread_blocked, id=5640, stack(0x08a60000,0x08aa0000)]
      0x04871000 JavaThread "Thread-55" [_thread_blocked, id=8120, stack(0x089e0000,0x08a20000)]
      0x04870800 JavaThread "Thread-54" [_thread_blocked, id=5388, stack(0x08960000,0x089a0000)]
      0x04870400 JavaThread "Thread-53" [_thread_blocked, id=7072, stack(0x088e0000,0x08920000)]
      0x0486fc00 JavaThread "Thread-52" [_thread_blocked, id=7184, stack(0x08860000,0x088a0000)]
      0x0486f800 JavaThread "Thread-51" [_thread_blocked, id=8760, stack(0x087e0000,0x08820000)]
      0x0486f000 JavaThread "Thread-50" [_thread_blocked, id=2380, stack(0x08760000,0x087a0000)]
      0x0486e800 JavaThread "Thread-49" [_thread_blocked, id=3616, stack(0x086e0000,0x08720000)]
      0x0486e400 JavaThread "Thread-48" [_thread_blocked, id=5056, stack(0x08660000,0x086a0000)]
      0x0486dc00 JavaThread "Thread-47" [_thread_blocked, id=5468, stack(0x085e0000,0x08620000)]
      0x0485a000 JavaThread "Thread-46" [_thread_blocked, id=8556, stack(0x08560000,0x085a0000)]
      0x04859c00 JavaThread "Thread-45" [_thread_blocked, id=3656, stack(0x084e0000,0x08520000)]
      0x04859400 JavaThread "Thread-44" [_thread_blocked, id=8924, stack(0x08460000,0x084a0000)]
      0x04858c00 JavaThread "Thread-43" [_thread_blocked, id=7536, stack(0x083e0000,0x08420000)]
      0x04858800 JavaThread "Thread-42" [_thread_blocked, id=4368, stack(0x08360000,0x083a0000)]
      0x04858000 JavaThread "Thread-41" [_thread_blocked, id=8488, stack(0x082e0000,0x08320000)]
      0x04857c00 JavaThread "Thread-40" [_thread_blocked, id=6112, stack(0x08260000,0x082a0000)]
      0x04857400 JavaThread "Thread-39" [_thread_blocked, id=6060, stack(0x081e0000,0x08220000)]
      0x04857000 JavaThread "Thread-38" [_thread_blocked, id=9200, stack(0x08160000,0x081a0000)]
      0x04856800 JavaThread "Thread-37" [_thread_blocked, id=5476, stack(0x080e0000,0x08120000)]
      0x04856000 JavaThread "Thread-36" [_thread_blocked, id=2828, stack(0x08060000,0x080a0000)]
      0x04855c00 JavaThread "Thread-35" [_thread_blocked, id=8320, stack(0x07fe0000,0x08020000)]
      0x04855400 JavaThread "Thread-34" [_thread_blocked, id=5668, stack(0x07f60000,0x07fa0000)]
      0x04855000 JavaThread "Thread-33" [_thread_blocked, id=8316, stack(0x07ee0000,0x07f20000)]
      0x04854800 JavaThread "Thread-32" [_thread_blocked, id=4836, stack(0x07e60000,0x07ea0000)]
      0x04854400 JavaThread "Thread-31" [_thread_blocked, id=964, stack(0x07de0000,0x07e20000)]
      0x04853c00 JavaThread "Thread-30" [_thread_blocked, id=4544, stack(0x07d60000,0x07da0000)]
      0x04853400 JavaThread "Thread-29" [_thread_blocked, id=4388, stack(0x07ce0000,0x07d20000)]
      0x04853000 JavaThread "Thread-28" [_thread_blocked, id=7204, stack(0x07c60000,0x07ca0000)]
      0x04852800 JavaThread "Thread-27" [_thread_blocked, id=864, stack(0x07be0000,0x07c20000)]
      0x0482f800 JavaThread "Thread-26" [_thread_blocked, id=6928, stack(0x07b60000,0x07ba0000)]
      0x0482f400 JavaThread "Thread-25" [_thread_blocked, id=7692, stack(0x07ae0000,0x07b20000)]
      0x0482ec00 JavaThread "Thread-24" [_thread_blocked, id=7196, stack(0x07a60000,0x07aa0000)]
      0x0482e400 JavaThread "Thread-23" [_thread_blocked, id=7116, stack(0x079e0000,0x07a20000)]
      0x0482e000 JavaThread "Thread-22" [_thread_blocked, id=4332, stack(0x07960000,0x079a0000)]
      0x0482d800 JavaThread "Thread-21" [_thread_blocked, id=6780, stack(0x078e0000,0x07920000)]
      0x0482d400 JavaThread "Thread-20" [_thread_blocked, id=5700, stack(0x07860000,0x078a0000)]
      0x0482cc00 JavaThread "Thread-19" [_thread_blocked, id=6116, stack(0x077e0000,0x07820000)]
      0x0482c800 JavaThread "Thread-18" [_thread_blocked, id=7824, stack(0x07760000,0x077a0000)]
      0x0482c000 JavaThread "Thread-17" [_thread_blocked, id=9096, stack(0x076e0000,0x07720000)]
      0x0482b800 JavaThread "Thread-16" [_thread_blocked, id=9144, stack(0x07660000,0x076a0000)]
      0x0482b400 JavaThread "Thread-15" [_thread_blocked, id=5336, stack(0x075e0000,0x07620000)]
      0x0482ac00 JavaThread "Thread-14" [_thread_blocked, id=2076, stack(0x07560000,0x075a0000)]
      0x0482a800 JavaThread "Thread-13" [_thread_blocked, id=5300, stack(0x074e0000,0x07520000)]
      0x0482a000 JavaThread "Thread-12" [_thread_blocked, id=4912, stack(0x07460000,0x074a0000)]
      0x04829c00 JavaThread "Thread-11" [_thread_blocked, id=8512, stack(0x073e0000,0x07420000)]
      0x04829400 JavaThread "Thread-10" [_thread_blocked, id=8772, stack(0x07360000,0x073a0000)]
      0x04828c00 JavaThread "Thread-9" [_thread_blocked, id=4380, stack(0x072e0000,0x07320000)]
      0x04828800 JavaThread "Thread-8" [_thread_blocked, id=6076, stack(0x07260000,0x072a0000)]
      0x04828000 JavaThread "RMI Reaper" [_thread_blocked, id=6184, stack(0x071e0000,0x07220000)]
      0x04801c00 JavaThread "Thread-7" [_thread_blocked, id=4168, stack(0x07160000,0x071a0000)]
      0x0496a000 JavaThread "HSQLDB Timer @def14f" daemon [_thread_blocked, id=4616, stack(0x050e0000,0x05120000)]
      0x03bd6c00 JavaThread "C3P0PooledConnectionPoolManager[identityToken->2x760f905j9tmy1l1yrpa|1e2c841]-HelperThread-#2" daemon [_thread_blocked, id=4136, stack(0x05060000,0x050a0000)]
      0x03bd6400 JavaThread "C3P0PooledConnectionPoolManager[identityToken->2x760f905j9tmy1l1yrpa|1e2c841]-HelperThread-#1" daemon [_thread_blocked, id=8356, stack(0x04fe0000,0x05020000)]
      0x03a05400 JavaThread "C3P0PooledConnectionPoolManager[identityToken->2x760f905j9tmy1l1yrpa|1e2c841]-HelperThread-#0" daemon [_thread_blocked, id=5404, stack(0x04f60000,0x04fa0000)]
      0x03a04c00 JavaThread "C3P0PooledConnectionPoolManager[identityToken->2x760f905j9tmy1l1yrpa|1e2c841]-AdminTaskTimer" daemon [_thread_blocked, id=5860, stack(0x041c0000,0x04200000)]
      0x042ae000 JavaThread "GC Daemon" daemon [_thread_blocked, id=5292, stack(0x04140000,0x04180000)]
      0x03a66400 JavaThread "RMI TCP Accept-0" daemon [_thread_in_native, id=8056, stack(0x03fb0000,0x03ff0000)]
      0x03a63c00 JavaThread "RMI TCP Accept-9090" daemon [_thread_in_native, id=2664, stack(0x03f30000,0x03f70000)]
      0x03a42c00 JavaThread "RMI TCP Accept-0" daemon [_thread_in_native, id=8832, stack(0x03da0000,0x03de0000)]
      0x00f56800 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=4600, stack(0x039a0000,0x039e0000)]
      0x00f47400 JavaThread "C1 CompilerThread0" daemon [_thread_blocked, id=7060, stack(0x038f0000,0x03960000)]
      0x00f46400 JavaThread "Attach Listener" daemon [_thread_blocked, id=3928, stack(0x03870000,0x038b0000)]
      0x00f43000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=4864, stack(0x037f0000,0x03830000)]
      0x00f3c000 JavaThread "Finalizer" daemon [_thread_blocked, id=6164, stack(0x03770000,0x037b0000)]
      0x00f3a800 JavaThread "Reference Handler" daemon [_thread_blocked, id=9004, stack(0x036f0000,0x03730000)]
      0x00eba400 JavaThread "main" [_thread_in_native, id=4904, stack(0x00d80000,0x00df0000)]
    Other Threads:
      0x00efd400 VMThread [stack: 0x03640000,0x036b0000] [id=5172]
      0x03a68400 WatcherThread [stack: 0x04090000,0x04100000] [id=9092]
    VM state:synchronizing (normal execution)
    VM Mutex/Monitor currently owned by a thread:  ([mutex/lock_event])
    [0x00eb8780] Threads_lock - owner thread: 0x00efd400
    Heap
    def new generation   total 142208K, used 109631K [0x10340000, 0x1a9e0000, 0x1a9e0000)
      eden space 113792K,  90% used [0x10340000, 0x167a60c0, 0x17260000)
      from space 28416K,  24% used [0x18e20000, 0x194c9cd8, 0x1a9e0000)
      to   space 28416K,   0% used [0x17260000, 0x17260000, 0x18e20000)
    tenured generation   total 341376K, used 148495K [0x1a9e0000, 0x2f740000, 0x2f740000)
       the space 341376K,  43% used [0x1a9e0000, 0x23ae3f10, 0x23ae4000, 0x2f740000)
    compacting perm gen  total 145408K, used 59874K [0x2f740000, 0x38540000, 0x38540000)
       the space 145408K,  41% used [0x2f740000, 0x331b88a8, 0x331b8a00, 0x38540000)
        ro space 10240K,  51% used [0x38540000, 0x38a73000, 0x38a73000, 0x38f40000)
        rw space 12288K,  55% used [0x38f40000, 0x395de4f8, 0x395de600, 0x39b40000)
    Code Cache  [0x013b0000, 0x02378000, 0x033b0000)
    total_blobs=6549 nmethods=6302 adapters=179 free_code_cache=17026624 largest_free_block=384
    Dynamic libraries:
    0x00400000 - 0x00417000 C:\Program Files (x86)\Tomcat\bin\Tomcat.exe
    0x771c0000 - 0x77340000 C:\Windows\SysWOW64\ntdll.dll
    0x76ac0000 - 0x76bd0000 C:\Windows\syswow64\kernel32.dll
    0x752f0000 - 0x75336000 C:\Windows\syswow64\KERNELBASE.dll
    0x758f0000 - 0x75990000 C:\Windows\syswow64\ADVAPI32.dll
    0x75830000 - 0x758dc000 C:\Windows\syswow64\msvcrt.dll
    0x74e10000 - 0x74e29000 C:\Windows\SysWOW64\sechost.dll
    0x75710000 - 0x75800000 C:\Windows\syswow64\RPCRT4.dll
    0x74d20000 - 0x74d80000 C:\Windows\syswow64\SspiCli.dll
    0x74d10000 - 0x74d1c000 C:\Windows\syswow64\CRYPTBASE.dll
    0x75ac0000 - 0x7670a000 C:\Windows\syswow64\SHELL32.dll
    0x75290000 - 0x752e7000 C:\Windows\syswow64\SHLWAPI.dll
    0x74d80000 - 0x74e10000 C:\Windows\syswow64\GDI32.dll
    0x76760000 - 0x76860000 C:\Windows\syswow64\USER32.dll
    0x758e0000 - 0x758ea000 C:\Windows\syswow64\LPK.dll
    0x74e30000 - 0x74ecd000 C:\Windows\syswow64\USP10.dll
    0x75340000 - 0x753a0000 C:\Windows\system32\IMM32.DLL
    0x751c0000 - 0x7528c000 C:\Windows\syswow64\MSCTF.dll
    0x6d810000 - 0x6dac0000 C:\Program Files (x86)\Java\jre6\bin\client\jvm.dll
    0x74140000 - 0x74172000 C:\Windows\system32\WINMM.dll
    0x7c340000 - 0x7c396000 C:\Windows\system32\MSVCR71.dll
    0x740f0000 - 0x7413c000 C:\Windows\system32\apphelp.dll
    0x6d7c0000 - 0x6d7cc000 C:\Program Files (x86)\Java\jre6\bin\verify.dll
    0x6d330000 - 0x6d34f000 C:\Program Files (x86)\Java\jre6\bin\java.dll
    0x6d800000 - 0x6d80f000 C:\Program Files (x86)\Java\jre6\bin\zip.dll
    0x76bd0000 - 0x76d2c000 C:\Windows\syswow64\ole32.dll
    0x6d560000 - 0x6d569000 C:\Program Files (x86)\Java\jre6\bin\management.dll
    0x6d610000 - 0x6d623000 C:\Program Files (x86)\Java\jre6\bin\net.dll
    0x753e0000 - 0x75415000 C:\Windows\syswow64\WS2_32.dll
    0x75990000 - 0x75996000 C:\Windows\syswow64\NSI.dll
    0x74880000 - 0x748bc000 C:\Windows\system32\mswsock.dll
    0x747d0000 - 0x747d6000 C:\Windows\System32\wship6.dll
    0x748d0000 - 0x748e0000 C:\Windows\system32\NLAapi.dll
    0x748c0000 - 0x748d0000 C:\Windows\system32\napinsp.dll
    0x74830000 - 0x74874000 C:\Windows\system32\DNSAPI.dll
    0x74820000 - 0x74828000 C:\Windows\System32\winrnr.dll
    0x747e0000 - 0x747e5000 C:\Windows\System32\wshtcpip.dll
    0x74800000 - 0x7481c000 C:\Windows\system32\IPHLPAPI.DLL
    0x747f0000 - 0x747f7000 C:\Windows\system32\WINNSI.DLL
    0x747c0000 - 0x747c6000 C:\Windows\system32\rasadhlp.dll
    0x74780000 - 0x747b8000 C:\Windows\System32\fwpuclnt.dll
    0x74750000 - 0x74766000 C:\Windows\system32\CRYPTSP.dll
    0x744d0000 - 0x7450b000 C:\Windows\system32\rsaenh.dll
    0x74030000 - 0x7403b000 C:\Windows\system32\profapi.dll
    0x6d7a0000 - 0x6d7a8000 C:\Program Files (x86)\Java\jre6\bin\sunmscapi.dll
    0x759a0000 - 0x75abd000 C:\Windows\syswow64\CRYPT32.dll
    0x753d0000 - 0x753dc000 C:\Windows\syswow64\MSASN1.dll
    0x6d630000 - 0x6d639000 C:\Program Files (x86)\Java\jre6\bin\nio.dll
    0x10000000 - 0x10047000 C:\Windows\System32\corojdk11.dll
    0x74ed0000 - 0x74f5f000 C:\Windows\syswow64\OLEAUT32.dll
    0x75420000 - 0x754a3000 C:\Windows\syswow64\CLBCatQ.DLL
    0x744c0000 - 0x744ce000 C:\Windows\system32\RpcRtRemote.dll
    0x74180000 - 0x741df000 C:\Windows\system32\SXS.DLL
    0x0b820000 - 0x0b853000 C:\Program Files (x86)\Tomcat\bin\HASPJava.dll
    0x0b860000 - 0x0bb4d000 C:\Program Files (x86)\Tomcat\bin\hasp_windows_87368.dll
    0x74c50000 - 0x74c57000 C:\Windows\system32\WSOCK32.DLL
    0x6d000000 - 0x6d14c000 C:\Program Files (x86)\Java\jre6\bin\awt.dll
    0x73c20000 - 0x73c71000 C:\Windows\system32\WINSPOOL.DRV
    0x74430000 - 0x744b4000 C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.7601.17514_none_ec83dffa859149af\COMCTL32.dll
    0x6eb40000 - 0x6eb53000 C:\Windows\system32\DWMAPI.DLL
    0x6d230000 - 0x6d286000 C:\Program Files (x86)\Java\jre6\bin\fontmanager.dll
    0x77190000 - 0x77195000 C:\Windows\system32\PSAPI.DLL
    VM Arguments:
    jvm_args: -Dcatalina.home=C:\Program Files (x86)\Tomcat -Dcatalina.base=C:\Program Files (x86)\Tomcat -Djava.endorsed.dirs=C:\Program Files (x86)\Tomcat\endorsed -Djava.io.tmpdir=C:\Program Files (x86)\Tomcat\temp -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=C:\Program Files (x86)\Tomcat\conf\logging.properties -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=c:\progra~2\tomcat -Xms500m -Xmx500m -XX:SurvivorRatio=4 -XX:PermSize=143m -XX:MaxPermSize=143m -Xss200k -XX:+PrintGC -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -Xloggc:TomcatGarbageCollection -Dcom.sun.management.jmxremote.port=9090 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote=true
    java_command: <unknown>
    Launcher Type: generic
    Environment Variables:
    PATH=Y:\Legato\nsr\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;c:\Tivoli\IBM\ITM\bin;c:\Tivoli\IBM\ITM\InstallITM;c:\Tivoli\IBM\ITM\TMAITM6;C:\Program Files (x86)\Tomcat\lib
    USERNAME=NCDWSMNASP0101$
    OS=Windows_NT
    PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 44 Stepping 2, GenuineIntel
    ---------------  S Y S T E M  ---------------
    OS: Windows NT 6.1 , 64 bit Build 7601 Service Pack 1
    CPU:total 4 (1 cores per cpu, 1 threads per core) family 6 model 44 stepping 2, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt
    Memory: 4k page, physical 4193848k(1041944k free), swap 8385852k(5027848k free)
    vm_info: Java HotSpot(TM) Client VM (20.45-b01) for windows-x86 JRE (1.6.0_45-b06), built on Mar 26 2013 13:40:03 by "java_re" with MS VC++ 7.1 (VS2003)
    time: Sun Feb 09 19:41:33 2014
    elapsed time: 31207 seconds

    Thanks a lot.
    HASPJava.dll is used by verification  License and is invoked less and can't use a lot of native memory.
    Our business is communicating between java and COM component. In order to implement it, we used JavaCom to generate java class for COM component.
    Memory of COM component is little, but Native Memory is high.
    Who used JavaCom and did you meet this problem?
    Please give me some suggestions. Thanks a lot.

  • Problem with debug java.lang.NullPointerException

    Hi All,
    i am having a very strage issue with Flash Builder 4.5.1.
    If I create a Flex Mobile Application, i am able to debug the app with no problems.
    if I create a Flex Mobile and PHP Project, and then connect to a data service, i am not able to debug the app. i am having the following error:
    An internal error occurred during: "Launching Main_App".
    java.lang.NullPointerException
    SO: Windows 7
    Flash Builder 4.5.1
    Any ideas on this?
    Thanks a lot,
    Joe

    Hi Steven,
    I turned on debugger on oracle.jheadstart.controller.strutsadf.JhsRequestProcessor.
    The exception is rised in method :
    processActionPerform
    at statement :
    ActionForward forward = super.processActionPerform(request, response, action, form, mapping);
    I hope it is helpful.
    Cezary

Maybe you are looking for