Using a dll with java

I have to use a dll microsoft with java.
This dll allows a specific signature of SMIME. I know some more details about it.
I loaded the dll with System.loadLibrary ("cnascapi"); but I don't know what to do next.
I tried
cnascapi test = new cnascapi();
but the error is "cannot find symbol: class cnascapi.

Thank you.

Google for JNI tutorial and/or the tutorial of the JNA.

JNI is the traditional way to access native libraries via Java. JNA is a newer approach that is supposed to be simpler.

Tags: Java

Similar Questions

  • Impossible to use any website with Java

    Good then since I updated to Firefox 4 I can't use any Java at all. I tried searching for a solution, but none of them work. When I go to an area that requires Java, it tells me I don't have Java installed, and there is nothing wrong with my plugins. I have tried researching this problem and found that I need so-called version Java 6 Update 10 or more, and yet I have java version 6 update 11. So the problem is obviously with Firefox and not me...
    Now I'm forced to use Internet Explorer and God knows how horribly slow and prone to frost than the web browser. Even a slow browser is better than being unable to use a browser to all the... Help?

    The problem may be that you have a very old version of Java installed

    • It's 14 updates behind
    • a lot has know security issues
    • sites may not work if the site detects the old version riddled with security

    Yes, Java 1.6.0_10 is a minimum, but you should always keep your programs and your plugins updated to the latest versions.

    You need to update the following. The Plugin version (s) below has / have been submitted with your question and is obsolete. You need to update in order to avoid the known security issues with the version (s) you have installed. Click on 'more system info... '. "to the right of your question to see what was included with your question.

    • Java plug-in 1.6.0_11 for Netscape Navigator (DLL Helper)
    1. Check your plugin versions on one of the following links:

    2. Update the Java plugin to the latest version.
  • Using nilibddc dll with Python types

    I try to use this 'DiaDEM connectivity library' with Python to read files produced by our acquisition of data in the format *.tdms system, but examples of dll are all for C and Matlab. Has anyone else done that could give me advice? I made some progress (see below) by trial and error, but it is slow and I have to get it up and running quickly. I'm trying to reproduce the functions of the C example for reading a file (no need to write again).

    I'm using Python 2.6 on a Windows XP computer.

    Here's what I have so far:

    ------------------------------------
    # Module to manage a *.tdm and a *.tdms National Instruments TDM
    files in the format #.
    #
    types import *.

    #Define of the short names for the required dll functions
    DDCOpen = windll.nilibddc.DDC_OpenFile
    DDCNumGroups = windll.nilibddc.DDC_GetNumChannelGroups
    DDCReadGroups = windll.nilibddc.DDC_GetChannelGroups
    DDCGroupStrPropLen = windll.nilibddc.DDC_GetChannelGroupStringPropertyLength
    DDCGroupProperty = windll.nilibddc.DDC_GetChannelGroupProperty

    # File handles are pointers to 32-bit integer
    Czero = c_int (0)
    File descriptor = point (czero)

    # Retrieve a handle to the file
    DDCErrCode = DDCOpen (' Test_0919.tdms, 'PDM' file descriptor,)
    Print (DDCErrCode) # must be zero
    MyFile = real FileHandle.contents #The file handle

    # Find several groups
    grpnum = c_int (0)
    numPtr = point (grpnum)
    DDCErrCode = DDCNumGroups (myFile, numptr)
    Print (DDCErrCode)
    # Si DDCErrCode == 0: print (numptr.contents, grpnum)

    # Read groups [UNTESTED]
    groups = c_int (0) * grpnum
    grpptr = point (groups) # must be a pointer to the memory to organize grpnum
    Number of fields DDCChannelGrouphandle
    DDCErrCode = DDCReadGroups (myFile, groups, grpnum)
    Print (DDCErrCode)
    If DDCErrCode == 0: Print (groups)

    # Length of name of the Group [UNTESTED]
    namelen = c_int (0)
    nlenptr = point (name)
    DDCErrCode = DDCGroupStrPropLen (groups [0], 'name', namelen)
    Print (DDCErrCode)
    If DDCErrCode == 0: Print (namelen)

    #Make a buffer to hold the name, then get it back [UNTESTED]
    grpname = create_string_buffer(namelen+1)
    nameptr = point (grpname)
    DDCErrCode = DDCGroupProperty (groups [0], 'name', nameptr, namelen + 1)
    Print (DDCErrCode)
    If DDCErrCode == 0: Print (grpname.value)

    # Read the Group channels and get the names [UNTESTED]

    # Read the string # data values [UNTESTED]

    # Read the string of data values [UNTESTED]

    # Process the data values [UNTESTED]

    # Write data processed in a file in a different format [UNTESTED]
    ------------------------------------

    The "TESTED" sections are more or less pseudo-code representing things I have to do for now. The others work. These will be finally in a module.

    Cross-posted on some forums of Python.  Thanks in advance for any help.

    Kind regards
    Allen

    Can find out:

    http://Pypi.Python.org/Pypi/cTDMS/0.9

    or alternative link

    http://code.Google.com/p/ctdms/

    They seem to be exactly what you're looking for... (two years later)

  • How to use the nocopy with java stored procedures parameters

    
    --------------------------------------------------------------------------------
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    CORE    11.2.0.3.0      Production
    TNS for Linux: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production
    
    

    I'm a PL/SQL programmer, but not a Java programmer. I have the following java function that does what it's supposed to add a pdf at the end of another pdf document:

    import oracle.sql.BLOB;
    import org.apache.pdfbox.util.PDFMergerUtility;
    import oracle.jdbc.OracleConnection;
    import oracle.jdbc.driver.OracleDriver;
    import java.io.OutputStream;
    
    public class PDFUtilities {
    public static BLOB appendPDF(BLOB pdfdoc1, BLOB pdfdoc2) throws Exception {
           
            //create a connection object to the current instance
              OracleConnection conn = (OracleConnection)new OracleDriver().defaultConnection();
            //create the output blob using the connection
              BLOB outPDF = BLOB.createTemporary(conn, true ,BLOB.DURATION_SESSION);
            //create an output stream to the output blob
              OutputStream os = outPDF.setBinaryStream(0);               
            //instantiate the pdf merger utility
              PDFMergerUtility mergerUtility = new PDFMergerUtility();       
            //connect the merger to the output stream
              mergerUtility.setDestinationStream(os);
            //stream from each input blob into the merger utility
              mergerUtility.addSource(pdfdoc1.getBinaryStream());
              mergerUtility.addSource(pdfdoc2.getBinaryStream());
            //merge the 2 input pdfs
              mergerUtility.mergeDocuments();             
            //do not close the output stream
            //return the blob
            return outPDF;
        }
    
    }
    

    CREATE OR REPLACE package PDFTOOLS.pkg_pdf_utilities
    as
    function f_get_merged_pdf (
              pi_pdf1       blob
            , pi_pdf2    blob
      )
      return blob;
    end pkg_pdf_utilities;
    /
    
    CREATE OR REPLACE package body PDFTOOLS.pkg_pdf_utilities
    as
    function f_get_merged_pdf (
              pi_pdf1       blob
            , pi_pdf2    blob
      )
      return blob
      as language java name 
      'com.mycode.pdftools.PDFUtilities.appendPDF(oracle.sql.BLOB, oracle.sql.BLOB) return oracle.sql.BLOB';
    end PDFTOOLS.pkg_pdf_utilities;
    /
    

    It's very basic, but doesn't seem to work. However, I want to my function from PL/SQL to a procedure that looks like this:

    CREATE OR REPLACE package PDFTOOLS.pkg_pdf_utilities
    as
    procedure sp_append_pdf (
              pio_pdf2append2   IN OUT NOCOPY blob
            , pio_pdf2append   IN OUT NOCOPY blob
      )
    end pkg_pdf_utilities;
    /
    

    What is important, what I'm trying to do is to NOCOPY the BLOBs. Otherwise, I have to read my PDF files into 2 BLOBs and create a 3rd blob as output. I prefer to be able to keep the pio_pdf2append2 as the final output. What I actually do call thing in a loop to gradually add a PDF file to a big. I'm not linking this in one operation because of concerns over the use of the system and because the pdfbox library java has would have been question after 850 in PDF format, which is not completely unrealistic in my approach.

    How could I achieve this?

    Post edited by: Pollocks01 only formatted code blocks because atlassian {code} tags didn't work.

    Passage of an argument as input/OUTPUT requires the mapping to a Java array.

    Simplified example that adds one FOR the other:

    create or replace and compile java source named blob_appender_src as
    import oracle.sql.BLOB;
    import java.sql.SQLException;
    import java.io.OutputStream;
    import java.io.InputStream;
    import java.io.IOException;
    
    public class BLOBAppender {
        public static void run (BLOB[] p1, BLOB p2) throws SQLException, IOException { 
    
            InputStream is = p2.getBinaryStream();
            OutputStream os = p1[0].setBinaryStream(p1[0].length()+1);                
    
            byte[] buffer = new byte[1024];
            int len;
            while ((len = is.read(buffer)) != -1) {
                os.write(buffer, 0, len);
            }
            os.close();
            is.close();
        }
    }
    
    create or replace procedure blob_append (
      p_lob1  in out nocopy blob
    , p_lob2  in            blob
    )
    as language java name 'BLOBAppender.run(oracle.sql.BLOB[], oracle.sql.BLOB)' ;
    /
    
    SQL> declare
      2    p_lob1  blob := utl_raw.cast_to_raw('ABC');
      3    p_lob2  blob := utl_raw.cast_to_raw('DEF');
      4  begin
      5    blob_append(p_lob1, p_lob2);
      6    dbms_output.put_line(utl_raw.cast_to_varchar2(p_lob1));
      7  end;
      8  /
    
    ABCDEF
    
    PL/SQL procedure successfully completed.
    
  • How to use the funds application Flex with java

    Hello

    I've seen a lot of tutorials on using web application with java flex but you will not see even a tutorial for the application Office Flex with java. If anyone have pls send the link.

    is it possible to create java application and desktop application without using application server?

    Thank you.

    Hello

    Please see the link below.

    http://forums.Adobe.com/thread/601342?decorator=print&displayFullThread=true

    It could anser your query.

    Anser another is "Merapi project" - This allows you to connect to the local application of Java of the AIR application.

  • dial the node of the library - using a structure with dll

    Hi people.

    I expect to receive assistance or advice on solving this problem I am having in labview:

    Some background - I am using the 'call library node' to allow me to use a .dll file to control remotely via RS - 232 power supply.

    I did very well so far, but I'm now trying to use the following:

    int TC4GetFnBlockSettings (struct T_FnBlock * p_fnblock, unsigned int type)

    int TC4SetFnBlockSettings (struct T_FnBlock * p_fnblock, unsigned int type)

    where

    struct T_FnBlock

    {

    unsigned int BaseFunction;

    Double amplitude;

    paper Offset double;

    Double symmetry;

    Double frequency;

    int BipolarAmplitude;

    int RectifyAmplitude;

    Double ExpTimeConstant;

    unsigned int NumPeriods;

    unsigned int UserDefAmplitude;

    unsigned int UserDefTimePrescaler;

    Double UserDefPeriodLength;

    unsigned int UserDefNumPoints;

    unsigned int InactiveLevelType;

    Double InactiveLevel;

    unsigned int AAPInputType;

    unsigned int AAPInputFilterKoeff;

    unsigned int AAPFlags;

    Double AAPInputScaling ;} ;

    Of course there is no such thing as a structure in Labview; I had hoped to use a cluster in its place, but the CLN does not input or output of a cluster.

    Any help would be appreciated!

    Thank you

    A cluster is a struct. In this case you don't want really the structure, but the pointer, which is problematic. I have read several posts about problems with this. The simplest solution would be to expose a function with the struct as input instead of the pointer, if you can.

    /Y

  • can I use waiting fuction in java script with qml

    HII guyzz... How to use the wait in java script with QML function as if it takes 20 minutes to perform a specific operation or a process after that battery is 100%

    You are better off using QTimer for something like that.

  • XLIFF file format and use with JAVA API

    Hello

    We use BEEP version 5.6.3 in Oracle Applications 11.5.10.2 and we are developing some reports to be translated into 10 different languages. We are therefore very interested in XLIFF files but have some questions about the file format and the use of the JAVA API

    (A) FILE FORMAT
    Accuracy: we generate the XLF file in menu add-on BEEP in Winword MS used to build the RTF model
    (A - 1), the generated XLF file begins with:
    <? XML version = "1.0" encoding = "utf - 8"? >
    Can we change encoding to "ISO-8859-1' as soon as convert us the file format?

    A-2) section he < header > < skl > < file > internal - contains a huge chain that seeem to be binary... What is c? can delete us it?

    A-3) can you have a file XLF muliple < file > sections (one for each language translation)?
    This can be very useful for us to manage a translation only by a report model file.

    A-4) the most important section for translation is included in the tag < trans-unit >.
    Each of them has a separate as id "49e41f8f" '... '. Can we replace that with a larger significance?

    (A - 5) in the format of language is as "en-US" (area code + language code).
    It is case sensitive?

    (* B) THE USE OF XLIFF FILES WITH JAVA APIS *.
    We use the OPE "FOProcessor" class to generate the PDF providing:
    -Data generated by SQL report XML file
    -File XSL - FO, generated from the module BEEP in MS WINWORD RTF model
    -XLIFF file generated from RTF model by the module BEEP in MS WINWORD
    -The XLIFF file contains a file entry to translate the form English to French
    < file source = target language language "en-US" = "en - US" datatype = "OPE" original = "orphan.xlf" product-version = "orphan.xlf" - name of the product ="" > "

    Here is a summary of our java implementation class:

    Processor FOProcessor = new FOProcessor();
    processor.setData (sXmlDataFilepath);
    processor.setTemplate (sXslTemplateFilepath);
    processor.setOutput (sPdfOutputFilepath);
    processor.setOutputFormat (FOProcessor.FORMAT_PDF);
    processor.setLocale ("en - US");
    xInputXlfLang = new FileInputStream (sXlfLangFilepath);
    processor.setXLIFF (xInputXlfLang);
    try {}
    Processor.Generate ();
    }
    {} catch (XDOException e)
    e.printStackTrace ();
    }


    (variables beginning with "s" are path + names passed as arguments)


    The output PDF file is well generated, but not translated in French!

    (1) I missed something?
    What is wrong in my code or my XLIFF file?
    Y at - it a parameter to pass to allow the XLIFF translation (via setConfig)?
    With "setLocale" we indicate the target language, but how BEEP knows this current language is "en-US"?

    I found a few posts on the subject, but none with a clear solution. So if I managed to solve this problem, I think it can be very useful for many developers.

    Thanks in advance for your help.
    K.Helali

    Edited by: K.Helali Apr 26. 2010 01:56

    Hey,.

    I know what you're talking about.

    Do not make the rtf-> xsl in the office.

    Do it in java code.

    Use RTFprocessor, for her, just set the model and set the true extractxliff.

    move the xsl foprocessor.

    to do this

    (1) in the BEEP for MS Word
    1 - a) build the RTF model
    1-c) extract texts translateable to the XLF file

    (2) in BEEP Server (Linux Redhat, BEEP 5.6.3) included with the Oracle Applications 11.5.102
    (2 - a) write a java class that implements class FOProcessor (see code in my first post)
    I'm passing to the FOProcessor class
    -XML data file
    model model XSL - export RTF, file to the XSL using RTFprocessor file save it sub - (here in rtfprocessor.setextractXlifff - true)
    http://download.Oracle.com/docs/CD/E10415_01/doc/bi.1013/e12693/Oracle/Apps/XDO/template/RTFProcessor.html
    -Translation (via the FOProcessor.setXLIFF method) XLF file

  • Use a VI (with interface) in another DLL program

    Good afternoon

    I have a problem that I can't solve at all. I have a understoodable VI. It works fine. I can do a dll of this VI. And I want to call this dll in another program. The problem is, I have to wrap the dll with VS 2003 C++ to run in Digital Micrograph. When I call the dll, I can not control it since I can't access the GUI of Labview. Is there a way to export the graphic front panel in another software based on a dll?

    Thanks for any help.


  • problem with java and pogo games

    I use mozilla, and now with the problems with java and hackers cannot play my pogo, what can I do? I disabled my java I tried java 6 does not work or is not safe, what is a safe way to play games on pogo using java?

    Pogo.com is determined as a website SAFE to use Java with Mozilla Firefox?

  • Skype Api for video calls using SKYPE4COM.dll in c#

    I want to integrate Skype video call on my Web site, is there any /API tutorial using SKYPE4COM.dll refer.

    Please help me give some mention the link to Skype video calls with asp.net c#. because most of the links that I checked is dead or cannot be found.

    Means im not able to use Skype call video integration in my Web site?

  • With the help of a .dll with a CVS 1458RT file

    Hi, I am a student engineer currently working in my internship. I want to build a program with some OpenCV libraries using the .dll files. I can run in LabVIEW on WindowsOS. I used Visual Studio to compile and make my own .dll files. But I want to load on a CVS 1458RT. I read that this particular CVS uses 'Real-time NI Linux.'  My question is if I can load a .vi with .dll files on this particular CV, or if I have to compile the .so files so he could read since it runs on a Linux environment? I haven't tried to load it with .dll and afraid to do.

    According to this, you must compile with specific OS file type: http://digital.ni.com/public.nsf/allkb/2EA49B05E67DDECF86256F9A006FB315

  • Creation of DLL with LabWindowsCVI or MSVC?

    Hello

    first of all, I'm new on LabWIndows/CVI, but some experience with LabVIEW.

    So far, I usually create DLLs with MS Visual Studio and call functions exported with the library call node-VI.

    These dll provides some specific functions that are used in applications in real time and no time real (Windows, PXI and cRIO)

    Now, I saw that it is also possible to create DLLs with LabWindows/CVI.

    Is there an advantage using LabWindows/CVI? As special libraries that can be used, better integration with the rest of an application LabVIEW etc.?

    For now, I don't know for what purpose LabWindows/CVI should be used when creating LabVIEW applications.

    Could someone please give some short information if LabWindows/CVI provides better ways to create dlls for LabVIEW?

    Thank you

    Christian

    I wouldn't say that there is no benefit - if you develop a CVI application, then you have as a project CVI rather than being too dependent on one non-ICB IDE (for example. MSVS).  I usually group CVI application jointly with one or more DLL projects in the same workspace of the CVI.

    If you develop an application, MSVS, there is no advantage to the DLL in CVI that I can think of, unless you want to use libraries OR you cannot attach directly from your application MSVS - and I'm not sure that there are some who are like that - I think that you have access to the most If not all libraries OR through Measurement Studio when you use MSVS as your application development environment.

    Maybe someone of NEITHER can talk to the question that there is an advantage to the use of DLL of CVI authors with a LabView application.

  • Problem Windows install with Java

    A few days ago the Java (TM) automatic update for Windows Vista has started and I accepted and allowed him to install. I allowed the installer through my firewall, I use COMODO Firewall and the installer came to fine and started to install. Well well, not too long after it starts, maybe... 15 seconds, the installation ends and comes with a Java error, but also a Setup error indicating that there is something wrong with my Windows Installer. I have no idea how to solve this problem, nothing helps, I don't know what version I have, and I see is Windows Installer 4.5 and many other things that do not seem to resemble each other, they will work. Please help, I can't some uninstalled programs or installed because of this. Thank you.

    Hello

    Try this

    Windows install 4.5 Redistributable
    http://www.Microsoft.com/downloads/details.aspx?FamilyId=5A58B56F-60B6-4412-95B9-54D056D6F9F4&displaylang=en

    and if any;

    Description of the Windows Installer CleanUp utility
    http://support.Microsoft.com/kb/290301

    --------------------------------------------------------------------

    Do with these two

    IE - Tools - Internet Options - Advanced - tab click on restore, and then click Reset - apply / OK

    IE - Tools - Internet Options - Security tab - click on reset all default areas - apply / OK

    Close IE

    Then use Revo to uninstall Java, so you can reinstall - free Version
    http://www.revouninstaller.com/revo_uninstaller_free_download.html

    Reset.

    Now go back to Java and reinstall
    http://www.Java.com/en/

    ----------------------------------------------------------

    If so - get something contradictory and reset IE

    IE - tools - manage Addons (for sure disable SSV2 if it is there, it is no longer necessary but Java always install
    "(and it causes problems - you never update Java to go back in and turn it off again)." Search for other possible problems.

    Windows Defender - tools - software explore - look for problems with programs that do not look right. Permit
    are usually OK and "unauthorized" are not always bad. If in doubt about a program to ask about it here.

    Could be a free - BHOremover - BHO - standalone program, needs no installation, download and run
    http://securityxploded.com/bhoremover.php

    Startup programs
    http://www.Vistax64.com/tutorials/79612-startup-programs-enable-disable.html

    Update of Java (besure to go back and disable SSV2 Addon)
    http://www.Java.com/en/

    What antivirus/antispyware/security products do you use? That were ALREADY on your computer
    as remnants can cause strange problems.

    Hope these helps.

    Rob - bicycle - Mark Twain said it is good.

  • Problem with Java app.

    I recently did an update to java, then I was unable to play games. I followed the instructions to uninstall and reinstall, I have now is more java in my control panel ICON, every time I try and stall, he comes back with an error 25099 message Impossible to unzipp file can someone help me please understand this? Thanks in advance to anyone! Debbe

    Hi Debbe,

    In addition to that suggested David O, there may be still some Java tasks running in the background.

    I will propose a clean boot, running because it will kill services that are not applicable and should allow you to load Java without Java services that are running in the background to interfere with the installation of java.

    Here are the steps to follow;

    1. Log the computer by using an account with administrator rights.
    2. Click Start
      type msconfig.exe in the start search box and press ENTER to start the System Configuration utility.

      If you are prompted for an administrator password or for confirmation, type your password, or click on continue.

    3. On the general tab, click Selective startup, and then clear the check box load startup items. (The check box use the file Boot is not available.)
    4. Under the Services tab, click to select the skin all the Microsoft services check box, and then click Disable all.

      Note following this step lets Microsoft services continue to operate. These services include networking, Plug-and-Play, record of events, error reporting, and other services. If you disable these services, you can permanently delete all restore points. Do not do this if you want to use to restore the system with the existing restore points.

    5. Click OK and then click on restart

    Pasted from http://support.microsoft.com/kb/929135>

    After RESTARTING reinstall JAVA as described in David O display offline.

    If it installs successfully, follow these steps to perform a normal boot.  (Keep in mind when you are in a clean boot, your system will be vulnerable, so try to check that your downloads are secure and verified a site.)

    Again, here's how to get your system out of State starting in minimal mode and back in the normal startup mode.

    When you are finished troubleshooting, follow these steps to reset the computer to start as usual:

    1. Click Start
      type msconfig.exe in the start search box and press ENTER.

      If you are prompted for an administrator password or for confirmation, type your password, or click on continue.

    2. On the general tab, click the Normal startup option, and then click OK.
    3. When you are prompted to restart the computer, click on restart.

    Pasted from http://support.microsoft.com/kb/929135>

    Please let us know if that fixes the problem or if additional assistance is needed on this issue.

    Kind regards

    Debbie Microsoft Support Engineer answers visit our Forum of Microsoft answers Feedback and let us know what you think.

Maybe you are looking for

  • Virtual store Toshiba account reset - 33402

    Hello I have a Toshiba JournE and I need help for the store online (white screen on startup)Please make a reset of account, account number is 33402 Thank you!

  • Satellite A200 - question about drivers Touchpad

    Hello I want to format my Satellite to install windows XP, but in the page drivers, there are 2 different drivers of different brands. So my question is, how do I know which is the one I have to install? 1 3 PSAE6E - Satellite A200 - model

  • Timed loop continues to turn after stop

    Only, I have seen this time, but thought I should ask about it.  After pressing the stop button, I was surprised that the diagnostic LED on the front panel of the main vi kept flashing.  With the performance highlighting ONE values showed that the ti

  • startup programs are missing

    Hello ·         The problem : most of my laptop computer startup programs is missing (originally, I had 42 now 11) they does not appear in the startup list in msconfig. ·         Effects of the problem: most of the programs initially installed on my

  • How to upgrade drivers for Vista that worked on XP?

    I was told to contact the manufacturer it device drivers and the drive cannot be located. Is there another way?