Native call in JCVM

Hi All,
I read the specs of JCVM and i knew that the native keyword is not supported. Hence i am confusing that how the jcvm knows that whether it needs to access to native methods defined in JCRE? I don't see any flag indicating if a method is native in all cap components.
Thank you for your answer,
H. Long

user5138836 wrote:
I assume that the card chip understand C language but not java language.The chip uses native code compiled from C. The chip also understands assembly.
something is masked, it is loaded into ROM. Can it be java byte codes or only C program? Is the term "masked" also understood as "native" concept or only relevant to the type of memory that the item is loaded into?Masking is the process of loading into ROM. It can be anything.
http://en.wikipedia.org/wiki/Mask_ROM
if we can mask byte codes, and i have JCVM masked, written in C then how the JCVM finds out the "masked" byte codes to execute it?
I am concerning about the position in memory to indicate the JCVM jump pointer and load contents.I am not sure of this. I assume the mask would work roughly the same as something loaded onto EEPROM except it has to be there at fabrication time. I could be wrong about this though.
Cheers,
Shane

Similar Messages

  • Stop native call from java

    I know there are topics related to timeout, stop or kill native call but it seems there is no good answer for me.
    I have a java class as the caller to call a native C function with double arrays as input. The C function perform some kind of computation using 3rd party FORTRAN functions. If we terminate the java, how to terminate/stop/or exit the C function?
    Here is the partial of java class
    public class PolyFit {
        public native double[] polyFit(int[]iParams, double[] dParams,
                                        double[] xx, double[] yy, int col);
        static {
            try {
                System.loadLibrary("polylib");
            } catch (UnsatisfiedLinkError e) {
                System.out.println ("Failed to load polylib");
                e.printStackTrace();
        public PolyFit() {
    }The parent java class is a sub class of Thread that calls the PolyFit when running as a thread:
        int col2 = 2;
        for() { //more than 1000 pairs of inputX and inputY
            //iParams, dParams, inputX, inputY are assigned before
             PolyFit polyFit = new PolyFit();
            double[]output = polyFit .polyFit(iParams, dParams, inputX, inputY, col2);
        }Here is native C function (partial)
    #include "PolyFit.h"
    JNIEXPORT jdoubleArray JNICALL Java_org_ciit_stat_PolyFit_polyFit
                (JNIEnv *env, jobject obj, jintArray ja, jdoubleArray jda,
                jdoubleArray jdinX, jdoubleArray jdinY, jint col) {
        jdouble *output;   
        jdoubleArray dbArray = (*env)->NewDoubleArray(env, MAX);
        (*env)->SetDoubleArrayRegion(env, dbArray, MIN, MAX, output);
       free(output);
        return dbArray;
    }Every call of polyFit .polyFit() may take less than 1 millisecond to several second. In case the time exceeds a threadhold, i.e. 10 second, we want to stop the thread. However, I can't find the way to stop or exit the C function.
    Any ideas are highly appreciated.

    This is C code, and since there is no portable way to interrupt C code, there's nothing that can be done. In Unix a SIGINT can do the trick, but only by killing the whole address space. There are some thread APIs that attempt to do this, but they are either very unsafe or require cooperation from the code which is being interrupted.
    Your best bet is to code your CPU-intensive code to check a global (or thread-specific) flag for a requested interrupt, and cleanly exit back to the JNI wrapper, returning a flag value to acknowledge the interruption. A wrapper routine around the native method can then throw a Java exception, or block and retry, or whatever you want it to do.
    Note that Thread.stop is deprecated. There is no earthly way to cleanly interrupt either Java or C code, unless it cooperates with the interrupter.

  • Native call with J2ME

    I can write native calls in C and use them in my J2ME applications. But if the application shall be integrated to a J2ME device, like a mobilephone, can the native calls then work on this device? This means the DLL (the native function) must be placed on the mobilephone.
    Thx /Denker

    Even more interesting, how whould you deploy your native bits (e.g. some sort of library) when you cannot even be sure whether your target does support a file system? Apart from that, I doubt you will get a programming API for your mobile phone (well, Symbian OS (e.g. Nokia 7650) provides one I think).

  • BE6000 Native Call Queuing Design Constraints?

    We see the doc wiki has not been updated with any UCM 9.0 native call queuing design constraints.  We would assume that the call queuing at a min would need to meet the MoH design constraint of 50 sessions, since you figure there is a high probability that one call will be queued in each of 50 queues with MoH playing with each.
    http://docwiki.cisco.com/wiki/Supported_System_Capacities
    Is there any other performance impact we should consider or can we ask the doc wiki be updated with design constraints around call queuing?
    Can the BU clarify is that is 50 simultanous MoH streams per cluster, or 50 per server?  We can eliminate the load by going to multicast and IOS distributed MoH for remote sites, but something tells me there probably is a max queued call ceiling we need to consider for this platform.

    At the risk of getting caught up in the pass-by-reference/pass-by-value debate :), simple values (ints chars etc). are passed as values, and modifying them on the C++ side of the procedure call will not modify the values on th java side.
    Possible solutions are:
    1)pass an array of (say) ints. Then, modifying individual values should modify the java-side values (much in the way that the Stream.read(byte[]) functions do.
    2)format up a strin g with your return values, return the string and parse it on the java side.
    3)have fields in the java side that are accessed and modified by your native call.
    4)pass an object with some fields in it. Have the C++ access and modify the object's fields.
    Hope this helps.

  • How to maintain reference across native calls?

    I'm using JNI to interface with an underlying C++ communications library. I am having trouble keeping my connection valid across native calls.
    For example, in one method I connect and save the connection in a global variable, then return. After I connect I would like to call a "send message" method, but when I do I doesn't recognize the saved connection.
    My question is do saved references persist across JNI calls when using the same object, or will all global vars be new ones? If not, does anyone know a way to get around this?
    Thanks for your help

    All JNI references that you create (through calls to NewObject, GetObjectArrayElement, GetObjectField, ...) or that are passed to your native code as parameters are local. That means that they are only valid for the duration of that native call and only on the thread from which that native call was invoked.
    You can create global references from local references using NewGlobalRef. A global reference is valid across all threads and does not have a limited lifetime. You must make sure to release your global references once you are done using them by calling DeleteGlobalRef.
    God bless,
    -Toby Reyelts
    Check out Jace, http://jace.reyelts.com/jace

  • Web services server side uses C dll (native calls)

    Hi,
    I developed a web service using JAX-RPC. My implementation class uses native c function calls. Dose anybody know where I should put my C dlls and their dependentcy files on Web service server side (tomcat)? If they should be in the .war file, what kind of path in the war would be?
    I have an exception ocurred, like this
    [java] java.rmi.ServerException: Missing port information
    [java] at com.sun.xml.rpc.client.StreamingSender._raiseFault (StreamingSender.java:357)
    [java] at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:228)
    I think probably it is because of native call problem, since I could get something back if not using native call.
    Anybody has similar experience when developing web service using JAX-RPC and calling native c api functions on server side?
    Thanx in advance!

    Yes, I just tried it again (comment all native call out and just call the method that doesn't use native call, it works).
    So your web service application using jax-rpc and c native dlls works already?
    Can you tell me where you put all the native C DLLs and where I can set java.library.path in tomcat?
    Thank you!

  • Native Call (Java Call C program)

    Hi all,
    I am facing problem on compile the .so file for native call.
    In step by step tutorial, after I compile as :
    cc -G -I/opt/java1.3/include -I/opt/java1.3/include/hp-ux \HelloWorldImp.c -o libhello.so
    Fllowing error occur :
    /usr/ccs/bin/ld: Unsatisfied symbols:
    main (code)
    I am using HP-UX, any hints ?

    I solved the problem.
    Compile method in HP is not equal to Solaris.
    and thus throw that error if I follow the step by step tutorial in Sun's page.
    Details refer to :
    http://www.hp.com/products1/unix/java/infolibrary/prog_guide/java1_3/JNI_java2.html

  • CUCM 9.1 native call queuing - calls stuck in queue

    Hello everyone
    We are using the CUCM 9.1 native call queuing feature for attendants hunt group an have the following problem - if all the attendants are busy, the next arriving call gets into queue, receiving MOH treatment, as described in documentation. But if one or more attendants gets free and ready to receive calls, queued call doesn't get transfered to his/her phone. Logging in additional attendants, logging them in and out again doesn't change anything, once the call got in queue it stays in queue.
    Exact cucm release version is 9.1.1.20000-5.
    Has anyone seen this? Any ideas on what traces/logs to check?

    Hi,
    it seems you hitting this bug  CSCuc16486
    http://tools.cisco.com/Support/BugToolKit/search/getBugDetails.do?method=fetchBugDetails&bugId=CSCuc16486&from=summary
    HTH
    Anas
    please don't forget to rate the helpful posts

  • Associating native calls with the calling object

    I have a problem where calls into a native library need to retain data for subsequent method calls. Imagine the following two native methods (just imagine that the signature is write for JNI methods):
    void initialise(int value)
    // Stores the value somehow
    void dosomething()
      // Does something with the previously stored value
    }If I was to store the value in a global variable, then it would be shared across all instance of the java class wouldnt it? So if object 1 called initialise, then object 2 called initialise, whichever of the objects then called dosomething, it would be based on the latest call to initialise.
    How do I get around this sort of thing?
    I currently work in C, though I would be quite happy to switch to C++ if necessary.
    Mossop

    I haven't used JNI_OnUnload, but may see why it isn't called. The doc says it runs in the finalizer for the classloader that loaded the library. Assuming this is the system (not custom) classloader, then its finalizer will never run because it gets gc'd only at shutdown, and finalizers don't run at shutdown by default. You could try calling Runtime.runFinalizersOnExit, but it's deprecated and sounds unsafe.
    So my next idea would be to add a shutdown hook (Runtime.addShutdownHook) the first time one of your objects is constructed. The hook would call a native method to do the cleanup. Or since a shutdown hook is a Thread subclass, just make your overridden run() be the native cleanup function.
    Of course this now requires keeping a native-side data structure to track the native objects, though I'd still vote for storing each native peer's pointer in a Java long field for fast dereference, and make this native data structure be a simple array or list (not map) for usage only by the cleanup logic.
    Another idea is to clean up in a function called by the OS or C++ runtime when your library is unloaded, independent of Java. This could be DllMain (for Windows) or a C++ global object destructor.
    -slj-

  • Native calls problem

    Hi everybody,
    Following is my problem --
    i am working in linux environment with CLDC 1.0.4 and MIDP 2.0, downloaded from the sun site.
    earlier i was using only cldc(kvm). For adding native code, i used to rebuild kvm adding .c files containing native functions in the given makefiles. And that was working fine. but i need to use midp classes, which i am not able to use by giving
    KVM_HOME> kvm -classpath ../../api/classes:. testClass
    i am not able to use midp classes from testClass, even if i specify it in classpath...
    So, in order to use midp classes, i decided to rebuilt midp.. in midp makefiles i added .java files and corresponding .c files in SRC.. it is built without errors, but the entry of the new native function is not done in ROMjavaUnix.c or in nativeFunctionTable.c So, when i call the native function from the midlet, it obviously gives native function not found error..
    I will be higly thankful to u, if u can help me in the same. There might be a point which i am missing.
    Thanks and Regards,
    Retesh

    Hi,
    I think following shd help u...
    Following changes have been done in the MIDP RI 2.0 -
    The classes containing the native function declarations are added to the MIDP_HOME/src/share/classes/
    The corresponding C source files containing the native function definitions are added to MIDP_HOME/src/share/native/
    In MIDP_HOME/build/share/makefiles/Defs.gmk the name of the C source file is added to variable MIDP_DEF_SRC
    In MIDP_HOME/build/share/makefiles/Defs.gmk while defining variable MIDP_DEF_SOURCE, the name of the package (in our case urPackage) containing the class which contains the native function declaration is added as
    MIDP_DEF_SOURCE:=$(shell find \
    $(MIDP_DIR)/src/share/classes/java \
    $(MIDP_DIR)/src/share/classes/javax \
    $(MIDP_DIR)/src/share/classes/urpackage \
    $(MIDP_DIR)/src/share/classes/com/sun/mmedia \
    $(MIDP_DIR)/src/share/classes/com/sun/midp \
    -name '*.java' | egrep -v 'midp/ssl|$(MIDP_EXCLUDE_CLASSES)')
    In Defs.gmk (i don't remember the exact path)
    when creating classes.zip the urPackage is given as
         $(ZIP) -qr ../$@ java javax com urPackage);
    Regards,
    Retesh

  • Solaris native calls to packing libraries

    Hello,
    I do not know if this is the correct forum, and if not please redirect me. I'm researching the use of Solaris *,9,10 packaging via Java 1.4.2 by way of C/C++ and came across pkginfo.c from this url:
    http://cvs.opensolaris.org/source/xref/on/usr/src/lib/libadm/common/pkginfo.c
    and it suggests that libadm is where the functions are that I can use in my code.
    Maybe I'm not looking in the right space/area. I wanted access to all the native library calls for all aspects of packing including the pkginfo, pkgadd, pkgrm, etc.
    I didn't see one for pkgrm but found the pkginfo.c code, so I figured it's somewhere.
    Any url that might help me figure this out would be appreciated. A book would be good, but not as fast.
    A code snippet or idea would be great...
    looking for a reference or a...
    comon! it's aint going to work that way, you can only do it this way...
    would help!
    regards,
    robert

    Hello all who've viewed this page!
    So in my copius spare time I found that libprodreg.so.1 contains the code that is available to do packaging and interfaces directly with the Sun's product database and now need to locate the specs on interfacing to it.
    So if someone could give me a heads up that would be great.
    Thanks in advance!
    Robert

  • Native call crashes inside event call.

    When I use this interface without a JFrame, simply calling "goToFilter(5)", it works perfectly. When I call it within the ActionListener, it crashes.
    * @author Jason Thomas
    * @version 1.0
    * Test program for the Java interface to my C++ FilterWheel object.
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class FilterWheel
    static
         System.loadLibrary("filterwheel");
    FilterWheel()
         FilterInterface.initialize();
         final JTextField myField = new JTextField();
         JFrame myFrame = new JFrame("Filter Wheel.");
         myFrame.setSize(500,500);
         myField.addActionListener(new ActionListener()
         public void actionPerformed(ActionEvent evt)
              String myText = myField.getText();
              try
              FilterInterface.goToFilter(Integer.parseInt(myText));
              catch(NumberFormatException myExtp)
              System.err.println("Invalid Numerical value!");
         myFrame.getContentPane().add(myField, BorderLayout.SOUTH);
         myFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         myFrame.setVisible(true);
         FilterInterface.goToFilter(1);
    public static void main(String args[])
         new FilterWheel();
    Exception:
    An unexpected exception has been detected in native code outside the VM.
    Unexpected Signal : 11 occurred at PC=0x4C85A87F
    Function=(null)+0x4C85A87F
    Library=/home/jason/FWheel/Bakup/libfilterwheel.so
    NOTE: We are unable to locate the function name symbol for the error
    just occurred. Please refer to release documentation for possible
    reason and solutions.
    Current Java thread:
    at FilterInterface.goToFilter(Native Method)
    at FilterWheel$1.actionPerformed(FilterWheel.java:32)
    at javax.swing.JTextField.fireActionPerformed(JTextField.java:489)
    at javax.swing.JTextField.postActionEvent(JTextField.java:670)
    at javax.swing.JTextField$NotifyAction.actionPerformed(JTextField.java:784)
    at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1502)
    at javax.swing.JComponent.processKeyBinding(JComponent.java:2422)
    at javax.swing.JComponent.processKeyBindings(JComponent.java:2457)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4830)
    at java.awt.Container.processEvent(Container.java:1525)
    at java.awt.Component.dispatchEventImpl(Component.java:3526)
    at java.awt.Container.dispatchEventImpl(Container.java:1582)
    at java.awt.Component.dispatchEvent(Component.java:3367)
    at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1700)
    at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:568)
    at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:740)
    at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:673)
    at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:534)
    at java.awt.Component.dispatchEventImpl(Component.java:3396)
    at java.awt.Container.dispatchEventImpl(Container.java:1582)
    at java.awt.Window.dispatchEventImpl(Window.java:1581)
    at java.awt.Component.dispatchEvent(Component.java:3367)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:445)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:191)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:144)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:130) at java.awt.EventDispatchThread.run(EventDispatchThread.java:98)
    Dynamic libraries:
    08048000-0804d000 r-xp 00000000 03:05 659493 /usr/java/j2sdk1.4.0_01/bin/java
    0804d000-0804e000 rw-p 00004000 03:05 659493 /usr/java/j2sdk1.4.0_01/bin/java
    40000000-40012000 r-xp 00000000 03:05 426018 /lib/ld-2.2.93.so
    40012000-40013000 rw-p 00012000 03:05 426018 /lib/ld-2.2.93.so
    40013000-4001c000 r-xp 00000000 03:05 53552 /usr/java/j2sdk1.4.0_01/jre/lib/i386/native_threads/libhpi.so
    4001c000-4001d000 rw-p 00008000 03:05 53552 /usr/java/j2sdk1.4.0_01/jre/lib/i386/native_threads/libhpi.so
    4001d000-4001e000 r--p 00281000 03:05 659901 /usr/lib/locale/locale-archive
    4001e000-40027000 r-xp 00000000 03:05 426054 /lib/libnss_files-2.2.93.so
    40027000-40028000 rw-p 00008000 03:05 426054 /lib/libnss_files-2.2.93.so
    40028000-4002a000 r--s 00000000 03:05 675301 /usr/java/j2sdk1.4.0_01/jre/lib/ext/dnsns.jar
    4002c000-40039000 r-xp 00000000 03:05 245766 /lib/i686/libpthread-0.10.so
    40039000-4003c000 rw-p 0000d000 03:05 245766 /lib/i686/libpthread-0.10.so
    4005d000-4005f000 r-xp 00000000 03:05 429411 /lib/libdl-2.2.93.so
    4005f000-40060000 rw-p 00001000 03:05 429411 /lib/libdl-2.2.93.so
    40060000-40326000 r-xp 00000000 03:05 545074 /usr/java/j2sdk1.4.0_01/jre/lib/i386/client/libjvm.so
    40326000-4048f000 rw-p 002c5000 03:05 545074 /usr/java/j2sdk1.4.0_01/jre/lib/i386/client/libjvm.so
    404a3000-404b5000 r-xp 00000000 03:05 429413 /lib/libnsl-2.2.93.so
    404b5000-404b6000 rw-p 00012000 03:05 429413 /lib/libnsl-2.2.93.so
    404b8000-404ec000 r-xp 00000000 03:05 639250 /usr/lib/libstdc++-2-libc6.1-1-2.9.0.so
    404ec000-404f8000 rw-p 00033000 03:05 639250 /usr/lib/libstdc++-2-libc6.1-1-2.9.0.so
    404fa000-4051b000 r-xp 00000000 03:05 245764 /lib/i686/libm-2.2.93.so
    4051b000-4051c000 rw-p 00021000 03:05 245764 /lib/i686/libm-2.2.93.so
    4051c000-4052d000 r-xp 00000000 03:05 348487 /usr/java/j2sdk1.4.0_01/jre/lib/i386/libverify.so
    4052d000-4052f000 rw-p 00010000 03:05 348487 /usr/java/j2sdk1.4.0_01/jre/lib/i386/libverify.so
    4052f000-40551000 r-xp 00000000 03:05 348475 /usr/java/j2sdk1.4.0_01/jre/lib/i386/libjava.so
    40551000-40553000 rw-p 00021000 03:05 348475 /usr/java/j2sdk1.4.0_01/jre/lib/i386/libjava.so
    40555000-40569000 r-xp 00000000 03:05 348488 /usr/java/j2sdk1.4.0_01/jre/lib/i386/libzip.so
    40569000-4056c000 rw-p 00013000 03:05 348488 /usr/java/j2sdk1.4.0_01/jre/lib/i386/libzip.so
    4056c000-41be9000 r--s 00000000 03:05 675348 /usr/java/j2sdk1.4.0_01/jre/lib/rt.jar
    41c2b000-41c42000 r--s 00000000 03:05 675355 /usr/java/j2sdk1.4.0_01/jre/lib/sunrsasign.jar
    41c42000-41cb0000 r--s 00000000 03:05 675315 /usr/java/j2sdk1.4.0_01/jre/lib/jsse.jar
    41cb0000-41cc3000 r--s 00000000 03:05 675314 /usr/java/j2sdk1.4.0_01/jre/lib/jce.jar
    41cc3000-41f44000 r--s 00000000 03:05 675292 /usr/java/j2sdk1.4.0_01/jre/lib/charsets.jar
    41fec000-41ffa000 r--s 00000000 03:05 675302 /usr/java/j2sdk1.4.0_01/jre/lib/ext/ldapsec.jar
    41ffa000-42000000 r--s 00000000 03:05 983258 /usr/lib/gconv/gconv-modules.cache
    42000000-42126000 r-xp 00000000 03:05 245762 /lib/i686/libc-2.2.93.so
    42126000-4212b000 rw-p 00126000 03:05 245762 /lib/i686/libc-2.2.93.so
    4c333000-4c533000 r--p 00000000 03:05 659901 /usr/lib/locale/locale-archive
    4c533000-4c560000 r--p 0024b000 03:05 659901 /usr/lib/locale/locale-archive
    4c764000-4c807000 r--s 00000000 03:05 675303 /usr/java/j2sdk1.4.0_01/jre/lib/ext/localedata.jar
    4c832000-4c83a000 r--s 00000000 03:05 674028 /usr/java/j2sdk1.4.0_01/jre/lib/ext/comm.jar
    4c83a000-4c857000 r--s 00000000 03:05 675304 /usr/java/j2sdk1.4.0_01/jre/lib/ext/sunjce_provider.jar
    4c857000-4c85e000 r-xp 00000000 03:05 905031 /home/jason/FWheel/Bakup/libfilterwheel.so
    4c85e000-4c860000 rw-p 00006000 03:05 905031 /home/jason/FWheel/Bakup/libfilterwheel.so
    4c860000-4c862000 r-xp 00000000 03:05 510719 /usr/X11R6/lib/X11/locale/common/xlcDef.so.2
    4c862000-4c863000 rw-p 00001000 03:05 510719 /usr/X11R6/lib/X11/locale/common/xlcDef.so.2
    4c879000-4c8f6000 r-xp 00000000 03:05 641516 /usr/lib/libstdc++.so.3
    4c8f6000-4c90f000 rw-p 0007c000 03:05 641516 /usr/lib/libstdc++.so.3
    4c910000-4c917000 r-xp 00000000 03:05 426049 /lib/libgcc_s-3.2-20020903.so.14c917000-4c918000 rw-p 00007000 03:05 426049 /lib/libgcc_s-3.2-20020903.so.14c918000-4c91a000 r-xp 00000000 03:05 983203 /usr/lib/gconv/ISO8859-1.so
    4c91a000-4c91b000 rw-p 00001000 03:05 983203 /usr/lib/gconv/ISO8859-1.so
    4c91b000-4cbdc000 r-xp 00000000 03:05 348467 /usr/java/j2sdk1.4.0_01/jre/lib/i386/libawt.so
    4cbdc000-4cbf0000 rw-p 002c0000 03:05 348467 /usr/java/j2sdk1.4.0_01/jre/lib/i386/libawt.so
    4cc15000-4cc66000 r-xp 00000000 03:05 348483 /usr/java/j2sdk1.4.0_01/jre/lib/i386/libmlib_image.so
    4cc66000-4cc67000 rw-p 00050000 03:05 348483 /usr/java/j2sdk1.4.0_01/jre/lib/i386/libmlib_image.so
    4cc67000-4cc6e000 r-xp 00000000 03:05 329064 /usr/X11R6/lib/libXp.so.6.2
    4cc6e000-4cc6f000 rw-p 00006000 03:05 329064 /usr/X11R6/lib/libXp.so.6.2
    4cc6f000-4ccbd000 r-xp 00000000 03:05 328621 /usr/X11R6/lib/libXt.so.6.0
    4ccbd000-4ccc1000 rw-p 0004d000 03:05 328621 /usr/X11R6/lib/libXt.so.6.0
    4ccc1000-4ccce000 r-xp 00000000 03:05 328605 /usr/X11R6/lib/libXext.so.6.4
    4ccce000-4cccf000 rw-p 0000c000 03:05 328605 /usr/X11R6/lib/libXext.so.6.4
    4cccf000-4ccd3000 r-xp 00000000 03:05 328623 /usr/X11R6/lib/libXtst.so.6.1
    4ccd3000-4ccd4000 rw-p 00004000 03:05 328623 /usr/X11R6/lib/libXtst.so.6.1
    4ccd4000-4cdaf000 r-xp 00000000 03:05 328596 /usr/X11R6/lib/libX11.so.6.2
    4cdaf000-4cdb2000 rw-p 000da000 03:05 328596 /usr/X11R6/lib/libX11.so.6.2
    4cdb2000-4cdba000 r-xp 00000000 03:05 328592 /usr/X11R6/lib/libSM.so.6.0
    4cdba000-4cdbb000 rw-p 00007000 03:05 328592 /usr/X11R6/lib/libSM.so.6.0
    4cdbb000-4cdcf000 r-xp 00000000 03:05 328550 /usr/X11R6/lib/libICE.so.6.3
    4cdcf000-4cdd0000 rw-p 00013000 03:05 328550 /usr/X11R6/lib/libICE.so.6.3
    4cdd2000-4ce97000 r-xp 00000000 03:05 348471 /usr/java/j2sdk1.4.0_01/jre/lib/i386/libfontmanager.so
    4ce97000-4ceb1000 rw-p 000c4000 03:05 348471 /usr/java/j2sdk1.4.0_01/jre/lib/i386/libfontmanager.so
    4cf54000-4cf70000 r-xp 00000000 03:05 510718 /usr/X11R6/lib/X11/locale/common/ximcp.so.2
    4cf70000-4cf72000 rw-p 0001b000 03:05 510718 /usr/X11R6/lib/X11/locale/common/ximcp.so.2
    Local Time = Thu Feb 13 15:49:51 2003
    Elapsed Time = 8
    # The exception above was detected in native code outside the VM
    # Java VM: Java HotSpot(TM) Client VM (1.4.0_01-b03 mixed mode)
    # An error report file has been saved as hs_err_pid2843.log.
    # Please refer to the file for further information.
    Any help would be greatly appreciated.
    -Jason Thomas.

    Gdb's trace of the cause of all of my problems:
    Program received signal SIGSEGV, Segmentation fault.
    [Switching to Thread 90124 (LWP 11810)]
    0x4c85a89f in outb () from /home/jason/FWheel/libfilterwheel.so
    This is what I get from the debugger. I'm using the function outb to write to the parallel port address 0x378, which I've used the function ioperm to permit read/write access to. The program works just fine if I call the "stepFilter" function (that calls outb) outside of the ActionListener's actionPerfomed method. Like if I'm probing for keboard input inside the constructor:
    * @author Jason Thomas
    * @version 1.0
    * Test program for the Java interface to my C++ FilterWheel object.
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    public class FilterWheelTest
    static
         System.loadLibrary("filterwheel");
    FilterWheelTest()
         BufferedReader myReader = new BufferedReader(new InputStreamReader(System.in));
         String inString;
         try
         while((inString = myReader.readLine()) != null)
              myWheel.goToFilter(Integer.parseInt(inString));
         myWheel._delete();
         catch(IOException e)
         e.printStackTrace();
         System.exit(-1);
    public static void main(String args[])
         new FilterWheelTest();
    The program above works fine, the one I posted previously does not. The only difference is that the one I first posted is inside of an ActionListener, and this one is not.
    -Jason Thomas.

  • Native call in Servlet crashing tomcat

    I can execute the class from the unix prompt (invoking the main) and it works fine, however when I invoke it withing a servlet or jsp, i get a core dump.
    It seems to be a treading issue. I am including the tread dump of ONLY the thread that died.
    Any advice on getting this going would be appreciated.
    Derek
    SIGSEGV 11* segmentation violation
    si_signo [11]: SIGSEGV 11* segmentation violation
    si_errno [0]:
    si_code [2]: SEGV_ACCERR [addr: 0x0]
    stackpointer=ba12a2d4
    Full thread dump Classic VM (Caldera-UNIX-J2SE-1.3.0_02:*fixes-OU8*fixes-UW7*FCS-OSR5*:020322-03:47, native threads):
    "Thread-9" (TID:0xbca3aa50, sys_thread_t:0x83e7738, state:R, native ID:0xe) prio=5
    at JavaToCPageInterface.sendMessage(Native Method)
    at doit_3._jspService(doit_3.java, Compiled Code)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java)
    at org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java, Compiled Code)
    at org.apache.tomcat.core.Handler.invoke(Handler.java:322)
    at org.apache.tomcat.core.Handler.service(Handler.java, Compiled Code)
    at org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:485)
    at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java, Compiled Code)
    at org.apache.tomcat.core.ContextManager.service(ContextManager.java, Compiled Code)
    at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10Interceptor.java, Compiled Code)
    at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java, Compiled Code)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java, Compiled Code)
    at java.lang.Thread.run(Thread.java:484)

    More Info:
    j2sdk 1.3.1
    Tomcat 3
    The program executes fine as a stand-along app, however if it is called from withing a servlet or JSP, Tomcat core dumps.
    Have tried -Xss10m as a parameter, however it does not work. I have also tried both green and native threads.
    Thanks,
    Derek

  • Problem including: thread, native calls, web service

    I have the following problem:
    There is web service (myService) running on a 2-processor machine
    The web service starts a thread (myThread)
    The thread's run calls a native method (myNative).
    The implementation of the native method simply calls a function (myFunc).
    The web service starts the thread and waits for it to end (with join() ).
    The above are summarized in the following:
    myService
    myThread.run()
    myNative()
    myFunc()
    The problem is:
    it seems that while myThread has ended its execution, the myNative function keeps running.
    (e.g. messages of myNative are printed after the end of the execution of myThread)
    Could this be related to the fact that the machine has 2 processors?
    What could be the cause?
    Thank you in advance.

    This is most likely caused by how the native processes standard output streams are implemented. Try using some other form of feedback (i.e. write to a file, or throw up a user dialog box) and you'll most likely see that the native method is indeed returning when you think it should, but the native output stream doesn't show up until later.
    - K

  • Crash in native calls to MAPI

    Hi All
    In the application that we are developing, we have java wrapper over Micosoft MAPI calls to integrate with MS Exchange Server. Our Application can be run in two modes (local and remote). In local configurations, all the calls are in the same JVM. In the remote configuration, our application will be deployed in a tomcat and we use jUnit test cases (running on another JVM) to test it. Our application exposes webservices from tomcat.
    The problem we are facing is inconsistent crashes when configured in remote mode. However, we don't see the crashes happening in the local configuration. Any pointers would be of great help!
    -Abhi

    Hi,
    Developers can also use j-XChange (http://sourceforge.net/projects/j-xchange/). It is a pure Java implementation of the entire Collaboration Data Objects (CDO 1.21) library, offered under LGPL license and allows interoperability with MS Exchange from all non-Windows platforms that support Java. This library is powered by j-Interop (www.j-interop.org).
    This library is functionally similar to Commercial "J-Integra for Exchange" offering.
    Thanks,
    best regards,
    Vikram

Maybe you are looking for

  • Arabic fonts for mac

    Hi- I need to add Arabic fonts to my mac in order to be able to copy and paste from a pdf file to a browser/another application.. iflash! Does anybody know where I can get these from? Thanks Saf

  • Oracle Fixed Assets (11i) Fully Depreciated Assets...

    Hi there How to Find out that Assets is Fully Depreciated? Is there any one field (Flag) on Screen or in any Assets table? Thanks ASIM

  • How to send Encrypted message using public key in Business Service

    Hi, I have one public key (abc.cer) which is given by provider. I have to send encrypted message to Provider using public key. How to achieve it in OSB?? Thanx Edited by: Vinit Ahuja on Jun 16, 2011 3:17 AM

  • Can any bady send the WDJ application on event handler & plug  parameters?

    Hi, Experts, I have no idea no WDJ Event handler and plug parameters usage if any bady can send me few WDJ application or scenarios which is based on event handler parameters and plug parameters and method parameters.  Thans in advance, Shaber Ahmed.

  • Question about Picture Icons

    We have a list of products on one side of the window. On the other side is one image of one of the products. I wanted to find out if there, I know there is, but..., way to have the picture change when a mouse rolls over another one of the Items? I ba