Using jniwrapper custom code in install4j installers - install4j

We have an installation script written in install4j.
Our installer needs to call custom code from the library jniwrap.dll.
We included jniwrap.dll into the install4j project and declared it in 'Installer' > 'Custom Code & Resources'.
Unfortunately the installation fails: jniwrap.dll cannot be loaded because it's not in the search path.
Do you know how the error can be fixed?
What about the jniwrapper's license file? Do we have to insert it to the install4j project, too?
Thank you in advance.

Unfortunately the installation fails: jniwrap.dll cannot be loaded because
it's not in the search path.
The parent directory of the extracted file will not be in the search path. You have to call
System.load((String)context.getVariable("sys.resourceDir")
+ File.separator + "jniwrap.dll");
to load the library.
What about the jniwrapper's license file? Do we have to insert it to the
install4j project, too?
If it needs to be in the same directory as the DLL, then yes.

Related

What is the .install4j/user directory good for when the installation is finished?

When I install my Java application on Windows using Install4J 9.0.5, I'll find a .install4j\user directory inside my installation directory. It contains several jar files and some other files used by the installer.
Do I still need this directory when the installation is finished? Maybe for uninstalling? And is there a built-in way for Install4J to delete this directory if it is not needed anymore?
The .install4j directory contains the runtime for the generated launchers and for installer applications like the uninstaller.
You can only delete it if you only have external installers, no installer applications and if you do not use the install4j API from your code.

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.

Install4j - embedding jar into generated launcher

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.

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

Installing Zend Framework with XAMPP

I've Xampp installed on my computer, and I want to install Zend Framework. I noticed there is already a folder called Zend inside the xampp/php/PEAR/Zend
Does it mean the Zend framework is already installed? On phpinfo, the include_path is .;C:\xampp\php\PEAR. Do I need to configure the path? What should be the new path?
Finally how can I know if the Zend framework is installed successfully and ready to use.
Thanks for any help.
Zend framework is intensively developed and i doubt that xampp package include up to date version, so I recommend you to download latest full version from http://framework.zend.com/download/latest and extract the archive somewhere else.
Zend Framework requires no special installation steps. Simply download the framework,
extract it to the folder you would like to keep it in, and add the library directory
to your PHP include_path. To use components in the extras library, add the extras/library
directory to your PHP include_path, as well.
If you would like to use Zend_Tool, simply add bin/zf.bat (for Windows) or
bin/zf.sh (for anything else) to your system executable path.
The important files of Zend framework are located in ZendFramework-1.x.x\library\Zend in the archive and the ZendX (extras) are in ZendFramework-1.x.x\extras\ZendX. You might also need the ZendFramework-1.x.x\bin folder where is the ZendFramework console tool (zf)
I prefer extracting the "ZendFramework-1.x.x\library\Zend" into a folder lib\Zend and add it to the include path in php.ini
Installing zend framework on Windows
Download zend framework.
Include the zend lib path on your php.ini file (If you have zend lib within c:wampp/www/zend/library/ then put the path in php.ini include_path="c:/wampp/www/zend/library").
In the downloaded folder there is bin folder and there is file zf.bat so open that file and put the pull path of php.exe.
Go to command prompt and go to directory where you need your project.
Run this command:
C:\\wampp\www\zend\bin\zf.bat create project project_name