Friends, I am using JSMOOTH installer for creating .exe file and Bundled my Default JRE path in it..
开发者_Go百科If the user doesn't have Java Virtual Machine in his system it has to use the Bundled JRE in my .exe file ..
But its Redirecting to Download Page i tried with all skeleton option but fails to use the Bundled JRE..
There are 5 skeleton 1.Win Service 2.Autodownload wrapper 3.Console wrapper 4.Windowed Wrapper 5.Custom web downloader wrapper
My Question are :
1.From this five option which option i have to select such that if user is not JVM it use my bundled JRE.
The error i am getting is as follows "
If i use 1.Auto Download wrapper as my skeleton i am getting
andIf i use CustomWeb downloader as my skeleton i am getting
3.If i use windowed wrappper as my skeleton Console i am getting
- If i use Console wrapper as my skeleton i am getting
What i want is that if there is no JVM in User system it must use the Bundled JRE instead of asking to download the JAVA..
I reffered this manual and do it so but still i cant achieve my Destination..
My JSmooth screens are
I am having my JAR file in my desktop inside the folder Test and also my JRE folder inside it..
I tried by keeping my JRE near .exe and Default path..But all time it refers the default Java path's Jre...
I am not familiar with JSmooth Java launcher creator. But, based on Launch4J Java launcher creator, you shall include your target JRE folder (all folders and subfolders of target JRE intact) as part of your application launcher bundle. Launch4J must be run from the base folder where it can find the JRE folder. For example, if your have a project launcher path like "C:\MYProject\install" where you compile all your classpath dependency files to run your launcher EXE file with "C:\MyProject\install\jre1.6.0_26" is the target JRE folder inside it. Your JVM bundle entry shall be "jre1.6.0_26". Launch4J EXE launcher file shall be able to find relative "jre1.6.0_26" folder from the base of "C:\MYProject\install"
When translate this to what your EXE launcher file will do when it tries to run:
C:\C:\MYProject\install
|__MyApp.EXE (your resulting output launcher file)
|__all classpath dependency jars needed by MyApp.EXE
|__jre1.6.0_26 (folder of JVM bundle)
Ant task for Launch4J script:
<exec executable="C:\Program Files\Launch4j\launch4jc.exe">
<arg value="${basedir}\myLaunch4j.xml"/>
</exec>
I encountered the same problem. Based on other hints in the aether, I think the problem is related to win32/win64, in particular the bundle option will only work with a win32 jre. I switched in a win32 jre and got further, but the launch still failed because some of the necessary .dlls hadn't been installed. It looks like the bundle option can't be reliable without a jre designed to not require installation.
Then, I found https://portableapps.com/apps/utilities/java_portable and I succeeded with that jre. It's java 1.8.0_181 which is a bit old, but adequate for my needs.
精彩评论