I copied the entire temp folder to the second computer (same OS, same B4J installation which runs the software fine from under B4J in debug or release mode) and tried to run the exe.
Same error (cannot find main class)
I have attached the project. If you get the main window to load from a folder different from where it was created without complaining that it cannot find the main class, I will consider that success. Extra brownie points if you get it to run on a different computer from where the exe was built
For now, I have to deliver something for internal use and after working two days to develop the software which works under B4J (not finished but usable for what I need to do now), I have spent 5 work days and a week end trying to get the exe to run on a second machine with nothing to show for it.
Since the program runs fine under B4J, I am going to instruct the test engineer to just start the program from B4J. It's ugly but it won't be the first time and I can get him off my back
Main advantage of B4J right there: I can install as many copies of B4J as I need. Thanks a lot again Erel for making this free!
Then hopefully when I figure out where I went wrong, I will fix it.
To summarize:
I am working on 3 machines, a Win10 computer at home and two Win 7 at work. All 64 bits. All have jdk11 from Erel's link, B4J 7.31 and B4JPackager11 v1.02. The home machine and the main work machine can produce an exe with B4JPackager11 which runs on the computer where it was created as long as I do not move the folder. The second work machine does not run the exe (that was produced by B4JPackager11 on THAT machine) at all even though the program runs from within B4J, and B4JPackager11 does not produce any error code. The error is always Cannot find main class.
I did try to run the jar file directly (on my main work machine) using this command (that would be acceptable in my environment):
C:\Java\jdk-11.0.1\bin\java -jar .\result.jar
and I got:
Error: JavaFX runtime components are missing, and are required to run this application
Not sure what I need to do to install the JavaFX runtime components...
I do not need an installer at this time, even though as I am planning to extend the use of B4J, I will need to be able to build a setup.exe at some point. Some of our test software ends up on customer's equipment for test and troubleshooting so a streamlined installation process is desirable.
Thank you everybody for trying to help.