Radisk3 Member Licensed User Longtime User Jul 9, 2019 #1 I made a jar that consults a bunch of firebird data. So far 100%! The problem is the moment I started using instantiating the server. The code is simple: Code: Copy Private Srv as Server Srv.Initialize ('Srv") Srv.AddHandler ("/Receives", "Receives", False) Srv.Start There is the Class Receives There's the "Sub Handle" On the computer with B4J, it works perfectly. I copy "jar" to a Windows or Linux computer and the server part doesn't work. Every time a text message is sent to the Server, the error of the file "err_server.txt" in the server and app that sent there is the return of the file "err_app.txt". Does anyone know how to fix it? Attachments err_server.txt err_server.txt 7.4 KB · Views: 402 err_app.txt err_app.txt 1.2 KB · Views: 399
I made a jar that consults a bunch of firebird data. So far 100%! The problem is the moment I started using instantiating the server. The code is simple: Code: Copy Private Srv as Server Srv.Initialize ('Srv") Srv.AddHandler ("/Receives", "Receives", False) Srv.Start There is the Class Receives There's the "Sub Handle" On the computer with B4J, it works perfectly. I copy "jar" to a Windows or Linux computer and the server part doesn't work. Every time a text message is sent to the Server, the error of the file "err_server.txt" in the server and app that sent there is the return of the file "err_app.txt". Does anyone know how to fix it?
stevel05 Expert Licensed User Longtime User Jul 9, 2019 #2 I haven't tried it but I would guess that the path (first argument of addHandler) should exist on the target PC. Upvote 0
I haven't tried it but I would guess that the path (first argument of addHandler) should exist on the target PC.
Erel B4X founder Staff member Licensed User Longtime User Jul 10, 2019 #3 Don't use jServer in a UI app. Server applications should be built as non-ui programs. Upvote 0
Radisk3 Member Licensed User Longtime User Jul 10, 2019 #4 Thank You, Erel! It worked! In my ignorance, I thought it would be okay to run the server next to the application. Upvote 0
Thank You, Erel! It worked! In my ignorance, I thought it would be okay to run the server next to the application.
Radisk3 Member Licensed User Longtime User Jul 10, 2019 #5 stevel05 said: I haven't tried it but I would guess that the path (first argument of addHandler) should exist on the target PC. Click to expand... Thanks for your help. The path is created if it does not exist. But the problem was that it was UI app. Upvote 0
stevel05 said: I haven't tried it but I would guess that the path (first argument of addHandler) should exist on the target PC. Click to expand... Thanks for your help. The path is created if it does not exist. But the problem was that it was UI app.