0

I created a program and I want to make an installer for it. I have never done it before. Program uses RXTXcomm.jar and in order my program to work, some dll files has to be copied to JRE:

rxtxSerial.dll and rxtxParallel.dll to <JAVA_HOME>\jre\bin

so i wonder, how to make an installer that can copy these files? I tried "Inno Setup 5" but i can't find how to do that. I also tried "Advanced Installer" software, but can't figure it out so far.

3
  • you do understand this limits your application? dll is Microsoft, so basically: Windows only. with installer, I assume you mean a 'setup.exe' or similar? again: why writing Java code if you want your application to run in Windows only? there are better languages for that.
    – Stultuske
    Jun 16, 2014 at 7:59
  • I would not be amused when an installer changes other installations on my machine. Why don't you bundle an already set up JRE with your application? Jun 16, 2014 at 7:59
  • @Seelenvirtuose Good idea. but correct me if i am wrong: this means my program gain additional ~120mb? so far it takes about 5mb
    – PauliusM
    Jun 16, 2014 at 8:10

1 Answer 1

1

Using Advanced Installer you can create a custom action (DLL or VBScript) which search for the JAVA_HOME location and set the result into an installer property. You should add the custom action before the "CostFinalize" standard action. Then, you should create in "Files and Folders" page a property-based folder using the above installer property set by your custom action and add your DLL files under the property-based folder.

3
  • you can also add a bundled JRE advancedinstaller.com/user-guide/… Jun 16, 2014 at 11:28
  • what if new version of java is released after i installed my app? these dll's stays in old Java folder, but my program tries to use new version of Java...?
    – PauliusM
    Jun 19, 2014 at 6:10
  • There is no way to detect that a new JRE is installed and re-trigger the installation of your app. A better method is to bundle the JRE desired in your installer, so you app uses only that one: advancedinstaller.com/user-guide/… Jun 25, 2014 at 7:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.