B4J Question How do I restart jRDC.jar


Licensed User

I followed the tutorial
[B4X] jRDC2 - B4J implementation of RDC (Remote Database Connector) and it was a great success. I got it online and everything looked good. Untill I got an error message (from the B4A app) that there was an error in the SQL query in the config.properties file.

The problem is that when I correct the config.properties file, and try to restart/recompile the b4j file, I get the message that: "java.net.BindException: Address already in use: bind".

I read that I could Kill the process in the Log field. But it does not help. I need to kill the initial process. When I open the page in a browser it sais that the RemoteServer is running and Connection Successful. How is it possible to stop the process and restart it?

BTW: Do I need to recompile the process everytime I need to add/change an sql query, or can I just update the config.properties file?


Licensed User
Do I need to recompile the process everytime I need to add/change an sql query, or can I just update the config.properties file
As is, you need to recompile after changing the config.properties file. Since a jar is a zip file, you may also try replacing the config.properties file in the zip file. You can also modify the code of jRDC2 to copy your config.properties file to another location if it does not exist in that location. Then use that config.properties file. That can then be modified and after restarting your jRDC2 server, it will read this config.properties file.


Licensed User


Well-Known Member
Licensed User
Another alternative.

Try the following changes in the RDCConnector module, so that you don't have to restart the jRDC.jar each time you make modifications in your SQL statements in the file config.properties

Ensure that you have the file config.properties in the same folder as your jRDC.jar

Public Sub Initialize
    Dim config As Map = LoadConfigMap
    pool.Initialize(config.Get("DriverClass"), config.Get("JdbcUrl"), config.Get("User"), _
    DebugQueries = True
    DebugQueries = False
#end if
    DebugQueries = True 'This line added by Anser to make Debug Mode always enabled
    serverPort = config.Get("ServerPort")
End Sub

Private Sub LoadConfigMap As Map
    'Return File.ReadMap(File.DirAssets, "config.properties")
    Return File.ReadMap(File.DirApp, "config.properties") 'Changed by Anser
End Sub


Licensed User
What operating system?
I am running Windows 10.
I tried to Open Task manager and closed the "Java platform...", didn't work.
But when I shut down the "Open JDK platforn binary" process, it worked.

I just had to get my question "out there" to see the obvious answer.
I closed the wrong process!