VC++ dll in java

Hi,
I have an existing dll written in VC++. I want to use the existing function in java. Can anyone plz. help me how to do that without rewritting the dll code.
Thanks & Regards,
Siddhartha

AFAIK you need to write at least some wrapperfunctions for the JNI calls. Direct calls to existing C/C++ = DLLs are not possible.
If this is wrong, plz correct me. Could also be helpfull for me :)

Similar Messages

  • Is it possible to call VB dll in Java

    Is it possible to call VB dll in Java?
    If yes then How?

    If you mean VB6 than you can call VB Module like a COM object with any Java-COM bridge.
    VB.NET could be called with my Object-Oriented JNI for .NET 1.1/2.0:
    http://www.simtel.net/product.php[id]95126[SiteID]simtel.net
    http://www.simtel.net/product.php[id]98653[SiteID]simtel.net

  • How can i pass string from C++ DLL to Java via JNI?

    Hi everybody. I made a DLL with Borland C++. I must pass a string from this dll to Java via JNI.Namely i define a string variable in C++ DLL and i send this variable's value to Java via JNI.
    I can pass integers but i couldnt Strings. . How can i do this? is there any sample?

    Hi,
    So your function should be private static native String get_text();
    (It's often a good idea to make native methods private since when you change signatures you generally have to change java wrapper methods only).
    I know nothing about C++ strings but I'm pretty sure that you can convert it to char*, so
    do :
    char* szMyString = myString.toChar*();
    Then return from native with JNU_NewStringPlatform(env, szMyString)
    (see my 1st answer for JNU_NewStringPlatform() description).
    --Marc (http://jnative.sf.net)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to call VB dlls in java

    Hi
    I created one component in vb, where this component got 3 methods. and created dll also, when iam trying to use these dlls in java. it showing error, is there any method to call the vb dlls in java(native method), if s pls help me to solve these problem.

    hi, all
    I writed a vb dll, It have three publice sub and one preporty,
    I use html <object> attribute to declare this dll and call its methods and perporty in html file, everything is ok.the source code as following:
    <body>
    <OBJECT declare id="repExport" classid="clsid:0487D845-0DAD-46D0-9559-FADEC117C2B9">
    <param name="Exportfile" value="peiru">
    </OBJECT>
    <script language="vbscript">
    repExport.Exportfile="peiruyt"
    repExport.CrystalConnect()
    repExport.PassParameterRtp()
    repExport.reportexport()
    </script>
    Because i need get parameter from other web page , and i use weblogic 6.1 server, so i need change file type from html to jsp , But even if I just change the file extension from html to jsp, don't change any content in this file.
    then jsp cannot work, error message is "object don't support 'repExport.Exportfile' property", actual it don't support all three functions and a property
    Can anyone provide any help?
    thanks
    peiru

  • Calling DLLs in JAVA

    Hi,
    I need to create a utility for a component in a 3rd party tool. I am planning to create this utility in JAVA. But the problem is that the 3rd party tool uses DLLs which is created in VB 6.0 (Its seems so).
    I came across the key word "NATIVE" in JDK. But the examples related to this is all given for C/C++. I am not sure whether following the same procedure we will be able to access any VB dlls.
    Please help me out. I am aware that there are ceratin APIs which we can use as a Bridge between Dlls and Java. And If I am right one among such is JACOB. But I am trying to minimize the dependencies of my Java Code to any other Utilities.
    Eagerly waiting for a valuable Advice
    Jiju Jagadish

    Hi,
    It seems you'll need to compile you own DLL wrapper if you do not want to depend on 3rd party library, search for JNI spec here.
    On the other hand generic wrappers save time, if you are not famillar with C/C++.
    Look at that post : http://forum.java.sun.com/thread.jspa?threadID=722211&tstart=0
    --Marc (http://jnative.sf.net)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Possible to make a dll with java?

    I am completely new to Java. Is it possible to create a Windows style DLL with Java? I am working with one project written in VB.NET which needs to access functions in another project written in Java. Can anybody help me figure out how to do this?

    I'm not sure what you mean by what type of project. It contains numerous data analysis functions which I want to access from a VB.NET program. From what you've written, I must assume that Java cannot be used to create a DLL and my only option is to rewrite it in another language. Thank you for the info.

  • Calling dll in Java using The JACOB Project

    Hi I'm trying to import and read the class and methods from a DotNet API (dll) in java code usind the Jacon Project does anybody know how to do it? (like and example or simple staps to have an idea)
    thanks
    Luca

    afaik you cannot call windows API functions directly, you have to create a 'wrapper' method in C++ in order to access the API functions.
    it will look something like
    // Java code:
    package a.b;
    class Thingie {
      public native int doThatFunkyThingie();
    // c++ code
    jint Java_a_b_Thingie_doThatFunkyThingie(JNIEnv *env, JObject j) {
      // c++ function calls go here
    }I haven't done JNI in over a year, so this is probably not entirely correct.
    I recommend you read the JNI tutorial.
    J

  • Calling back c++ method in an exe (not a dll) from java?

    Hi all,
    I have to make an hybrid C++/java from an existing C++
    application that compiled is a big single exe not a dll.
    I'm running under win32.
    The application consists of several windows. The hybrid
    will have widows in C++ and some in java. They have the
    same menu and tool bar. In the C++, there are some
    callbacks called when a button is pressed. How to call
    these callback from java given the fact that the JVM and
    the java classes are launched by the exe file.
    I know how, from C++, start JVM and call my java window.
    I also know how to call a C++ method that is in a dll from
    java. It's from the tutorial
    http://java.sun.com/docs/books/tutorial/native1.1/index.html
    But I don't know how to call a C++ method that is in in an
    exe which has launch a JVM from an object running in this
    JVM.
    Is there somewhere an example like this?
    Thanks,
    Xavier.

    Thanks this helped.
    For those who want a complete example, here it is:
    Tested on XP, java 1.4.2, VC++ 6.0.
    ************ File invoke.cpp *****************************
    #include <stdlib.h>
    #include <jni.h>
    #ifdef _WIN32
    #define PATH_SEPARATOR ';'
    #else /* UNIX */
    #define PATH_SEPARATOR ':'
    #endif
    #define USER_CLASSPATH "." /* where Prog.class is */
    void JNICALL displayHelloWorld(JNIEnv *env, jobject obj)
        printf("Hello world: made by printf from C++\n");
        return;
    void main() {
        JNIEnv *env;
        JavaVM *jvm;
        JavaVMInitArgs vm_args;
        jint res;
        jclass cls;
        jmethodID mid;
        jstring jstr;
        jobjectArray args;
        char classpath[1024];
         int result;
        /* IMPORTANT: specify vm_args version # if you use JDK1.1.2 and beyond */
         JavaVMOption options[3];
         options[0].optionString = "-verbose:gc";
         sprintf (classpath, "-Djava.class.path=%s", USER_CLASSPATH);
         options[1].optionString = classpath;
         options[2].optionString = "-Djava.compiler=NONE";
         vm_args.options = options;
         vm_args.nOptions = 3;
         vm_args.ignoreUnrecognized = JNI_TRUE;
            vm_args.version = JNI_VERSION_1_4;
         /* IMPORTANT: Note that in the Java 2 SDK, there is no longer any need to call
          * JNI_GetDefaultJavaVMInitArgs. It causes a bug
        /* Append USER_CLASSPATH to the end of default system class path */
        /* Create the Java VM */
        res = JNI_CreateJavaVM(&jvm,(void**)&env, &vm_args);
        if (res < 0) {
            fprintf(stderr, "Can't create Java VM\n");
            exit(1);
        cls = env->FindClass("mypackage/Prog");
        if (cls == 0) {
            fprintf(stderr, "Can't find mypackage/Prog class\n");
            exit(1);
       JNINativeMethod nm;
       nm.name = "displayHelloWorld";
       /* method descriptor assigned to signature field */
       nm.signature = "()V";
       nm.fnPtr = displayHelloWorld;
       env->RegisterNatives(cls, &nm, 1);
        mid = env->GetStaticMethodID(cls, "main", "([Ljava/lang/String;)V");
        if (mid == 0) {
            fprintf(stderr, "Can't find Prog.main\n");
            exit(1);
        jstr = env->NewStringUTF(" from C++! calleded by C++, using argument from C++ but java method");
        if (jstr == 0) {
            fprintf(stderr, "Out of memory\n");
            exit(1);
        args = env->NewObjectArray(1,
                            env->FindClass("java/lang/String"), jstr);
        if (args == 0) {
            fprintf(stderr, "Out of memory\n");
            exit(1);
        env->CallStaticVoidMethod(cls, mid, args);
        jvm->DestroyJavaVM();
    }********************* File ./mypackage/Prog.java **************************
    package mypackage;
    public class Prog {
           public native void displayHelloWorld();
        public static void main(String[] args) {
            System.out.println("Hello World" + args[0] +"\n");
            Prog prog = new Prog();
            prog.displayHelloWorld();
            System.out.println("(called from java)");
            System.out.println("\nSo to sumurize:");
            System.out.println(" -1 Starting point is an exe (not DLL, there is no DLL) so C++ code");
            System.out.println(" -2 From C++ call java method using argument from C++");
            System.out.println(" -3 From java, that was launched by the exe, call to");
            System.out.println("    a native using the RegisterNatives in C++\n");
            System.out.println("You got a bidirectional example with as starting point");
            System.out.println("a single exe, launching JVM, loading class call back C++!");
    }******************* Command line for all ****************************************
    javac mypackage/Prog
    cl -I"D:\Program Files\j2sdk1.4.2_03\include" -I"D:\Program Files\j2sdk1.4.2_03\include\win32" -MT
    invoke.cpp -link D:\PROGRA~1\j2sdk1.4.2_03\lib\jvm.lib
    (Remark, the last path is using the short name for "Program Files" because with the blank
    even adding double quotes result into an error)
    You must have jvm.dll in your path for me it's Path=D:\Program Files\j2sdk1.4.2_03\jre\bin\client;
    Then simply call invoke and see the result. :-)

  • Invoking Native Dll in Java

    Hi,
    We have tried to invoke a native dll method using JNI in java.
    While invoking the dll method(below native code dll) we face the "Access violation error".
    But the very same native implementation code is working successfully when invoked from VC++ Exe application.
    We have given the Java class file, header file, CPP implementation of the method and the error report below.
    Can anybody let us know if there is some fault in the way code we have coded?
    *{color:#0000ff}Source Code:{color}
    {color:#0000ff}---------------------{color}
    _______________________________________WsqLib.java____________________________________________________________________
    class WsqLib
    private native int BitmapToWSQ();
    private native int WsqToBitmap();
    public static void main(String[] args)
    WsqLib wsqlib=new WsqLib();
    System.out.println("wsqlib.BitmapToWSQ() ==> "+wsqlib.BitmapToWSQ());
    static
    System.loadLibrary("WsqLib");
    # Create a class (WsqLib.java) that declares the native method.
    # We use javac to compile the WsqLib source file, resulting in the class file WsqLib.class.
    # We use javah to generate a C header file (WsqLib.h) containing the function prototype for the native method implementation.*
    _______________________________________WsqLib.h*_______________________________________________________________________
    /* DO NOT EDIT THIS FILE - it is machine generated */
    #include "jni.h"
    /* Header for class WsqLib */
    #ifndef IncludedWsqLib
    #define IncludedWsqLib
    #ifdef __cplusplus
    extern "C" {
    #endif
    * Class: WsqLib
    * Method: BitmapToWSQ
    * Signature: ()I
    JNIEXPORT jint JNICALL Java_WsqLib_BitmapToWSQ
    (JNIEnv *, jobject);
    * Class: WsqLib
    * Method: WsqToBitmap
    * Signature: ()I
    JNIEXPORT jint JNICALL Java_WsqLib_WsqToBitmap
    (JNIEnv *, jobject);
    #ifdef __cplusplus
    #endif
    #endif
    # CPP implementation (WsqLib.cpp) of the native method is as below.
    # We compiled the cpp implementation into a native library, creating WsqLib.dll.
    # We use the WsqLib.dll in WsqLib.java.
    _______________________________________WsqLib.cpp______________________________________________________________________
    #include "stdafx.h"
    #include "WsqLib.h"
    #include "_vcclrit.h"
    #include "gdiplus.h"
    #include <afxstr.h>
    #include <atlimage.h>
    #include "WsqLib1.h"
    static const GUID guidBmp =
    { 0x557cf400, 0x1a04, 0x11d3, { 0x9a, 0x73, 0x00, 0x00, 0xf8, 0x1e, 0xf3, 0x2e } };
    extern "C"
    int debug = 0;
    JNIEXPORT jint JNICALL Java_WsqLib_BitmapToWSQ(JNIEnv *, jobject)
    Gdiplus::Bitmap *pBitmap = Gdiplus::Bitmap::FromFile(L"temp.bmp", TRUE);
    Gdiplus::BitmapData lockedBitmapData;
    Gdiplus::Rect rect(0, 0,pBitmap->GetWidth(),pBitmap->GetHeight());
    //Error occured in this Line.
    pBitmap->LockBits( &rect, Gdiplus::ImageLockModeRead, PixelFormat8bppIndexed, &lockedBitmapData );
    int byteCount = pBitmap->GetWidth() * pBitmap->GetHeight() * (int)(8 / 8);
    unsigned char *pPixelData2 = new unsigned char[byteCount];
    memset(pPixelData2, 0, (size_t)byteCount);
    unsigned char pBytes = (unsigned char) lockedBitmapData.Scan0;
    for (int index = 0; index < byteCount; index++)
    pPixelData2[index] = pBytes[index];
    pBitmap->UnlockBits(&lockedBitmapData);
    unsigned char *pPixelData = pPixelData2;
    int pixelsPerInch = (int)pBitmap->GetHorizontalResolution();
    float compressionFactor = (float)( (float)((int)75) / 100.0);
    unsigned char *pWsqBytes = NULL;
    int wsqBytesCount = 0;
    int result = 0;
    result = wsq_encode_mem(
    &pWsqBytes, // Output data buffer
    &wsqBytesCount, // Length of output data buffer
    compressionFactor, // Determines the amount of lossy compression.
    pPixelData, // Input pixel data
    pBitmap->GetWidth(), // Pixel width of the pixmap
    pBitmap->GetHeight(), // Pixel height of the pixmap
    8, // Depth (bits) of the pixmap
    pixelsPerInch, // Scan resolution of the image in integer units of pixels per inch
    (char *)NULL // Optional (we do not want to use this - we may even want to remove the implementation)
    if (result == 0)
    FILE *fptr1;
    fptr1=fopen("C:\\saran2.wsq_1.0","wb");
    fwrite(pWsqBytes,wsqBytesCount,1,fptr1);
    fclose(fptr1);
    return 10;
    JNIEXPORT jint JNICALL Java_WsqLib_WsqToBitmap(JNIEnv *, jobject)
    BYTE gData[242998];
    Gdiplus::Bitmap* image;
    CFile file;
    file.Open("temp.wsq_1.0",CFile::modeRead,NULL);
    file.Read(gData,242998);
    unsigned char pByteArray =(unsigned char)gData;
    unsigned char *pPixelData = NULL;
    int bitmapWidth = 0;
    int bitmapHeight = 0;
    int pixelDepth = 0;
    int pixelsPerInch = 0;
    int lossyFlag = 1;
    int byteArrayLength = 242998;
    int result = 0;
    result = wsq_decode_mem(
    &pPixelData, // Output image buffer
    &bitmapWidth, // Pixel width of the pixmap
    &bitmapHeight, // Pixel height of the pixmap
    &pixelDepth, // Depth (bits) of the pixmap
    &pixelsPerInch, // Scan resolution of the image in integer units of pixels per inch
    &lossyFlag, // Is the image lossy? F.I.I.K.
    pByteArray, // Input data buffer
    byteArrayLength // Input data buffer length
    if (result == 0 && pixelDepth == 8)
    image = new Gdiplus::Bitmap(bitmapWidth, bitmapHeight);
    Gdiplus::Rect bound( 0, 0,bitmapWidth,bitmapHeight);
    Gdiplus::BitmapData lockedBitmapData;
    image->LockBits( &bound, Gdiplus::ImageLockModeWrite, PixelFormat8bppIndexed, &lockedBitmapData );
    int imageRowSize = bitmapWidth * (8/8);
    unsigned char pBitmapPixelData = (unsigned char )lockedBitmapData.Scan0;
    int byteCount = bitmapWidth * bitmapHeight;
    for (int index = 0; index < byteCount; index++)
    pBitmapPixelData[index] = pPixelData[index];
    image->UnlockBits( &lockedBitmapData );
    else
    return result;
    image->Save(L"C:\\temp.bmp", &guidBmp);
    return 0;
    {color:#0000ff}Error report:{color}
    {color:#0000ff}-------------------{color}
    # An unexpected error has been detected by HotSpot Virtual Machine:
    # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x03920780, pid=380, tid=3572
    # Java VM: Java HotSpot(TM) Client VM (1.5.0_12-b04 mixed mode, sharing)
    # Problematic frame:
    # C 0x03920780
    --------------- T H R E A D ---------------
    Current thread (0x00036d88): JavaThread "main" [_thread_in_native, id=3572]
    siginfo: ExceptionCode=0xc0000005, reading address 0x00000004
    Registers:
    EAX=0x00000000, EBX=0x00000000, ECX=0x00000000, EDX=0x00000000
    ESP=0x0007f9a8, EBP=0x0007fa70, ESI=0x00000000, EDI=0x00000000
    EIP=0x03920780, EFLAGS=0x00010246
    Top of Stack: (sp=0x0007f9a8)
    0x0007f9a8: 00000000 00000000 00000000 00000000
    0x0007f9b8: 039204ba 00000001 00000000 000be780
    0x0007f9c8: 03726248 0007fa10 00000000 00000000
    0x0007f9d8: 03920430 0007fa2c 7a32b4fa ffffffff
    0x0007f9e8: 0007fa38 79e7bba9 79e7bbb1 cce41966
    0x0007f9f8: ffffffff 0007fa68 000a4b30 00000000
    0x0007fa08: 00000000 00000000 00000000 00000000
    0x0007fa18: 00000000 00000000 00000000 00000000
    Instructions: (pc=0x03920780)
    0x03920770: 03 00 74 05 e8 85 1b 77 76 33 d2 89 14 24 8b fe
    0x03920780: 8b 4e 04 8d 14 24 e8 05 65 e0 ff 8b d8 8b d3 8b
    Stack: [0x00040000,0x00080000), sp=0x0007f9a8, free space=254k
    Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
    C 0x03920780
    C 0x031e3171
    j WsqLib.BitmapToWSQ()I+0
    j WsqLib.main([Ljava/lang/String;)V+24
    v ~StubRoutines::call_stub
    V [jvm.dll+0x87599]
    V [jvm.dll+0xdfbb2]
    V [jvm.dll+0x8746a]
    V [jvm.dll+0x8e6ac]
    C [java.exe+0x14c5]
    C [java.exe+0x69cd]
    C [kernel32.dll+0x16d4f]
    Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
    j WsqLib.BitmapToWSQ()I+0
    j WsqLib.main([Ljava/lang/String;)V+24
    v ~StubRoutines::call_stub
    --------------- P R O C E S S ---------------
    Java Threads: ( => current thread )
    0x009f2b28 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=3996]
    0x009f1820 JavaThread "CompilerThread0" daemon [_thread_blocked, id=2832]
    0x009f0a68 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=404]
    0x009eb330 JavaThread "Finalizer" daemon [_thread_blocked, id=3304]
    0x009e9eb0 JavaThread "Reference Handler" daemon [_thread_blocked, id=1648]
    =>0x00036d88 JavaThread "main" [_thread_in_native, id=3572]
    Other Threads:
    0x009c8508 VMThread [id=492]
    0x009f0528 WatcherThread [id=2924]
    VM state:not at safepoint (normal execution)
    VM Mutex/Monitor currently owned by a thread: None
    Heap
    def new generation total 576K, used 497K [0x22a50000, 0x22af0000, 0x22f30000)
    eden space 512K, 84% used [0x22a50000, 0x22abc5b8, 0x22ad0000)
    from space 64K, 99% used [0x22ae0000, 0x22aefff8, 0x22af0000)
    to space 64K, 0% used [0x22ad0000, 0x22ad0000, 0x22ae0000)
    tenured generation total 1408K, used 115K [0x22f30000, 0x23090000, 0x26a50000)
    the space 1408K, 8% used [0x22f30000, 0x22f4cc28, 0x22f4ce00, 0x23090000)
    compacting perm gen total 8192K, used 20K [0x26a50000, 0x27250000, 0x2aa50000)
    the space 8192K, 0% used [0x26a50000, 0x26a553b8, 0x26a55400, 0x27250000)
    ro space 8192K, 63% used [0x2aa50000, 0x2af60590, 0x2af60600, 0x2b250000)
    rw space 12288K, 46% used [0x2b250000, 0x2b7f21b0, 0x2b7f2200, 0x2be50000)
    Dynamic libraries:
    0x00400000 - 0x0040d000 C:\WINDOWS\system32\java.exe
    0x7c900000 - 0x7c9b0000 C:\WINDOWS\system32\ntdll.dll
    0x7c800000 - 0x7c8f4000 C:\WINDOWS\system32\kernel32.dll
    0x77dd0000 - 0x77e6b000 C:\WINDOWS\system32\ADVAPI32.dll
    0x77e70000 - 0x77f01000 C:\WINDOWS\system32\RPCRT4.dll
    0x77c10000 - 0x77c68000 C:\WINDOWS\system32\MSVCRT.dll
    0x6d640000 - 0x6d7dd000 C:\Program Files\Java\jre1.5.0_12\bin\client\jvm.dll
    0x77d40000 - 0x77dd0000 C:\WINDOWS\system32\USER32.dll
    0x77f10000 - 0x77f56000 C:\WINDOWS\system32\GDI32.dll
    0x76b40000 - 0x76b6d000 C:\WINDOWS\system32\WINMM.dll
    0x6d290000 - 0x6d298000 C:\Program Files\Java\jre1.5.0_12\bin\hpi.dll
    0x76bf0000 - 0x76bfb000 C:\WINDOWS\system32\PSAPI.DLL
    0x6d610000 - 0x6d61c000 C:\Program Files\Java\jre1.5.0_12\bin\verify.dll
    0x6d310000 - 0x6d32d000 C:\Program Files\Java\jre1.5.0_12\bin\java.dll
    0x6d630000 - 0x6d63f000 C:\Program Files\Java\jre1.5.0_12\bin\zip.dll
    0x10000000 - 0x10075000 D:\Jagadeesan\JNI_NEW\WSQ\WsqLib.dll
    0x79000000 - 0x79045000 C:\WINDOWS\system32\mscoree.dll
    0x7c140000 - 0x7c357000 C:\WINDOWS\system32\MFC71D.DLL
    0x10200000 - 0x10287000 C:\WINDOWS\system32\MSVCR71D.dll
    0x77f60000 - 0x77fd6000 C:\WINDOWS\system32\SHLWAPI.dll
    0x77120000 - 0x771ac000 C:\WINDOWS\system32\OLEAUT32.dll
    0x774e0000 - 0x7761c000 C:\WINDOWS\system32\ole32.dll
    0x4ec50000 - 0x4edf3000 C:\WINDOWS\WinSxS\x86_Microsoft.Windows.GdiPlus_6595b64144ccf1df_1.0.2600.2180_x-ww_522f9f82\gdiplus.dll
    0x5d360000 - 0x5d36e000 C:\WINDOWS\system32\MFC71ENU.DLL
    0x79e70000 - 0x7a3d1000 C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll
    0x78130000 - 0x781cb000 C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_0de06acd\MSVCR80.dll
    0x7c9c0000 - 0x7d1d4000 C:\WINDOWS\system32\shell32.dll
    0x773d0000 - 0x774d2000 C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll
    0x5d090000 - 0x5d127000 C:\WINDOWS\system32\comctl32.dll
    0x790c0000 - 0x79ba6000 C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\mscorlib\bf3b003e3ac7e449bdf8fc9375318452\mscorlib.ni.dll
    0x79060000 - 0x790b3000 C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorjit.dll
    0x5e380000 - 0x5e409000 C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\diasymreader.dll
    VM Arguments:
    java_command: WsqLib
    Launcher Type: SUN_STANDARD
    Environment Variables:
    JAVA_HOME=C:\Program Files\Java\jdk1.5.0_12;
    CLASSPATH=C:\Program Files\Apache Software Foundation\Tomcat 5.5\shared\lib\*.jar;C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\axis\WEB-INF\classes\org\apache\axis\transport\http\*.classs;D:\JONAS_4_6_6\lib\ext\axis.jar;C:\Sun\jwsdp-1.6\jaxp\lib\endorsed\sax.jar;C:\tomcat50-jwsdp\jaxp\lib\endorsed\sax.jar;C:\Files\Java\jdk1.5.0_01\jre\lib;C:\Program Files\Java\jdk1.5.0_12\jre\lib\ext;
    PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;D:\Jagadeesan Backup\DotNet\DynamicLibrary\MathFuncsDll\Debug;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;C:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\Microsoft SQL Server\90\DTS\Binn\;C:\Program Files\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies;C:\Sun\jwsdp-1.6\jaxrpc\bin;C:\Sun\jwsdp-1.6\jaxp\lib;C:\Sun\jwsdp-1.6\jaxp\lib\endorsed;C:\Program Files\Java\jdk1.5.0_12\bin;C:\Sun\jwsdp-1.6\jwsdp-shared\bin;C:\Program Files\Microsoft Visual Studio\Common\Tools\WinNT;C:\Sun\jwsdp-1.6\jaxrpc\bin;C:\Sun\jwsdp-1.6\jaxp\lib;C:\Sun\jwsdp-1.6\jaxp\lib\endorsed;C:\Program Files\Java\jdk1.5.0_12\bin;
    USERNAME=Administrator
    OS=Windows_NT
    PROCESSOR_IDENTIFIER=x86 Family 15 Model 1 Stepping 2, GenuineIntel
    --------------- S Y S T E M ---------------
    OS: Windows XP Build 2600 Service Pack 2
    CPU:total 1 (cores per cpu 1, threads per core 1) family 15 model 1 stepping 2, cmov, cx8, fxsr, mmx, sse, sse2
    Memory: 4k page, physical 259888k(81380k free), swap 636388k(342588k free)
    vm_info: Java HotSpot(TM) Client VM (1.5.0_12-b04) for windows-x86, built on May 2 2007 02:07:59 by "java_re" with MS VC++ 6.0

    Is there any other reason for this error?There is one and only one reason for the error code 0xc0000005 - there is a pointer (C/C++) pointing somewhere it shouldn't.
    The above C code working fine while invoking in VC++ Exe application,
    But the error occured only while invoking in java using JNI.Which suggests only that sometimes that it works. It doesn't mean that it always works.
    There are a number of places in the C/C++ code where it could fail and none of them are being checked.

  • Dll for java help...

    I 'd like to create a specific dll usable by java and i just have one dll not usable with java.
    i need your help if you know a routine, program .. that create automatically my dll for my java use.

    So im'going to be clear for people of all the world
    I'm working on a project in which i have to communicate with an video acquire board. I must retrieve video signal send by the camera to the video acquire board.
    Video acquire board constructor gives me a dll and a lib with functions but has not anticipated that maybe somebody will use a java program (Bad for me to be polite...)
    My problem is to call the methods of the constructor dll in java .I must use jni to generate a specific dll undertsood by java (dll containing a c and a h file with JNIEXPORT syntax.)
    But the constructor dll is not correctly written by the constructor to be interpreted by java.
    So the dll i must generate has to communicate with constructor dll and there, it is the dark side...
    Can you help me or have i lost you?

  • Jmc.dll crashes java.exe

    First of thanks Sun's engineers for hard work on Java and JavaFX! I really enjoyed the features and demos from javafx.com.
    Unfortunatly all of the demos involving media playback are crashing java.exe with jmc.dll being guilty (probably access violation - jmc.dll in the error dialog reports 0.0.0.0 version - but not sure). Well, I think it is my system's fault, because when I got rid of all codecs that could play mp3, java.exe stopped crashing (at least for DraggableMP3Player demo, SimpleVideoPlayer crashes without writing hs_err), but gave me MediaUnsupportedException. Regarding fixing my system - I'd like to avoid the pleasure of reinstalling Windows and I think it would be good for others having this problem to nail the cause of it. Could you explain how jmc.dll is dealing with platform codecs? How it checks what is installed? Does anyone else seen jmc.dll crashing java? Could it be hardware issue (I have nforce2 sound card)?
    I've created issue [http://javafx-jira.kenai.com/browse/RT-2530] if you have the same problem please vote for it (you first need to register for free :))

    I sure have put some work in this bug. I hope this will be gone soon :). I'm somewhat surprised that nobody seen it beside me - no votes, no blogs about it. But UnsupportedMediaException is known for sure and I believe it is related (that's why I've voted for it). Thanks for all your sweat, tears and blood you put in JavaFX! :)

  • How to use the Rc4DLL.dll with java (jre1.4 )

    I am not able to use Rc4DLL.dll with java, there are some characters (encrypted using Rc4DLL.dll) that java is not able to identify. So while decrypting in java using Rc4DLL I am not getting the desired output (as some character java tries to decrypt are not supported with java). Could some one give a solution of using Rc4DLL with java jre 1.4

    RC4 cipher is supported by 1.4.
    And surely you can turn a link to the 1.5.0 JCE Reference Guide into a link to the 1.4.2 Reference Guide? I did. Took me 5 seconds to check that. As opposed to wasting a day and a half in forums like you just did.

  • Ok writing DLLs in Java

    Can I compile a DLL using java! Or how about an ActiveX! And if I can how?

    You used to be able to this with Microsoft J++ (Visual Studio 6). I don't think this is supported any more though. There is a thing called J# which is part of .NET which will allow you to write code for the CLR (Common Language Runtime), but I doubt you will find it to be "pure" Java. It's more likely a "java-like" language as J++ was, and I don't know if you can write DLLs, I think it may only be ".NET Components" that you can write. (Don't really know much about this)
    If you are wanting to write an ActiveX DLL and want to do it in Java, I think you are probably barking up the wrong tree. If you don't want to go down the complete C++ path, you could try Visual Basic. VB is a simple language and it shouldn't take long to learn.
    If you are trying to access Windows features or applications not available from the standard Java APIs, then you will need to use JNI. Of course you will probably still have to code a C++ dll to act as a "wrapper" for your JNI class (JNI calls the wrapper which calls the native code).

  • Exception: no ocijdbc9.dll in java.lib.path

    I have oracle9i Minimal Edition for Win2000 installed, I tried to run my sample java code to test ocijdbc driver.
    The exception has been thrown like this:
    no ocijdbc9.dll in java.lib.path
    I've tried to search this file but not found.
    I don't know where I can download this file?
    I succeed with thin driver with my sample code.
    Anyway, I want to use oci.
    Please help.

    Hallo,
    the Lib is in ORACLE_HOME/bin and not in the lib-Directory like the documentation says.
    Hope i can help you.
    Michael

  • Icon DLL in Java

    I have a lot of icons I use for my java application and instead of having all the icons in the directory whether I could use microangelo to put them all in a DLL and then use that DLL in java to access the relevant icon I want, any help one this would be great, thanx =)
    Luppy

    I have to ask... why would you want to do this? The icons will get bundled into a jar file allong with the class files when you deploy, so what's te advantage. The disadvantge is you make your app. platform dependant.

  • How to access vc dll with java

    I need to access vc dll with java. Now I only have *.h,*.lib, *.dll,no *.cpp,because the dll is from others. I cann't modify the *.cpp files for java. so what should I do .
    Best wishes.

    Create a JNI wrapper for rhe dll:
    1)Create a java class that defines methods that correspond to the methds in the c++ dll
    2)compile this, and compile it with the jni compiler to get the c++ header files.
    3)Create a C++ file that implements the methods defined in the header file, calling the c++ code as necesssary and using the JNI helpess to translate parameters from java form to C++ from.
    4)Perform any initialisation of th c++ dll by adding a DllMain() or equivalent under unix/linux
    5)create a makefile to build a dll from the above, linking to your import (.lib) library
    6)make sure both DLLs are with your java class files when you run the java app.

Maybe you are looking for