B4J Tutorial Run applications JAVA11 without using B4JPackager11

Follow these easy steps:

Create a file called Java11.bat and copy it to the c:\ directory

set JAVA_HOME=C:\Java\java-11.0.1 <--- you directory java11
set APP_PATH=%~p1
set APP_NAME=%~nx1

cd %APP_PATH%
%JAVA_HOME%\bin\java.exe --module-path %JAVA_HOME%\javafx\lib --add-modules=javafx.controls,javafx.fxml,javafx.web -jar %APP_NAME%
pause

You can run in two ways:

way 1.

cmd
cd you_app_path\Objects
c:\Java11.bat app_name.jar

way 2.

1.png
2.png
3.png

4.png
5.png


For the next time you want to run with java 11, it will be in the list to select and run:

6.png


regards,
 
Last edited:

TILogistic

Expert
Licensed User
Longtime User
Ok, I will change the title.
it was just to demonstrate that it can be run without using B4JPackager11.
 

TILogistic

Expert
Licensed User
Longtime User
See:

How to create a package with IDE B4J


Important to say that it will only work with Java downloaded from B4X site.

If you want to distribute apps then in most cases the best solution is to use B4JPackager11, which is now integrated in the IDE.
 
Top