B4J Question Any ideas why programs only run in the IDE

Westy53

Member
Licensed User
Longtime User
Hi, I'm new to B4J. I have a clean install of Java, JavaFX, B4J etc on a clean install of Win 7 Pro. I've played around with a couple of the example programs and they work perfectly in the B4J IDE but nothing works outside it. I've tried a host of different suggestions from the internet to run both .JAR files and .CLASS files.

The files I've uploaded were compiled with '#MergeLibraries: True' added to the project attributes as suggested elsewhere but still no joy. I get an error message 'Invalid or corrupt jarfile' when I double click the .jar or right-click then open.

I've uploaded copies of the compiled files as a .zip - any help much appreciated
 

Attachments

  • ModalExample.zip
    3.3 KB · Views: 249

Westy53

Member
Licensed User
Longtime User
Seems like you are compiling your projects to libraries.

You should instead run the program in Release mode. The compiled jar will be created under the Objects folder.

Hi Erel,

Thanks for a very prompt reply. I was under the misapprehension that I needed to compile to a library to create the .JAR file and had tried both Debug and Release Modes. In addition, I had been looking too far down the tree for the output of Compile and Run, and had not realised that this in itself had created the .JAR file that I needed. Many thanks.
 
Upvote 0
Top