How to use native dlls in jws

hi,all
I need to use native dll to read registry,I know nativelib label,but after I put the dlls to a jar,and use label <nativelib> to quote the jar,the system tell me error following:
JNLPException[category: Security error : Exception: null : LaunchDesc: null ]
     at com.sun.javaws.LaunchDownload.checkJNLPSecurity(Unknown Source)
     at com.sun.javaws.Launcher.downloadResources(Unknown Source)
     at com.sun.javaws.Launcher.prepareLaunchFile(Unknown Source)
     at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
     at com.sun.javaws.Launcher.launch(Unknown Source)
     at com.sun.javaws.Main.launchApp(Unknown Source)
     at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
     at com.sun.javaws.Main$1.run(Unknown Source)
     at java.lang.Thread.run(Unknown Source)
when I use jar href="..."to use this jar(This jar is packed dll files),the system tell me
com.sun.deploy.net.FailedDownloadException: Unable to load resourcesFfile:/H:/test/dist/lib/ICE_JNIRegistry.jar
     at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source)
     at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
     at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
     at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
     at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
     at com.sun.deploy.net.DownloadEngine.getResource(Unknown Source)
     at com.sun.javaws.LaunchDownload.downloadJarFiles(Unknown Source)
     at com.sun.javaws.LaunchDownload.downloadEagerorAll(Unknown Source)
     at com.sun.javaws.Launcher.downloadResources(Unknown Source)
     at com.sun.javaws.Launcher.prepareLaunchFile(Unknown Source)
     at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
     at com.sun.javaws.Launcher.launch(Unknown Source)
     at com.sun.javaws.Main.launchApp(Unknown Source)
     at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
     at com.sun.javaws.Main$1.run(Unknown Source)
     at java.lang.Thread.run(Unknown Source)
and
java.util.zip.ZipException: ZIP file must have at least one entry
     at java.util.zip.ZipOutputStream.finish(Unknown Source)
     at java.util.zip.DeflaterOutputStream.close(Unknown Source)
     at java.util.zip.ZipOutputStream.close(Unknown Source)
     at com.sun.deploy.net.HttpDownloadHelper.download(Unknown Source)
     at com.sun.deploy.cache.Cache.downloadResourceToTempFile(Unknown Source)
     at com.sun.deploy.cache.Cache.downloadResourceToCache(Unknown Source)
     at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source)
     at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
     at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
     at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
     at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
     at com.sun.deploy.net.DownloadEngine.getResource(Unknown Source)
     at com.sun.javaws.LaunchDownload.downloadJarFiles(Unknown Source)
     at com.sun.javaws.LaunchDownload.downloadEagerorAll(Unknown Source)
     at com.sun.javaws.Launcher.downloadResources(Unknown Source)
     at com.sun.javaws.Launcher.prepareLaunchFile(Unknown Source)
     at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
     at com.sun.javaws.Launcher.launch(Unknown Source)
     at com.sun.javaws.Main.launchApp(Unknown Source)
     at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
     at com.sun.javaws.Main$1.run(Unknown Source)
     at java.lang.Thread.run(Unknown Source)
now I'm not sure how to zip the dlls so that it can be used in nativelib?and how to used the <nativelib> label? just add it in the jnlp file ok?
Thanks.

>
Thanks,Andrew!>Your detailed and technically specific reply is all the thanks I need ( and probably more than I deserve ;).
I am still mulling (thinking) over your reply, there is nothing that 'jumps out at me' as being wrong with the way it is done, it all is looking like it 'should' work. The only other thing I can think to check is "did JaNeLA report any problems with it?"
Oh hang on, wait just a second..
If this webstart app. uses a native lib, it must declare security 'all-permissions'. See below for a 'hand written' variation to your posted JNLP file. Please make sure you validate these edits, since I did not (and I'm a little drunk, at this moment!).
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<jnlp codebase="file:/H:/test/dist/" href="launch.jnlp" spec="1.0+">
    <information>
        <title>Basic Application Example</title>
        <vendor>Sun Microsystems Inc.</vendor>
        <homepage href="http://appframework.dev.java.net"/>
        <description>A simple java desktop application based on Swing Application Framework</description>
        <description kind="short">Basic Application Example</description>
    <offline-allowed/>
</information>
<security>
  <all-permissions />
</security>
    <resources>
<j2se version="1.5+"/>
<jar eager="true" href="test.jar" main="true"/>
    <jar href="lib/appframework-1.0.3.jar"/>
<jar href="lib/swing-worker-1.1.jar"/>
<jar href="lib/registry.jar"/>
<jar href="lib/swing-layout-1.0.3.jar"/>
<nativelib href="lib/ICE_JNIRegistry.jar"/>
</resources>
    <application-desc main-class="test.TestApp">
    </application-desc>
</jnlp>Oh yeah, yeah. And if you could note for future posts..
When posting code, code snippets, HTML/XML(/JNLP) or input/output, please use the code tags. To do that, select the code, then click the CODE button seen on the Plain Text tab of the message posting form. This helps to retain the indentation and formatting of the text, and also helps avoid characters in the code as being interpreted as formatting (by the 'forum software'). ..And it also makes it pretty - but perhaps I should not mention that (it seems so 'un-hacker').
And BTW, what is that standalone=''no" attribute in the opening XML element? Are you +sure+ you validated this in JaNeLA?

Similar Messages

  • How to use the DLLs which created from c++ in Java?

    And How to use the DLLs which created from JNI in C++?

    Huh?
    Are you asking how to do JNI - you should read the tutorial.
    Are you asking how to load it - then use System.loadLibrary()
    Are you asking what to do with the output from javah - put it in a C file and write some code, compile it into a dll.

  • How to use native method

    how to use native methods

    ----- BEGIN CANNED RESPONSE -----
    Download and read Sheng Liang's book, ftp://ftp.javasoft.com/books/specs/jni.pdf
    Read the JNI specs on java.sun.com site ( http://java.sun.com/j2se/1.4.2/docs/guide/jni/index.html )
    Beware with the JNI tutorial on the java.sun.com site - it is slightly outdated, and the samples need modifications to compile
    ----- END CANNED RESPONSE -----

  • How to use the dll  created by c++ but not write a jni wrapper around

    how to use the dll created by c++ but not write a jni wrapper around through a java program. now I can't access that dll like this directly from java.

    Your question is unclear. (You haven't said what dll you are talking about.)
    But:
    If you are talking about an existing dll, then the only alternative to writing a wrapper is to use one of the wrapper generators floating around. Do a search on JACE.
    If you are talking about a dll you are writing, then run jah and get the interface to match java right away; then you won't have to write a wrapper.

  • How to use Native SQL statement in JDBC receiver interface

    Dear All,
    Can any one please help us in using Native SQL statement in a JDBC receiver channel. The reason why I need to use Native SQL statement instead of standard XML structure is that I need to execute a dynamic SQL query in third party database system lke:-
    Select Field1 Field2 from TABLE Where Field3 like "%Name'
    I expect the the response in the form of XML file which I can pick up using synchornous interface as mentioned on help.sap.com:-
    http://help.sap.com/saphelp_nw04/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/frameset.htm
    The value for %Name can change dynamically according to the transaction and hence cannot be inluded as a KEY element in standard XLM structure,
    Hence I need to know:-
    1. What message mapping I should use in case if I have to use Native SQL statement.
    2.What operation mapping I should use in case if I have to use Native SQL statement.
    If guess correclty I may have to use Java mapping to do the above activities. Hence I want to know
    3 .How do to go about it to do the Java mapping.
    Thanks
    Ameet

    >
    Ameet Deshpande wrote:
    > Dear All,
    >
    > Can any one please help us in using Native SQL statement in a JDBC receiver channel. The reason why I need to use Native SQL statement instead of standard XML structure is that I need to execute a dynamic SQL query in third party database system lke:-
    >
    > "
    > Select Field1 Field2 from TABLE Where Field3 like "%Name'
    > "
    > I expect the the response in the form of XML file which I can pick up using synchornous interface as mentioned on help.sap.com:-
    >
    > http://help.sap.com/saphelp_nw04/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/frameset.htm
    > http://help.sap.com/saphelp_nw04/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/frameset.htm
    >
    > The value for %Name can change dynamically according to the transaction and hence cannot be inluded as a KEY element in standard XLM structure,
    >
    > Hence I need to know:-
    >
    > 1. What message mapping I should use in case if I have to use Native SQL statement.
    > 2.What operation mapping I should use in case if I have to use Native SQL statement.
    > If guess correclty I may have to use Java mapping to do the above activities. Hence I want to know
    > 3 .How do to go about it to do the Java mapping.
    >
    > Thanks
    > Ameet
    You can use a stored procedure, and call it from jdbc receiver adapter.
    I also solve this issue, with a DBLookup in message mapping. You can refer to my blog, and this usefull 3d:
    http://simonlesflex.wordpress.com/2010/12/07/pi-oracle-dblookup/
    /people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
    /people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler

  • How to use Native XA in XE database?

    Hi,
    I am having problem in using XA datasource in XE. I understand if we are using XE database, jvm is not available. Thus, we have to use Native XA which requires using JDBC Thin Driver.
    My JBoss hit below error during initialization.....
    =====================================
    2006-03-28 16:14:27,645 INFO [org.jboss.system.server.Server] JBoss (MX MicroKernel) [3.2.3 (build: CVSTag=JBoss_3_2_3 date=200311301445)] Started in 1m:18s:482ms
    2006-03-28 16:16:05,887 WARN [org.jboss.tm.TransactionImpl] XAException: tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=snz-dcs-001//51, BranchQual=] errorCode=XAER_RMERR
    oracle.jdbc.xa.OracleXAException
         at oracle.jdbc.xa.OracleXAResource.checkError(OracleXAResource.java:1157)
         at oracle.jdbc.xa.client.OracleXAResource.start(OracleXAResource.java:295)
         at org.jboss.resource.adapter.jdbc.xa.XAManagedConnection.start(XAManagedConnection.java:143)
         at org.jboss.tm.TransactionImpl.startResource(TransactionImpl.java:1148)
         at org.jboss.tm.TransactionImpl.enlistResource(TransactionImpl.java:636)
         at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.enlist(TxConnectionManager.java:455)
         at org.jboss.resource.connectionmanager.TxConnectionManager.managedConnectionReconnected(TxConnectionManager.java:343)
         at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:483)
         at
    Can anyone help to enlighten?
    Or maybe provides me with basic configuration of using XA datasource in XE database so I can check whether my config is correct or not?
    Any help will be appreciated!
    Thanks before.
    Joel

    Hi,
    Here's an update regarding my problem with XA transaction using XE.
    I don't know exactly how, but it works now.
    Here are the steps I did :
    ===================
    1. I decided to try creating JAVA_XA package in XE database. I took the script
    from oracle enterprise edition.
    This package can't be compiled in XE Production version, but it can be compiled
    in XE beta version.
    2. After using compiling, the JBoss initialization was still failing.
    3. Backup the database (with JAVA_XA) , and upgraded the beta-version to
    Production version.
    4. Restore the database (with JAVA_XA) into the Production version.
    5. it works :))
    Hopefully I can get some inputs/comments from the experts here in the forum.
    Thanks for those who has responded to my previous posts.
    Regards,
    Yoel
    Good job! A nice extra mile.

  • How to use Native SQL String

    Hi all,
    How do i use Native SQL String in the Reciver JDBC Adapter.
    Do i need to change the message format could u suggest me some blogs on the same.
    Also please can anyone let me knw if i can use this for stored procedure.

    hi aditya,
    there shud be no format as such. for sql xml format there are specific structure. but for native sql there shudnt be any specific structure.
    as pointed in sap documentaion:
    Instead of an XML document format, a text is expected that represents any valid SQL statement.
    When inserting a line into a table the corresponding document looks as follows:
    INSERT INTO tableName  (column-name1, column-name2, column-name3) VALUES(‘column-value1’, ‘column-value2’, ‘column-value3’)
    so jus make sure that u give a valid sql statement becoz if will be passed as it is to the database and try ur scenario.
    regards,
    latika.

  • How to use Native SQL in Toplink

    I am using toplink in my project, can you please some one help me how to create native sql using toplink.
    I have seen EntityManager interface having method createNativeQuery, but how to create instance of EntityManager

    import javax.persistence.EntityManager;within class, place
    protected EntityManager  entityManager;of course make it public, private, whatever you need.
    Then, in your method
    entityManager.createNativeQuery(....);R. Grimes

  • How to use the DLL in crystal report (Additional applications)

    Hi,
    i have created a win32 dll, and now i want to use that dll in my crystal report how can i do so?, what i tried is i went to to Addntional functions catagory in formula workshop, and there i can see some dlls listed, similary i put my dll in the same path like "C:\Program Files\Common Files\Crystal Decisions\1.0\Bin" and other folder too. but i am not able to see that dll in "Addtional functions". can you plesase tell how can i achive this.
    Regards,
    Prabhakar J.

    Please re-post if this is still an issue to the .NET Development - Crystal Reports Forum or purchase a case and have a dedicated support engineer work with you directly

  • How to use AcroPDF.dll even if addon is deactivated in InternetExplorer

    Hello,
    hopefully someone can help me with my problem:
    I need to instantiate AcroPDF.dll and have it deactivated at the same time in InternetExplorers Addon-settings.
    But when I deactive the addon in IE, CreateObject("AcroPDF.PDF.1") throws an error that the instance could not be created, but the dll is still registered.
    How does this deactivation work technically? Is there any way to use the dll in other applications regardless of the IE-settings?
    Best regards and thanks in advance,
      Thomas

    For programming issues you should use the forum for Acrobat SDK.

  • How to use CRAXDDRT.DLL in crystal report 2008?

    Hello All,
    We have purchased Crystal report 2008 Full software.
    We need to insert BLOB field into Crystal report 2008 at runtime using *CRAXDDRT.DLL*.
    How can I insert OLE object and bind it at Runtime using crystal report 2008?
    Is it possible to insert Ole Object runtime using crystal report 2008? If yes how and if not is there alternative to perform this job.
    Please let me know your feedback.
    Thanks

    CrxDDrt.dll is only provided in order for the Crystal Reports designer in the .NET IDE.
    1) You are not licensed to use this CraxDDrt.dll
    2) Even if you were, in previous versions of CR, there were licensing implications to using the craxDDrt.dll (read $$)
    3) Once your project would be done, using CR 2008, you would not be able to distribute the runtime as there is no CR MSM or MSI that contains the craxDDrt.dll and it's supporting runtime.
    In your original post you say:
    "I need to show Word and Pdf file in to Crystal report 2008 using CRAXDDRT.DLL";
    I do not understand why you'd need to do this using the craxddrt.dll? You should be able to insert a BLOB field using the RAS SDK for .NET and CR 2008. Now, one hting you will have to keep in mind. If you insert a multipage .doc or .pdf file into the report, you will only get the first page of that document. I suggest you try this in the CR designer first. Always remember that if you can not do a certain thing in the designer, you will not be able to do it at runtime either. Giving all the limitations above, if you are still interested in doing this using RAS, let me know and I'll set you up with some resources to get you going.
    Ludek

  • How to use COM DLL in LabWindows

    Hello
    I have a COM .dll which looks like that when opened with dll export viewer:
    I would like to use the Get4AxisPos function in LabWindows.
    I understood that, as I only have the .dll, the only way of calling these functions are with the LoadLibrary() and GetProcAddress() functions.
    My problem is that the Get4AxisPos function is not of type Exported Function but COM Method so I don't know how to use it in my LabWindows project!
    My questions are: Is it possibleto use this dll in Labwindows? If yes how?
    Thanks
    Solved!
    Go to Solution.

    Hi ,
    I am new to C++ and COM  .
    i need to implement a client application in C(lab windows CVI) , server is a c++ COM object.
    steps followed by me
    ---> accessed the registered COM object with Labwindows CVI active x controller template,output was a c file which is implementation of the class names in COM (interfaces).
    I can use majority of the functions directly from the generated, but i need to implement some event functions like message box events and then use it.
    I have seen one method of accessing in C++ client sample ,
    which implements Queryinterface function...takes the IID_Unknown as input and returns interface pointer(inhereted static_castof the required class, uses static_cast for that) as output.
    when i try to follow up the same in c , i am lost  with the inheritance concept.
    In short i need to send IID Unknown to the Queryinterface function and should get the interface pointer of message box type or other class type ...
    Sorry for the long mail,Please guide me
    Thanks in advance ,
    Satish

  • How to Use native keyword in java programming

    Hi ,
    I am using JDK 1.6.0_11 , and i was trying to create a java program using "native" keyword ,
    i got the sample code for the same from the site : - http://www.javaworld.com/javaworld/javatips/jw-javatip23.html
    But when i type this command " C:\javah -stubs Happy " following error occurs
    " Error: JNI does not require stubs, please refer to the JNI documentation. "
    then typed " c:\javah -jni Happy" without any error .
    After that i wrote a HappyImpl.c as mentioned in the above tutorial
    #include <StubPreamble.h> /* Standard native method stuff. */
    #include "Happy.h" /* Generated earlier. */
    #include &ltstdio.h> /* Standard C IO stuff. */
    void Happy_printText (struct HHappy *this)
    puts ("Happy New Year!!!");
    then it is not compling and error is
    "unable to open included file StubPreamble.h file
    unable to open included file Happy.h file "
    Please help me . i want to use native method , i did exactly the same in tutorial at above link.
    Thanks & Regards
    Mannat

    you do need to know how to use your C compiler... It quite clearly can't find those files which indicates that you didn't tell it where to find them.

  • How to use libdb60.dll

    Hello,
    I'm a beginner with Berkeley DB and my question is: how to use the libdb60.dll with C++ Builder (Embarcadero) code?
    I created corresponding LIB with IMPLIB from dll and included it in the project, but the Exports section of LIB is very strange and the linker tell me "unresolved external".
    For example the entry related to the "open" bdb function, in the LIB is "?open@Db@@UAEHPAVDbTxn@@PBD1W4DBTYPE@@IH@Z".
    Why?
    How should I use the dll?
    The dll is the one provided with bdb setup, not built with MS VC++.
    Thanks.

    Thanks for fast reply.
    I had already read the chapter 5, but building the solution "Berkeley_DB.sln" (just db sub-solution) in the "build_windows" directory with VC++ 2008 Express, I got the error "mut_win32.obj : error LNK2019: unresolved external symbol ___emit__ referenced in function _func_mutex_pause".
    I'm not familiar with VC++ because I'm Embarcadero C++ Builder user.
    Therefore I used the dll in the "Berkeley DB 6.0.30.msi" installer,
    What the above error is?

  • How to use external DLLs in InDesign server plugin

    Hi,
    I am working on a project, which is having dependency on libxml2 library. I compiled the code on 64 bit Windows platform and using InDesign server 64 bit version. I put the required DLLs in Adobe InDesign CS6 Server x64 folder(with other DLLs). But now my plugin is not loading in server and also not throwing any error message on command prompt.
    If I remove the libxml2's method call, then plugin is loading successfully.
    Is there any other way to use external DLL or I am missing something?
    Thanks & Regards,
    Harsh

    Hi Sidharth,
    If you are using web dynpro DC perspective then you need to follow the following points to use the external jar files in it.
    1. Create a external library project.
    2. copy the external jars in the library folder os the projects.
    3.) Select all the jars from the u201CLibrariesu201D folder, Right click and then select Development Component and click on Add to Public Part
    4.Select the first Radio Button (Provides an API)and give some nameto it.
    5. Repeat the step no 3 but now select the second radio button other than as selected in step no 4.
    6. Now build your lirary DC.
    7. Now create a j2ee DC project.
    8. ) Expand the node DC Definition and Right Click on Used DC. Select Add Used DC.
    9. Select the External Library DC with build time dependency.
    10.Right click on the J2EE DC and then select Development Component followed by Build
    11. Right click on the J2EE DC and then select Development Component followed by Deploy
    now you can use both the libary DC and the j2ee DC in your web dynpro DC as used DC.
    But if you have created a web dynpro project only(but not DC) than you can directly add the external jars in java build path
    hope this will help
    regards
    Narendra
    Edited by: Narendra Singh on Oct 27, 2009 11:22 AM

Maybe you are looking for

  • How can you tell if your phone is unlocked?

    What screen in iTunes indicates if the iPhone is unlocked from the carrier?

  • Hp omini 10 won't start

    I have brought new omini tab. After updating and insert memory card tab was showing non responsive start button ocons. Now after trying many times it is not getting startedany more. This question was solved. View Solution.

  • SD Doc. is released for Invoice it is asking for CO object for Reveune A/c

    hi, friends, while Release billing SD document to accounting get the error Account 31211100 requires an assignment to a co object. In G/L cost element category assign 11 no How can solved this error. Dont suggest me to OKB9 or KE41 or Profit Center i

  • How to convert string to date format?

    Hi All, String is in following format: 2006-12-07 i.e yyyy-mm-dd I want it in 07.12.2006 date format. which function module should i used to convert it? Regards, Nilima

  • I have lost right click - auto open in new tab

    When I right click a link I used to get the page opened in a new tab automatically, this stopped several updates ago. I have been trying to fix it but have had no joy. There is a solved problem on the forum but I don't run any of the addons that seem