B4J Question Alternative to the B4JPackager11 tutorial

D

Deleted member 103

Guest
Hi,

is there an alternative to the B4JPackager11 tutorial?
I can't handle it. For a few days now I have been trying to convert a jar file to an exe file, unfortunately without success.
I have already tried 3 versions of B4JPackager: B4JPackager, B4JPackager1.50 and B4JPackager11.

This is the error message from B4JPackager1.50:
App identifier: fs.CronoMilleMiglia.main
Using base JDK at: C:\Program Files (x86)\Java\jdk1.8.0_60\jre
Using base JDK at: C:\Program Files (x86)\Java\jdk1.8.0_60\jre
Running [C:\Program Files (x86)\Java\jdk1.8.0_60\jre\bin\java, -version]
Running [C:\Program Files (x86)\Anywhere Software\Inno Setup 6\iscc.exe, /?]
Detected [C:\Program Files (x86)\Anywhere Software\Inno Setup 6\iscc.exe] version [6]
Using custom package resource [application icon] (loaded from file E:\DATEN\Programmieren\B4J\CronoMilleMiglia\Grafik\CronoMilleMiglia_96x96.ico)
Running [C:\Users\fil15\AppData\Local\Temp\iconswap3417175161367534695.exe, C:\Users\fil15\AppData\Local\Temp\fxbundler3251762287763509785\windows\CronoMilleMiglia_v1.00.ico, C:\Users\fil15\AppData\Local\Temp\fxbundler3251762287763509785\images\win-exe.image\CronoMilleMiglia_v1.00\CronoMilleMiglia_v1.00.exe]
Icon File Name: C:\Users\fil15\AppData\Local\Temp\fxbundler3251762287763509785\windows\CronoMilleMiglia_v1.00.ico
Executable File Name: C:\Users\fil15\AppData\Local\Temp\fxbundler3251762287763509785\images\win-exe.image\CronoMilleMiglia_v1.00\CronoMilleMiglia_v1.00.exe
Config files are saved to C:\Users\fil15\AppData\Local\Temp\fxbundler3251762287763509785\windows. Use them to customize package.
Using default package resource [Inno Setup project file] (add package/windows/CronoMilleMiglia_v1.00.iss to the class path to customize)
Using default package resource [setup dialog icon] (add package/windows/CronoMilleMiglia_v1.00-setup-icon.bmp to the class path to customize)
Using default package resource [script to run after application image is populated] (add package/windows/CronoMilleMiglia_v1.00-post-image.wsf to the class path to customize)
Generating EXE for installer to: C:\Users\fil15\AppData\Roaming\B4JPackager\bundles
Running [C:\Program Files (x86)\Anywhere Software\Inno Setup 6\iscc.exe, /oC:\Users\fil15\AppData\Roaming\B4JPackager\bundles, C:\Users\fil15\AppData\Local\Temp\fxbundler3251762287763509785\images\win-exe.image\CronoMilleMiglia_v1.00.iss] in C:\Users\fil15\AppData\Local\Temp\fxbundler3251762287763509785\images\win-exe.image
Inno Setup 6 Command-Line Compiler
Copyright (C) 1997-2019 Jordan Russell. All rights reserved.
Portions Copyright (C) 2000-2019 Martijn Laan
Inno Setup Preprocessor
Copyright (C) 2001-2004 Alex Yackimoff. All rights reserved.
Compiler engine version: Inno Setup 6.0.3 (u)
[ISPP] Preprocessing.
[ISPP] Preprocessed.
Parsing [Setup] section, line 4
Parsing [Setup] section, line 5
Parsing [Setup] section, line 6
Parsing [Setup] section, line 7
Parsing [Setup] section, line 8
Parsing [Setup] section, line 9
Parsing [Setup] section, line 10
Parsing [Setup] section, line 14
Parsing [Setup] section, line 15
Parsing [Setup] section, line 16
Parsing [Setup] section, line 17
Parsing [Setup] section, line 18
Parsing [Setup] section, line 19
Parsing [Setup] section, line 20
Parsing [Setup] section, line 21
Parsing [Setup] section, line 23
Parsing [Setup] section, line 25
Error on line 25 in C:\Users\fil15\AppData\Local\Temp\fxbundler3251762287763509785\images\win-exe.image\CronoMilleMiglia_v1.00.iss: Minimum NT version specified by MinVersion must be at least 6.0. (Windows 2000/XP/Server 2003 are no longer supported.)
Compile aborted.
java.io.IOException: Exec failed with code 2 command [[C:\Program Files (x86)\Anywhere Software\Inno Setup 6\iscc.exe, /oC:\Users\fil15\AppData\Roaming\B4JPackager\bundles, C:\Users\fil15\AppData\Local\Temp\fxbundler3251762287763509785\images\win-exe.image\CronoMilleMiglia_v1.00.iss] in C:\Users\fil15\AppData\Local\Temp\fxbundler3251762287763509785\images\win-exe.image
at com.oracle.tools.packager.IOUtils.exec(IOUtils.java:165)
at com.oracle.tools.packager.IOUtils.exec(IOUtils.java:138)
at com.oracle.tools.packager.IOUtils.exec(IOUtils.java:132)
at com.oracle.tools.packager.windows.WinExeBundler.buildEXE(WinExeBundler.java:697)
at com.oracle.tools.packager.windows.WinExeBundler.bundle(WinExeBundler.java:366)
at com.oracle.tools.packager.windows.WinExeBundler.execute(WinExeBundler.java:173)
at com.sun.javafx.tools.packager.PackagerLib.generateNativeBundles(PackagerLib.java:352)
at com.sun.javafx.tools.packager.PackagerLib.generateDeploymentPackages(PackagerLib.java:319)
at com.sun.javafx.tools.packager.Main.main(Main.java:476)
Config files are saved to C:\Users\fil15\AppData\Local\Temp\fxbundler3251762287763509785\windows. Use them to customize package.
Exception in thread "main"
com.sun.javafx.tools.packager.PackagerException: Error: Bundler "EXE Installer" (exe) failed to produce a bundle.
at com.sun.javafx.tools.packager.PackagerLib.generateNativeBundles(PackagerLib.java:354)
at com.sun.javafx.tools.packager.PackagerLib.generateDeploymentPackages(PackagerLib.java:319)
at com.sun.javafx.tools.packager.Main.main(Main.java:476)
Success: true
ExitCode: 1
 

DonManfred

Expert
Licensed User
Longtime User
I'm definitely doing something wrong, but unfortunately the tutorial doesn't help me.
i would try to start at the error

Error on line 25 in C:\Users\fil15\AppData\Local\Temp\fxbundler3251762287763509785\images\win-exe.image\CronoMilleMiglia_v1.00.iss: Minimum NT version specified by MinVersion must be at least 6.0. (Windows 2000/XP/Server 2003 are no longer supported.)

the iss file need to have a MinVersion set to 6.0 or higher


Have you tried to edit the base iss script?
 
Last edited:
Upvote 0
D

Deleted member 103

Guest
Error on line 25 in C:\Users\fil15\AppData\Local\Temp\fxbundler3251762287763509785\images\win-exe.image\CronoMilleMiglia_v1.00.iss: Minimum NT version specified by MinVersion must be at least 6.0. (Windows 2000/XP/Server 2003 are no longer supported.)
Hi Manfred,
I don't understand this error message, I'm using Windows 10.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Hi Manfred,
I don't understand this error message, I'm using Windows 10.
I suggest to consult the inno setup documentation.

As already suggested i suggest again to check the Value set for MinVersion in you inno setup script (iss).
Make sure you have set it to a Minimum of 6.0

Add the Var to your iss if not present.

At least this is what i would try if i get such a error. I never used the packager though.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Please keep this discussion about B4J Packager 11. If you want to discuss a different version then start a new thread. It is of course a mistake to use an older version of B4J Packager.

I can't handle it. For a few days now I have been trying to convert a jar file to an exe file, unfortunately without success.
How can we help you if you haven't provided any information?
 
Upvote 0
D

Deleted member 103

Guest
This is the log output from B4JPackager11 :
B4JPackager11 Version 1.13
InputJar: E:\DATEN\Programmieren\B4J\CronoMilleMiglia\v-.--_inarbeit\Objects\CronoMilleMiglia.jar
Running: E:\DATEN\PROGRA~1\B4J\Tools\B4JPAC~2\Objects\temp\FindDosPath.exe
Running: C:\Program Files\Java\jdk-11.0.1\bin\jar
Package name: fs.CronoMilleMiglia
Running: C:\Program Files\Java\jdk-11.0.1\bin\jdeps
.
.
.
.
Explicitly excluded modules: [javafx.web]
Included modules: [java.base, java.desktop, java.logging, java.sql, java.xml, javafx.base, javafx.controls, javafx.fxml, javafx.graphics, javafx.media, javafx.swing, java.scripting, jdk.unsupported, java.datatransfer, jdk.unsupported.desktop, jdk.jsobject, jdk.xml.dom]
Running: C:\Program Files\Java\jdk-11.0.1\bin\javac
.
Running: C:\Program Files\Java\jdk-11.0.1\bin\jar
.
Running: C:\Program Files\Java\jdk-11.0.1\bin\jlink
.
.
.
.
.
.
.
.
.
.
.
.
Running: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe
.
Running: explorer.exe

1580645111822.png


and that's the execution of run_debug.bat
1580645205152.png
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Why don't you post the error message, instead of requesting a new tutorial???

Read the tutorial carefully and you will see that it explains this issue:

There are several additional parameters that you can configure:
- NetFrameworkCSC - Path to to the C# compiler which is part of .Net Framework.
- IconFile - Path to the executable icon file (.ico file).
- ExcludedModules - List of excluded modules. javafx.web is excluded by default. You need to remove it from the list if you are using WebView.
- IncludedModules - List of included modules. Should be empty in most cases as the tool tries to discover the dependent modules automatically.
 
Upvote 0
D

Deleted member 103

Guest
Why don't you post the error message, instead of requesting a new tutorial???
I mostly understand all of your tutorials, and if I don't understand it right away, after a couple of tests I understand it.
But this tutorial, because I can read and read again, I still don't understand it.
Am I maybe too old already?

I have now commented out this line and that's the execution of run_debug.bat
B4X:
    Private ExcludedModules As List
    'ExcludedModules = Array("javafx.web") 'comment this line if using WebView

E:\DATEN\Programmieren\B4J\Tools\B4JPackager11\Objects\temp\build>cd bin

E:\DATEN\Programmieren\B4J\Tools\B4JPackager11\Objects\temp\build\bin>java.exe @release_java_modules.txt -m b4j/fs.CronoMilleMiglia.main
java.lang.UnsupportedOperationException: Unsupported protocol "jrt"
() [jrt:/b4j/Files/Dialog.css]
() [jrt:/b4j/Files/Dialog.css, jrt:/b4j/Files/Dialog.css]
Menu-Layout laden
() [jrt:/b4j/Files/Dialog.css, jrt:/b4j/Files/Dialog.css, jrt:/b4j/Files/Dialog.css]
main._application_resume (java line: -1)
java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: Object should first be initialized (MediaPlayer).
at b4j/anywheresoftware.b4a.keywords.Common.CallSub4(Unknown Source)
at b4j/anywheresoftware.b4a.keywords.Common.CallSubNew(Unknown Source)
at b4j/fs.CronoMilleMiglia.main._application_resume(Unknown Source)
at b4j/fs.CronoMilleMiglia.main._appstart(Unknown Source)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at b4j/anywheresoftware.b4a.BA.raiseEvent2(Unknown Source)
at b4j/anywheresoftware.b4a.BA.raiseEvent(Unknown Source)
at b4j/fs.CronoMilleMiglia.main.start(Unknown Source)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(Unknown Source)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(Unknown Source)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(Unknown Source)
at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source)
at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: Object should first be initialized (MediaPlayer).
at b4j/anywheresoftware.b4a.BA.raiseEvent2(Unknown Source)
... 20 more
Caused by: java.lang.RuntimeException: Object should first be initialized (MediaPlayer).
at b4j/anywheresoftware.b4a.AbsObjectWrapper.getObject(Unknown Source)
at b4j/anywheresoftware.b4j.objects.MediaPlayerWrapper.setVolume(Unknown Source)
at b4j/fs.CronoMilleMiglia.starter._setvolume(Unknown Source)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
... 21 more


E:\DATEN\Programmieren\B4J\Tools\B4JPackager11\Objects\temp\build\bin>pause
Drücken Sie eine beliebige Taste . . .
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
But this tutorial, because I can read and read again, I still don't understand it.
I'm not sure how you missed it as it is written several times in the tutorial and also in B4JPackager code. If you encounter any problem then post the problem. Requesting a different tutorial is not really productive.

The latest error you've encountered is a different issue which is related to a limitation or bug of MediaPlayer. You cannot play files from File.DirAsset: https://www.b4x.com/android/forum/t...iaplayer-jaudioclip-solved.107803/post-674074
 
Last edited:
Upvote 0
D

Deleted member 103

Guest
The latest error you've encountered is a different issue which is related to a limitation or bug of MediaPlayer.
Ok, that was the last mistake, now it works. :)
Thank you for your patience.
 
Upvote 0
Top