How to package/inlcude C++ .exe and .dll files in a Java Web Start App?

Hello,
I have a Java Web Start application that runs fine if the application is only 1 .jar file.
But I have a need to also run C++ .exe and .dll file from my Java application.
I wonder if someone could please tell me how to package/include C++ .exe and
.dll files in my Java web start application?
Thank you and Best Regards,
Akino

You need to place the EXE and DLLs inside the jar.
Java cannot execute them from the jar. They have to be extracted (see Class.getResourceAsStream) from the jar and copyied into the target machine file system, perahps to the temp directory. Now you can execute them using Runtime.exec() or ProcessBuilder.start().
Edited by: baftos on Jan 14, 2011 6:49 PM

Similar Messages

  • How to setup Proxy for Java Web Start App ?

    I'm having trouble getting Java Web Start to work.
    at... http://java.sun.com/docs/books/tutorial/uiswing/14start/compile.html
    It tell me...
    To test whether your browser can launch an application using Java Web Start, click this link.
    http://java.sun.com/docs/books/tutorialJWS/uiswing/14start/example-1dot4/HelloJWS.jnlp
    I do that & see Java Web Start try to start but get message...
    Java Web Start - Invalid Argument
    Unable to launch specified application
    An error occurred while launching/running the application.
    Category: Invalid Argument error
    Could not load file/URL specified: C:\Documents and Settings\Will\Local Settings\Temporary Internet Files\Content.IE5\OP8RSBCV\HelloJWS[1].jnlp
    Then... http://java.sun.com/docs/books/tutorial/information/javawebstart.html tells me...
    "This situation usually happens when your browser and your copy of Java Web Start have different proxy settings."
    I click Start | Programs | Java Web Start | Java Web Start,,, then click File | Preferences | General
    My choices are... Proxies: None   User Browser _ Manual (User Browser grayed out)
    If _ Manual checked then I get...
    HTTP Proxy ______
    HTTP Port _______
    I'm running XP Pro via Wi Fi to a Linksys Wi Fi router to a cable modem... I'm also running Zone Alarm (tried turning it off but no luck)
    I don't know how to set up the Proxy stuff... can any one please help me get this set up.
    thanks - Will

    OK, on my XP Pro system I went to...
    Start IE -> Control Panel -> Internet Options -> Connections -> Lan Settings -> Proxy Settings
    This is my 'Local Area network (LAN) Settings panel...
    - user Proxy server for LAN is checked
    - Address is blank
    - Port is blank
    So do I plug something in here... the ip address of my linksys wi-fi router and a port number or what?
    My Java Web Start Preferences won't let me click 'Use Browser' only None or Manual
    If I click Manual, I don't know what to plug into the HTTP Proxy and HTTP Port fields...
    I tried the ip address of my router... thinking it may have a built in Proxy Server... and port 8080 as indicated by the Help page for the Java Web Start... but no luck.
    I really appriceate any help on this...
    thanks - Will

  • How to convert existed standalone APP to java web start app?

    hello:
    I didn't find useful information about how to convert an existed java
    app into app which can be launched using java web start from the sun java developer's guide.
    I have designed a simple java applcation and want to lauch this program with
    java web start techniques(on local machine only). Is there any easy way that i could convert my program to the one which support java web start, so i can double click the *.jnlp file to launch my java applcation.
    thank you
    -Daniel Mark

    i just found a great place to resolve my question.
    If you had the same question, please refer to
    http://www-106.ibm.com/developerworks/java/library/j-webstart/
    thank you
    -Daniel

  • Java Web Start didn't install with j2sdk-1_4_2_04-windows-i586-p.exe

    I just uninstalled all my java stuff from my XP Pro system
    then re-installed... j2sdk-1_4_2_04-windows-i586-p.exe
    With the SDK installation... j2re1.4.2_04 also installed... I think this is the Java Runtime
    But, before I had a folder for Java Web Start... not I don't...
    AND, the file... javaws-1_2-windows-i586-i.exe
    refered to on the Java Web Start Installation page isn't on my system anymore...
    (It was in an older vrsion of the Java Runtime... ( I had 2 java Runtimes at once installed, that is why I uninstalled... and even though I had Java Web Start, it wasn't working... so I deleted everything and reinstalled the j2sdk-1_2_04-windiws-i586-p.exe.)
    I would just download the java Web Start but the docs tell me it should be installed when the SDK and Runtime are installed... so I worry if I got the installation correct.
    Can anyone please advise me of how to get things working again.
    thanks for any help - Will

    I fixed this broblem just install both JDK and JRE.

  • Java Web Start and IE6 as the default browser on win2k

    Hi,
    I need to access web pages from my java web start app. These pages are on the save server and the same webapp context as the jsp page to launch the web start app, and are protected.
    I have tried with basic auth and servlet filter with cookie to control the access to the web server. When I need to access web server resource from web start app, I create the URL to the page I want to access, set the auth header or cookie and call the web start BasicService to open it in the default browser.
    With Netscape 4/7 or Firefox as the default browser, I have no problem to send the auth header or cookie from the web start app to the webserver for security checking and get access to the resource on the server.
    But it seems not woking when IE is set to be the default browser. I am always asked for userid/password if I use basic auth; or redirected to the login page if I use servlet filter and cookie.
    If anybody knows a solution for this IE dfficulity, could you please share it?
    harry

    How did you even get k9 on your iPad...it does not show up in my iTunes apps? So I
    Had to download it on my computer ...transfer it to my iPad... Now it's in my Dropbox
    On the iPad...but I can't figure out how to install it from here......I want a browser on my
    iPad that ihas parental controls...I see quite a few should be in the iTunes store..even
    Firefox....but not a one show up in my iTunes app store?????

  • Java Web Start and hsqldb

    How can I set hsqldb standalone database to use within a Java Web Start compliant Application?

    Yes, this shouldn't create any problems, you can run hsqldb as standalone:
    From the documentation (http://hsqldb.sourceforge.net/web/hsqlModes.html)
    The In-Process mode is also referred to as Standalone. In this context, Standalone means use within a standalone application as opposed to a client application accessing a database server. The database is running in the same Java Virtual Machine as the application. It acts as an embedded code library used by the application program. The application and the database engine communicate through normal JDBC calls but these calls are handled internally without a network connection.
    In this mode, only one application can access a database at a time. To access the same database at the same time from multiple JVM or computers the Client/Server mode must be used.
    The JDBC URL for the In-process (Standalone) mode is:
    jdbc:hsqldb:test
    where test is the database file name. Another example (Windows) is:
    jdbc:hsqldb:c:\db\test
    This means that you can refer to a file eg. in the JAR which contains the database.
    If you want to store between client sessions, you need to retrieve the file from the JAR and store it on the user's hard drive (f.eks. in the user's home directory) and then check if it exists when your application is started. If it does, open the hsqld file on the user's hard drive, it if doesn't retrieve it from the JAR which you are running app from.
    Hope this was understandable :)

  • How can I upload a file to the server where I save the Java Web Start Files

    Hello,
    Does anyone knows how to upload a file to the directory where I save the JAR files through the Java Web Start program. Thanks you

    ftp

  • Err. in programs copiled with Jdev 9.0.3 and run with Java Web Start

    Hi all,
    when I build my programs with Oracle9j JDeveloper 9.0.3.988 and I use them with Java Web Start, programs do not run, while when compiled with Oracle9j JDeveloper 9.0.2.x it runs without problems.
    The Java version used in both cases is 1.4.0.
    Here's an example of the log from Java Web Start:
    Error in JavaWeb Start
    viewer/imageViewer/ViewerAppState$1 (Illegal Variable name " val$files")
    java.lang.ClassFormatError: viewer/imageViewer/ViewerAppState$1 (Illegal Variable name " val$files")
         at java.lang.ClassLoader.defineClass0(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
         at com.sun.jnlp.JNLPClassLoader.defineClass(Unknown Source)
         at com.sun.jnlp.JNLPClassLoader.access$1(Unknown Source)
         at com.sun.jnlp.JNLPClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sun.jnlp.JNLPClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
         at viewer.imageViewer.UtilityMenuPane.jbInit(UtilityMenuPane.java:167)
         at viewer.imageViewer.UtilityMenuPane.<init>(UtilityMenuPane.java:155)
         at viewer.imageViewer.UtilityMenuPane.getInstance(UtilityMenuPane.java:147)
         at viewer.imageViewer.ImageViewerFrame.jbInit(ImageViewerFrame.java:179)
         at viewer.imageViewer.ImageViewerFrame.<init>(ImageViewerFrame.java:145)
         at viewer.imageViewer.ImageViewerFrame.getInstance(ImageViewerFrame.java:126)
         at viewer.ImageViewer.execute(ImageViewer.java:30)
         at viewer.Viewer.execute(Viewer.java:63)
         at viewer.Viewer.<init>(Viewer.java:27)
         at viewer.Viewer.main(Viewer.java:40)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at com.sun.javaws.Launcher.executeApplication(Unknown Source)
         at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
         at com.sun.javaws.Launcher.continueLaunch(Unknown Source)
         at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)
         at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)
         at com.sun.javaws.Launcher.run(Unknown Source)
         at java.lang.Thread.run(Thread.java:536)
    Does anybody know why this happens?
    Thanks

    Hi There.
    We had the same problem with some of our code. We moved the definition of the class from a method out of the method. Like this:
    public class{
    class{
    instead of doing this:
    public class{
    method() {
    class{
    This worked with the web start......
    Best regards
    Jesper Lorentzen

  • File creation and Java Web Start

    Hi All,
    I need to write a Java application with the following requirements and deploy the application using Java Web Start:
    - Load the properties file(say, "./props/xyz.properties")
    - Read the location where the file needs to be created from the
    loaded properties file
    - Now, create a file at the specified location.
    I am able to perform the initial 2 steps after including the "props" directory(which contains the xyz.properties file) in my sigend jar file. But, unable to create a file in the specified directory.
    Is it possible to create file at a predefined location(outside the jar file) within the server from where the application is downloaded?
    I have included the code segment which I tried :
    ClassLoader classLoader = this.getClass().getClassLoader();
    // load the properties file
    URL fileURL = classLoader.getResource("props/xyz.properties");
    Properties props = new Properties();
    props.load(fileURL.openStream());
    // read the location
    String location = props.getProperty("file.dir", "");
    String dir = classLoader().getResource(location).getPath();
    // create a new file
    File newEntry = new File(dir + "raghu.txt");
    newEntry.createNewFile();
    Is there a way to achieve this? If so, please let me know that.
    Thanks in advance,
    Raghu

    Allong with signing you jar, you need to request all-permissions in the jnlp file:
    <security>
    <all-permissions/>
    </security>
    /Dietz

  • How load driver with java web start?

    Hi,
    I use Java web start and the problem is that java web start can't be loaded the driver.
    Here is my error message :
    See com.borland.dx.dataset.DataSetException error code: BASE+83
    com.borland.dx.dataset.DataSetException: The driver: sun.jdbc.odbc.JdbcOdbcDriver could not be loaded. This could be a problem with the driver itself, or that the driver is not found on the classpath.
    at com.borland.dx.dataset.DataSetException.a(Unknown Source)
    at com.borland.dx.dataset.DataSetException.driverNotLoadedAtRuntime(Unknown Source)
    at ...
    In my .jnlp I put :
    <resources>
    <j2se version="1.3+" />
    <jar href="ManipulationLigneAS400.jar" /> it's my application
    <jar href="rt.jar" /> My driver JdbcOdbcDriver should be here
    According to another user of forum
    </resources>
    I don't know why it isn't correct.
    Someone could help me please?

    I 've changed my. jnlp
    <?xml version="1.0" encoding="UTF-8"?>
    <jnlp spec="1.0+" codebase="http://lu01d2k344:8080/webapp" href="manipLauncher.jnlp">
    <information>
    <title>Manipulation de tables</title>
    <vendor>Tarkett Sommer</vendor>
    <homepage href="manipLauncher.html" />
    <description>Manipulation de tables</description>
    </information>
    <resources>
    <j2se version="1.3+" />
    <jar href="ManipulationLigneAS400.jar" />
    <jar href="classes12.zip " />
    </resources>
    <application-desc main-class="manipulationligneas400.Application1" />
    </jnlp>
    I have already the same error message.
    See com.borland.dx.dataset.DataSetException error code: BASE+83
    com.borland.dx.dataset.DataSetException: The driver: sun.jdbc.odbc.JdbcOdbcDriver could not be loaded. This could be a problem with the driver itself, or that the driver is not found on the classpath.

  • My iTunes will not start.  The box on the error message APSDaemon.exe,  And message says "This application failed to start because MSVC80.dll was not found.  Reinstalling may fix."  I did the reinstall and I get the same error.

    My iTunes will not start.  The box on the error message APSDaemon.exe,  And message says "This application failed to start because MSVC80.dll was not found.  Reinstalling may fix."  I did the reinstall and I get the same error.  The error first happened after I approved the an iTurns update.

    Same problem today. Took five times to reinstall without any error messages. Apple has posted a way to fix and you should follow their's first. I finally got to upldate correctly by doing their fix but with one difference. I did the following:
    1) Went to the C:\program files (x86)\iTunes and C:\program files\iTunes folders and moved every file ending in .dll to the desktop (even if two files in same location had the same name, just replace)
    2) Restarted computer and still got error message
    3) Uninstalled all apple programs possible in the following order......itunes, apples software update, apple mobile device support, bonjour, and apple application support.....all performed using the microsoft control panel
    4) put all the .dll files on the desktop in the trash and emptied (this is a step apple support did not specifically put in their fix but for a final try I wanted to delete everything apple).
    5) Restarted computer.
    6) Re-installed itunes from apple website
    No error messages during re-install and was able to open shortcut in one try. Even updated my ipad to make sure everything was working.

  • How do I prevent iTunesHelper.exe and iPodService.exe from start-up?

    How do I prevent iTunesHelper.exe and iPodService.exe from starting every time I boot my PC. I want them to start only when I start iTunes.
    Thanks!
    Dave
    St. Louis

    Hi,
    iChat version through from version 2 to version 6 allowed you to choose whether to Save Transcripts of iChats.
    It was a setting in the App Menu > Preferences > Messages pane.
    In Messages beta this now longer happens and "Saving" is obligatory.
    By default the Chats are stored in a folder called iChats and this is normally in the Documents folder.  (they are still called iChats in Messages).
    In addition Messages Beta also stores some iMessage info in the Home Folder/Library/Messages
    You can access this via the Finder > Go Menu and holding the ALT ley to see the Library listing (It is normally invisible)
    The info is held in the chat-db database.
    At present you cannot turn Off saving the transcripts.
    10:17 PM      Friday; June 8, 2012
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
      iMac 2.5Ghz 5i 2011 (Lion 10.7.4)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.7.4),
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

  • How can i re-link .mpkg and .pkg files to hidden Installer?

    I am near the end of the process of setting up my new Mac Pro (early 2009) eight core. Quite the wonderful difference from my "Mirror Drive Door" dual 1.25 GHz machine!
    The Mac Pro came with Mac OS X 10.6.2 installed. I updated this to 10.6.6 via Software Update along with a slew of other updates presented there. I downloaded and installed a bunch of software. Finally, I was ready to install iLife 11 from the "CPU Drop-in" DVD that was on top of the box when the computer was originally unpacked.
    Unfortunately, it wouldn't even begin the install. The "iLife.mpkg" file, when double-clicked, returned the error message "no application associated with this document". Hours of investigation reveals that NO .mpkg or .pkg file will open; doing a "get info" on the files reveals that those files have lost their link to the Installer app.
    AND since the only installer I can find is hidden in /usr/sbin, there is no way I can re-link .mpkg and .pkg files to it via "get info".
    I downloaded Pacifist and used it to open the "Mac OS X 10.6.6 Combo" package and re-installed the Combo updater. Much to my surprise, that didn't fix the linking issue.
    I've logged in as root, but still can't re-link the package files to the Installer as /usr/ is still hidden. Is there a way I can temporarily "un-hide" the /usr directory so that "get info; open with" can see it?
    I've started from the Mac OS X installer DVD and repaired permissions on the hard disk and "repaired" the hard disk. No luck there either.
    I did a clean install of Mac OS X 10.6.2 to a different hard drive and applied the combo updater and the packages worked as expected there. So some software I installed or by running a slew of updaters via Software Update broke the link between packages and the Installer.
    I'm sure that re-linking to packages to the hidden installer app can be done via Terminal and possible other ways, but I don't know how to do it.
    Short of doing a complete Mac OS X 10.6 re-installation and update and having to re-do several days of other software installations and data transfers, I'm hoping someone will offer some solutions or tips on how to solve my problem.
    How do I re-link .mpkg and .pkg files to the Installer?

    Thanks for the reply. I know I had previously checked for the missing installer in /System/Library/CoreServices/ and I rechecked and it's still not there. But your tip spurred me to check the test 10.6.6 installation on the other hard disk and yes! It's there!
    A quick copy from the second hard disk to my current hard disk and doing the "get info" trick and everything now works wonderfully. Only one day lost to trying to figure this out. Now that the problem is fixed, quite the relief.

  • How can I using functions implicit in dll file in java code ?

    How can I using functions implicit in dll file in java code ?
    I'm developing a program that interfacing with fingerprint hardware.
    I have the finger print already, and I have to the SDK that have all functions for managing this fingerprint.
    These SDK functions are represented in dll files.
    I want to know how can I use these functions in java code .
    I looked on this link of sun forums :
    http://forum.java.sun.com/thread.jspa?threadID=305171&messageID=1215613
    but I don't Understand the meaning of native code.
    Thanks for help.

    please please please please please please please please help me:
    After reading a lot of articles, tutorials, and overviews about JNI (Java Native Interface)
    I found that these steps
    1.     Develop the Java code
    2.     Compile the Java code to a class file
    3.     Generate the header file
    4.     Implement the native method
    5.     Create the shared library or DLL
    6.     Run the Java program
    Is the common steps in JNI development
    The most powerful link was
    http://java.sun.com/docs/books/jni/html/start.html
    and
    http://www.netbeans.org/kb/55/beginning-jni-part2.html
    and the pdf oh this link
    http://www.ibm.com/developerworks/edu/j-dw-javajni-i.html requiring IBM registration to download it.
    But I have already the DLL, and want to the stright forward way to use its functions by java code only.
    I don not to write any C++ code .
    Is this possible???????????????????????????????
    The name of these dll is �zkemsdk.dll�
    It developed by ZKSOFTWARE company for managing a finger print �NP1500A�of
    http://www.napcogulfsecurity.com/finger_print.asp
    thanks for help

  • EXE and PIF files

    I think i got this exe and pif files on my mac after unsuccessful installation of windows.  I don't exactly know where I got this.
    Is it safe to delete all this files? Does my mac need this files to run its operating system? There are over 48,000 exe and pif on my mac. And I think its accumulating almost my HD space.

    So does it mean i can delete it? I'm afraid that it like an important file because of its name. Some of it is:
    yyxb.exe
    yjgyym.exe
    yyjovx.exe
    yydc.exe
    and thousands of it on my main folder and macintosh hd.
    So is it safe to delete those exe?
    How about those pif files?

Maybe you are looking for

  • All of the Users are missing in the File Sharing Prefs

    I was trying to straighten out an issue I was having with accessing my wife's iMac.  She has access to mine.  So then I gave up and was trying to save a Word doc to an external drive and it wouldn't work.  I checked Prefs and the Users are listed but

  • Unlocked iPhones - How to tell if it's unlocked

    Hello, Sort of hijacked another thread with this question - my apologies. Question is, if you were buying a second hand iPhone, is there a way to look and see whether it's unlocked or not? I see on my 3Gs there's a 'locked' icon in the middle at the

  • How do I run virtual machine on my MacBook Pro running Lion?

    I am trying to run virtual machine 7 on my Mac so that I can use windows 7 for some school projects. Whenever I try to run it I ger error messages saying this is not supported. Are there any patches?

  • Satellite A200 - Display driver stopped responding

    Periodically I see this warning: [http://s001.radikal.ru/i193/1002/2b/ee6a610aa864.jpg] It appears after short blackout by no reason. What is it? Satellite A200-1CR / Windows 7 Professional

  • How can I purchase 5 licenses for FCP X with my business account?

    Our Apple Store allows to purchase FCP X in blocks of 20+ but I only need 7.  I've purchase one and downloaded it but I need to purchase 6 more.  Can I do that with one business account or do I have to created Apple ID's for each computer?