Install4j - embedding jar into generated launcher - install4j

I have 'generated launcher' which executes my java application - aplication is in jar package.
Is there any way how to include jar into generated EXE file(launcher)? Customer wants to have only exe file, not jar in installed folder. Is there any way how to do it?

There is no way to do that with install4j. You can do it with exe4j, by using the "JAR in EXE" mode and add the generated executable to the distribution tree instead of using the generated launcher. This only works for Windows, though.

Related

Is there a way to ensure that the correct JAR file is called by the Install4J service wrapper?

We are using Install4J v9 and our application needs to run as a Windows service. When we have installed the application as a Windows service, we have the original jar file myApp.jar and the service wrapper myApp.exe (which is running our jar file as a service) in the installation directory.
How can we ensure that our jar myApp.jar file is called by the service wrapper myApp.exe and not a substituted, fraudulent jar file?
I am wondering if jar signing would work, but how could install4j validate this signature?
install4j has no functionality to validate signatures of JAR files for inclusion in the classpath.
However, if an attacker can modify your JAR file, they can also modify your .exe file, so adding protection to the .exe against modification of the JAR file would not make anything safer.

Install4J - hide .jar file from installation directory?

I am currently working on turning my java application into a windows installer, converting the .jar into and .exe file.
Have chosen Install4J because of the ability to bundle JDK with the application, as well as recognizing previous installations when deploying updates.
Only problem I have, is the fact that the jar file for the application, is saved in the installation directory as well.
Does anyone know how to fix this? I don't want the original jar file in the directory, just the converted exe file.
The .exe file is just a launcher for the JVM, it does not contain natively compiled Java code.
The best way to protect your code is to use an obfuscator like ProGuard.

Best method to export the Eclipse project as exe file

I have a selenium project in eclipse that i want to distribute to manual testers with no Eclipse or Java knowledge. Hence i am looking to distribute it to them as executable files so that they dont need to use eclipse to run them. Can any one suggest the best way to do this without having to install any 3rd party extensions?
P.S : My organisation doesnt allow me to install 3rd party extensions on Eclipse. It will require a lot of approvals. Hence i am wondering if there is any method available inside Eclipse itself?
I've done it some years ago, in my eclipse version:
file -> export -> java -> Runnable jar file
If you want an exe file you can use: Launch4J
Export your project as jar file and create a .bat file which will include all the necessary libraries in your classpath with your project and then make a call to the underlying script (in case if you are using testng then testng has option to make command line calls)
else use Maven
EDIT:
Something on below lines:
1. Create run.bat file
2. Content of the bat file:
JAVA_HOME={Path to your JDK}
CLASSPATH=%PATH%;{All the dependent jar files of your project as well as you project}
{Call to your Junit Script from command line} Something like this Run JUnit from command line
3. Run your batch file (run.bat)
I may not have provided the exact code but thats where you should be heading if you wish to run your JUnit tests from command line.
NOTE / FYI : Maven does not require any installation or approval..You just download the zip and unzip it and set environment variable and thats it.

Deploy a selenium test project in eclipse that uses ant build file to run

I have a testing project that uses selenium RC and is currently on eclipse. I run the selenium test scripts and generate report using ant build file in eclipse only.
I want to deploy my project in executable file such that i don't need eclipse to run my project. It can be .jar file or .bat file. preferably .bat file; so that i can run it from command line.
Also, in case of bat file, will the other PC executing the executable will need any additional setup?
Is there any plugin for eclipse through which it can be achieved?
Well, I was doing something like this.
You should:
have mozilla executable in your path
launch java.exe from .bat file this way:
java.exe -cp ./production/;./lib/* package.MainClass
./production should contain your compiled classes and libs should contain all jars. You may also pack your app into a jar file, this is described here: http://docs.oracle.com/javase/tutorial/deployment/jar/build.html

install4j deploy no jar file

I'm new to install4j.
So I hope this question is easy to answer and not obvios.
I involved to an Java-development-project.
We decided to use install4j to create a nice installer for our customers.
Now i've got an install4j license and testing to create an installer.
I Use the install4j Launcher Wizard to make a .exe file out of my .jar file.
Now the Problem: If I remove the .jar file from the installer, the .exe file doesn't work anymore.
So the question: Is it possible to deploy with install4j an .exe file without the .jar file ?
WebStart is not an option in this project.
The .exe is just a launcher to start the JVM. Your Java code is not compiled into native code by install4j. If you want to protect your code, you have to use an obfuscator, for example yguard.
I think install4j can package the Jar inside the executable, as shown in this blog post:
http://blog.ej-technologies.com/2010/12/my-first-try-with-install4j-tutorial.html