When building (in either release mode or release (obfuscated) mode) a UI or Non-UI application on a network drive, the b4j.example.main class is missing error would occur on execution. The actual compilation was without error.
This initially occurred to me when I tried to run the ClientKVS code in release mode at which time I received an error message in the log output window of Missing JavaFX application class b4j.example.main. The ClientKVS code was located on my downloads folder that is located on a network drive (via redirection). In order to take folder redirection out of the equation and any other code in ClientKVS that may be the issue, I created a new project via
File->New->UI (JavaFX), added a log statement after the MainForm.Show line in AppStart
and saved the project on the "F:" drive, that is a non-redirected network drive. I then compiled the application in Release mode and receive the following log output (compilation went without a hitch):
Creating a Non-UI (Console) app (File->New->Non-UI (Console)) and adding the log line to AppStart and building the application in release mode will result in
The same log messages are produced in Release (obfuscated) mode. Please note that the applications will run properly in Debug mode.
When repeating the above steps, but saving the projects to the local C:\ drive, everything works as expected. When opening the jars (I'm using 7zip) and comparing them, the network build have the b4j folder missing. I'm attaching the sample files and their builds (so that the produced jars can be examined).
I'm using B4J 5.51 on Windows 10 Pro (64bit) under Parallels (V12 - Pro Edition) in a Windows domain environment (with most of my development going on locally). My path configuration (in order as they are set up) are as follows:
This initially occurred to me when I tried to run the ClientKVS code in release mode at which time I received an error message in the log output window of Missing JavaFX application class b4j.example.main. The ClientKVS code was located on my downloads folder that is located on a network drive (via redirection). In order to take folder redirection out of the equation and any other code in ClientKVS that may be the issue, I created a new project via
File->New->UI (JavaFX), added a log statement after the MainForm.Show line in AppStart
B4X:
MainForm.Show
Log("Somewhere over the rainbow")
Missing JavaFX application class b4j.example.main
Creating a Non-UI (Console) app (File->New->Non-UI (Console)) and adding the log line to AppStart and building the application in release mode will result in
Error: Could not find or load main class b4j.example.main
The same log messages are produced in Release (obfuscated) mode. Please note that the applications will run properly in Debug mode.
When repeating the above steps, but saving the projects to the local C:\ drive, everything works as expected. When opening the jars (I'm using 7zip) and comparing them, the network build have the b4j folder missing. I'm attaching the sample files and their builds (so that the produced jars can be examined).
I'm using B4J 5.51 on Windows 10 Pro (64bit) under Parallels (V12 - Pro Edition) in a Windows domain environment (with most of my development going on locally). My path configuration (in order as they are set up) are as follows:
C:\Program Files\Java\jdk1.8.0_131\bin\javac.exe
C:\B4X\B4J\AdditionalLibraries
C:\B4X\B4J\SharedModules