B4J Question Mqtt client with jMqtt 1.2 - only with Jdk 261 ?

amorosik

Expert
Licensed User
Using the Jmqtt 1.2 library I created a client that connects to Mosquitto and allows me to 'see' the commands exchanged between other clients and the server

I normally use B4J 9.10 with jdk-11.0.1
From debug mode everything works correctly
If I try to create the executable using the packager integrated in the ide, it is created correctly but if I go to run it, the program starts on the screen but does not connect to the mqtt server

If, on the other hand, I use jdk1.8.0_261, I can't use the integrated packager, but using Lauch4j I can create the executable that, once launched, connects correctly to the Mqtt server

The question: is the use of the jMqtt 1.2 library possible using Jdk-11 or is there any particular contraindication?
 

bdunkleysmith

Active Member
Licensed User
Longtime User
Although it references jMqtt 1.25, perhaps refer to this post jMQTT - Official MQTT client where it says:

If building a standalone package then add this to the main module:

B4X:
#PackagerProperty: AdditionalModuleInfoString = provides org.eclipse.paho.client.mqttv3.spi.NetworkModuleFactory with org.eclipse.paho.client.mqttv3.internal.TCPNetworkModuleFactory, org.eclipse.paho.client.mqttv3.internal.SSLNetworkModuleFactory,  org.eclipse.paho.client.mqttv3.internal.websocket.WebSocketNetworkModuleFactory, org.eclipse.paho.client.mqttv3.internal.websocket.WebSocketSecureNetworkModuleFactory;
 
Upvote 2
Top