How to add dll file in a Jar to create executable file

Hi All!
I have one Java file which use one Jar file & three dll file.
I create jar file as described in java tutorial
http://java.sun.com/docs/books/tutorial/deployment/jar/appman.html
1) I created Manifiest.txt by writting :
Class-Path: C:\Flasher\jflashtrial\JFlash.jar
Main-Class: Flaher2
2) I create jar file by:
jar cfm MyJar.jar Manifest.txt *.class
It create MyJar.jar successfully.
After that I used Jar2Exe Wizard to create Myjar.exe
It also create MyJar.exe file, but when I tried to open It , It did open & also didn't give any error message too.
Before this I created one exe file by the same way except; that file does not using any dll or jar file so for that I create my jar file by simply without using Manifest.txt
I wrote:
jar cf MyJar.jar *.class
After that I creat it's exe bu using Jar2Exe, It create its exe file & it's work well.
So for my next try with one jar file & three dll file, what is wrong ?
I saved my exe jar file & dll filea file in a same folder. But still have a problem .
What I did wrong/skip in creating Jar file.
Your any help regarding this topic would be appreciated
Kirti

Hello,
Getting all of this to work right is a bit of a challenge. I haven't used jar2exe at all, but we have a number of native libraries that we support that have to use dll's. I would recommend adding a static initializer like
public class flup {
static {
try {
System.loadLibrary("flup"); // will look for flup.dll in the %PATH%
} catch (Exception e) {
e.printStackTrace();
This should give you a little more information about what is failing. Chances are the dll's are not in the PATH. You may be able to get around this by using regsvr32 to register the Dll's but I have had mixed results with that solution.
You also may be able to write a simple c++ program that uses the dll's (or maybe you already know of one) and use the "depends.exe" program from Microsoft's Platform SDK to examine the full dll dependency tree if you continue to have problems.
Best of Luck,
Andrew

Similar Messages

  • How to add dll file in plugin

    Hi everybody,
    I have a short question concerning the plug-in.
    I created a plug-in  using visual studio 2005 for Adobe effect cs4
    but i want to add dll on that plugin so,how to add dll in that plugin
    please help me!!!!
    Thanks

    Any other dependencies apart from C/C++ runtime, for example cuda
    runtime which you cannot link against statically - you have to copy it
    into After Effect support files, where the executable lives (or in
    windows library directory, but that i would rather not do)!
    Am 19.06.2011 16:15, schrieb shachar carmi:
    to include external dependencies in the plug-in, go to:
    Project Properties -->  C/C++ -->  Code Generation
    and change the "Runtime Library" to "/MT"
    this should make the compiler include the needed code from other DLLs in your code.

  • How to add dll file to EAR project

    hi,
    i am working with JNI . how to add .dll files to EAR for deployment in NetWeaver.
    regards
    Guru

    HI
    GOOD
    GO THROUGH THESE LINKS
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/2583bbf9-0701-0010-8db5-a558e0c6f1fe
    http://support.businessobjects.com/documentation/product_guides/boexir2/en/xir2_bip_install_en.pdf
    THANKS
    MRUTYUN

  • How to add Mac27" to existing home network? and read files on other PC computers (Window7)

    How to add Mac27" to existing home network? and read files on other PC computers (Window7).
    type of connection:
    All computer (PC & Mac) connect to router (ethernet or wireless), then connect to internet.
    condition:
    internet works fine on all computer (PC & Mac).
    existing 4 PC communicate well (share files & printers),
    my problem:
    can NOT add Mac into existing home network.
    I tried SYSTEM PREFERENCES, then NETWORK, then ......... several times
    could not make it work.
    pleas help.

    Ah, it looks like I should have read your title more carefully. Are the  files on the PCs that you want to share with your iMac in a shared folder?
    If not, follow the steps on this page to set up shares from Windows 7.
    If that is already set up, connect to the share from the iMac using this article.

  • How to add zooming and printing in e-magazine created by indesign?

    Could you please give ma an advise me how to add zooming and printing in e-magazine created by indesign? Many thanks

    Ooohh... you mean, like the one mentioned in http://indesignsecrets.com/adding-zoom-and-print-to-indesign-swf-files.php?
    But they want to get paid for their hard work, the bastards!

  • Does Anyone know how to add a new partner to purchase order created on VI01/VI02?

    Does Anyone know how to add a new partner to purchase order created on VI01/VI02?
    Please, anyone knows that?
    Regards.
    Rafael.

    Anyone?

  • HT1918 how to add debit card to iTunes account or create account without credit card

    how to add debit card to iTunes account or create account without credit card?

    Debit cards are no longer accepted in the iTunes Store, it seems. The current valid payment methods are listed here:
    http://support.apple.com/kb/HT5552
    Using a debit card in any online service where it stores your card is a bad idea in any case since if someone gains access to your account in the service, they can quickly drain your bank account. Credit cards limit your liability, as do prepaid iTunes cards.
    Regards.

  • How to Create Executable file for a project for Crio Platform

    hi,
    i am using CRIO 9014  platform  for my application development.
    i am controlling (   Reset  &  then Run )  FPGA   from RT application .
    Through TCP/IP  communication the  Acquired data  (   from FPGA  then followed by some Computation Logic in RT )   is sending   to HOST computer .
    during the above process  
    First i am starting the RT Application    (  the TCP  network will be continuously in listen mode )    then
     i am  starting my HOST Application   in the project .
     here i want  to build my complete project as an  executable file 
    so that i no need to start  RT Application first and then HOST Application.
    Could you please send me One sample Project           with built in simple  ADC Acquisition  loop /  logic  in FPGA  ,  then  one sample logic  / while loop   in RT   to   acquire  this ADC data from FPGA and  send to HOST    via  TCP/IP network then   the  HOST   with GUI    for  Display in the HOST .
    This  complete project should be build in  .exe  file .
    Please  complete project  files  and .exe file    as a  zip file.
    Regards,
    Venkat

    Hi,
    I might be confused but what I understand from what you have mentioned is that you want to create a project having two VI's. One running on your FPGA target and another running on you host computer.You want to build a single executable file to complete the entire operation.
    Unfortunately you cannot have both VI's in same executable file. You can build one executable file and deploy on your FPGA target that will start running as soon as the target is booted. And you can create another executable file for running VI on your host computer. And instead of using TCP to transfer data, you could use "Interface FPGA" from FPGA module to communicate between your host computer and communicate.

  • Search multiple folders for files with same name and create single file

     I have a project where I need to search multiple folders for a file name and when found append data from each file to a single input file.
     Example
    root folder to start search
    \\servera\sales
    \\servera\it\salesa\cmmstr.txt
    \\servera\it\salesb\cmmstr.txt
    \\servera\it\salesc\cmmstr.txt
     I need to create a a single cmmstr.txt on the root folder. I would like it to be able to run this with parms to pass in folders to search and file names to search and single file name to create. I'm going to have a least 10 differnt files to
    search for and create output file for. The folders to search
    will somewhat be static.
     Thanks.

    I tested this out on my own seat and I think it should work for you. I wrote it as a function, all you have to do is pass the root folders you want to search and the file your looking for. The function will then search that directory and all sub directories
    for that file name. you will also have to provide it a file to append to, if the file dosen't exists the function will create it. If you run into an issues let me know and the links Mike
    Laughlin posted are a great resource.
    Function Search-Files{
    Param([String[]]$Locations, $SearchFor, $AppendTo)
    Begin
    If(-Not (Test-Path $AppendTo)){New-Item $AppendTo -ItemType File -Force}
    Process
    ForEach($Location in $Locations)
    $Files = Get-ChildItem -Path $Location -Filter $SearchFor -Recurse
    ForEach($File in $Files)
    Get-Content -Path $FIles.FullName | Out-File $AppendTo -Append
    End{}
    Search-Files -Locations "\\Server1\c$\Temp", "\\Server1\c$\Test1" -SearchFor "Install.cmd" -AppendTo "C:\Temp\Search.log"

  • How to add empty folder in a jar file ?

    Well
    I know how to add files in a jar file but I cannot add empty folder.
    I would like to do this so that when I get back the jar file I can have all the structure of the save main folder.
    I also test that it is possible to do that on line with the "jar" command.
    Does any of you know how to do this programacticaly ?
    Thanks in advance

         JarOutputStream jos = // ...
         jos.putNextEntry(new JarEntry("directory/"));
         jos.closeEntry();
         jos.finish();
         jos.close();on the command line:
    jar -tf <your_jar_file.jar>

  • How to add my class into rt.jar file?

    Hi, everyone!
    I am using WinRAR to extract the package rt.jar and added
    my class file to javax folder. Then I use jar c0vf to create
    a package. After that, I restart my WSAD4.0.2. But it seems
    that WSAD4.0.2 can not be started. (It stops at the welcome
    screen for a long time.)
    Anything wrong I have made? How to resolved the reouble?
    Cheers,
    George Ma

    Thanks!
    Do you know how to add .class file to a project of WSAD4.0.2?
    I use CLASSPATH, but always failed in IDE. But it works in
    command line environment. I want to use some classes in a
    .class file.
    Can you help?
    Cheers,
    George

  • How to add a directory into a jar file

    Hi, guys, I want to add a package into a jar file. For example, my dirctory structrue
    is org/test/, all files locate in the directory test, in org.test package. I want to
    add the package into a jar file, test.jar. I use "java -cvf test.jar -C org/test/ .
    But it says "jar: no match". How can I solve it.
    thanks

    Instead of 'java', use 'jar'.
    All in all, try this: jar cvf test.jar -C org/test/*.class.
    Have a nice day!

  • How to add dll library to application?

    I start programmed the CVI a few weeks ago and I have a little problem. I must make an application layer for profibus master device. However I total do not know how to add dynamic library to program, because in another way I get the error: undefined symbol. I know that it very trivial, but I cannot find solution. I have a lib file and also I include file about device, but I still get the error – undefined symbol – can you help me?
    Thanks very much for any advice or help

    Dear laszku,
    Are you looking for solutions to connect your CVI application with PLC? Because there are also solutions for that which are easy to use, and to implement with CVI.
    If you want to use your DLLs, there are some on-line help, how to import them in CVI.
    Basicaly there are two different method to import DLLs:
    - static import, when you import the library in your CVI project. The dll will be loaded when the exe starts running. If there is an issue to load the library, you'll be able to get the error at compilation time.
    - dynamic dll import, when you load the library at run-time. With this, you get the flexibility to control, when will be the dll linked to your exe in the memory, while running. The disadvantage is, you'll get errors only at run-time.
    I recommend you some of our on-line tutorial, how to load DLL into your application in CVI:
    CVI Help: Loading Dlls - This says: You cannot import DLLs directly into your project. You need to create DLL Import Library, which can be imported into your project.
    To do so, look at this knowledge base: Creating Import Libraries for a DLL in LabWindows/CVI
    You might get answers for your following questions at this FAQ page:
    FAQ: Using Dynamic Link Libraries with LabWindows/CVI
    Some help sites:
    Rules for Using DLL Files
    Linking to Functions Defined in a DLL From LabWindows/CVI
    If you need dynamic linkink, you can get example code with this site:
    How Can I Access DLL Functions in a LabWindows/CVI Program Without Including the Import Library in t...
    I hope, I could help you to find the way how to import DLL libraries.
    If you still couldn't solve the error after studying the links, please provide me more information, where, which symbol is missing, and also the full error message.
    The error you get, can be caused by the linker or pre-compiler also, which doesn't find the symbol you requested. Please check the path of your library and dll also.
    Best Regards,
    Tamas Szekely
    Applications Engineer
    National Instruments

  • How to add a new right-click menu entry in Nautilus file browser?

    I want to add a couple of new context menu entries to Nautilus File Browser.
    So when I e.g. right-click in View Pane on a file "foobar.conf" an menu entry "edit with gedit" should appear (among the other default entries).
    When clicked the file "foobar.conf" should be passed to gedit (and gedit editor opened).
    How can I achieve this?
    Under Ubuntu there are nautilus-actions but when I try to install them in Solaris with
    pkg install nautilus-actions
    then this package is not found.
    How else can I create my own context menues?
    I would appreciate to have one script with all my context menus, which when run add them all in one step.

    To manage selected files or directories, you can use specific Nautilus variables like NAUTILUS_SCRIPT_SELECTED_FILE_PATHS.
    For more details and which variables exist, please read the content of the following URL :
    Nautilus File Manager Scripts: Questions and Answers

  • XCode: how to add bison (yacc) "-p foo" for a SINGLE .ym file?

    I have two pairs of tokenizers (.lm) and parsers (.ym) I want to use in pairs.
    How do i add the -p "foo" option for a single file? And "-P foo" for (f)lex?
    (I can add options at the target level, that much I know...)

    Thanks.
    For some reason, the "build" pane is not present in a framework target. I had to move the .ym and .lm files to my Application target before it became visible.
    Another funny thing XCode does with the extra yacc or lex parameters is to pass them on to gcc when compiling the generated c file. So you also have to create empty files named for each prefix, or the compiler will choke.

Maybe you are looking for