B4J Library [BANano] NW.js - Wrapper

Hello,

in this posting I want to show how easy it is to create desktop applications (Windows, Linux, MacOS) with BANano and NW.js.

Getting Started:
  1. Download NW.js (https://nwjs.io/) and unpack it at a location of your choice.

  2. Download the attached library zip and extract it to the internal library folder.

  3. Download the attached demo zip and extract it into a folder of your choice.

  4. Open the demo with B4J

Before you start the demo, it is important that you adjust the variable NwJsFolder. Here you have to enter the folder where you unpacked NW.js.

Now you can start the demo in Debug mode. After a short time the NW.js window should open. There are some basic examples of how to control NW.js:

HfMDBaP.png


Since NW.js has a' built-in' NodeJS, you can also use appropriate commands (such as those of the filesystem) to communicate from BANano with the 'outside world'.

Just give it a try. :)

Have fun... Peter
 

Attachments

  • Demo.zip
    4.1 KB · Views: 715
  • Library.zip
    15.9 KB · Views: 758
  • LibrarySourceCode.zip
    6.2 KB · Views: 655
Last edited:

Swissmade

Well-Known Member
Licensed User
Longtime User
Nice Job
 

Michael1968

Active Member
Licensed User
Longtime User
Hi,
I get this error compiling the demo in debug mode:

java.lang.UnsupportedClassVersionError: b4j/example/bananonwjsos has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0

B4j 7.0
Java 1.8
 

Kiffi

Well-Known Member
Licensed User
Longtime User
I get this error compiling the demo in debug mode: [...]
i'm not the B4J expert, but to my knowledge it should be enough if you rebuild the library on your machine. To do this, unzip LibrarySourceCode.zip and load the project into B4J. Then set the B4J mode to 'Release' and press <F5>. After BANano has created the required files, press <Alt> + <F5> so that B4J can create the Jar file.

Greetings ... Peter
 

Michael1968

Active Member
Licensed User
Longtime User
Hi Kiffi,
the problem was in step 2

Getting Started:
  1. Download NW.js (https://nwjs.io/) and unpack it at a location of your choice.

  2. Download the attached library zip and extract it to the internal library folder.

  3. Download the attached demo zip and extract it into a folder of your choice.

  4. Open the demo with B4J

delete the library files in the internal library folder
and put them into the addional folder solved the problem.

michael
 
Top