B4J Question Open config.properties from external source in JRDC2

Discussion in 'B4J Questions' started by A Z M JANNAT UL KARIM, Jul 21, 2019.

  1. A Z M JANNAT UL KARIM

    A Z M JANNAT UL KARIM Member Licensed User

    Hi, in somewhere on the forum I saw a way to make the config.properties file set as external so that every time I need to change, the compilation not required. Can anybody help me here. I know that it is unsafe, but it will work in local intranet. Thank you.
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    It is not unsafe.

    The code that reads the configuration file is very simple:
    Code:
    'RDCConnector
    Private Sub LoadConfigMap As Map
       
    Return File.ReadMap(File.DirAssets, "config.properties")
    End Sub
    You can change it to load from a different folder.
     
    A Z M JANNAT UL KARIM likes this.
  3. A Z M JANNAT UL KARIM

    A Z M JANNAT UL KARIM Member Licensed User

    Thank you Erel. So what I understand is if I modify the line with the following line and put the config.properties with the jar file that will solve the problem.

    Code:
    Return File.ReadMap(File.DirApp, "config.properties")
    Also I want to change the file runtime without compiling jar file continuously. So I am activating DebugQueries = True. Hope everything will be Okay.
     
    BillMeyer likes this.
  4. Erel

    Erel Administrator Staff Member Licensed User

    Yes and yes.
     
  5. A Z M JANNAT UL KARIM

    A Z M JANNAT UL KARIM Member Licensed User

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