B4J Question Error Using Server with B4J

Discussion in 'B4J Questions' started by Radisk3, Jul 9, 2019.

  1. Radisk3

    Radisk3 Member Licensed User

    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:
    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?
     

    Attached Files:

  2. stevel05

    stevel05 Expert Licensed User

    I haven't tried it but I would guess that the path (first argument of addHandler) should exist on the target PC.
     
  3. Erel

    Erel Administrator Staff Member Licensed User

    Don't use jServer in a UI app. Server applications should be built as non-ui programs.
     
    jinyistudio likes this.
  4. Radisk3

    Radisk3 Member Licensed User

    Thank You, Erel!
    It worked!
    In my ignorance, I thought it would be okay to run the server next to the application.
     
  5. Radisk3

    Radisk3 Member Licensed User

    Thanks for your help.
    The path is created if it does not exist.
    But the problem was that it was UI app.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice