B4J Question Diferent codepage used in IDE than running .jar directly?

Discussion in 'B4J Questions' started by Gabino A. de la Gala, Sep 25, 2018.

  1. Gabino A. de la Gala

    Gabino A. de la Gala Active Member Licensed User

    After being yesterday all afternoon looking for the reason why the data obtained from a database sometimes appeared with some characters "changed" and other times not, I have given when the reason is as follows:

    If I execute the .jar directly the result is different to if the program is launched directly from the programming IDE.

    See the attached image to better understand the problem.

    Can I do something so that when executing from the IDE it behaves in the same way as when I execute the .jar directly?
     

    Attached Files:

  2. Daestrum

    Daestrum Well-Known Member Licensed User

    You could try
    Code:
    #VirtualMachineArgs: -Dfile.encoding="UTF-8"
     
  3. Gabino A. de la Gala

    Gabino A. de la Gala Active Member Licensed User

    ¿Where do I have to put it? ¿ Like a param of the .jar file ?

    What I really need is that when running from the IDE, the application works as when I execute the .jar directly and not the other way round.

    The data source is a Firebird DB that is not in UTF-8.
     
    Last edited: Sep 25, 2018
  4. MarkusR

    MarkusR Well-Known Member Licensed User

    i believe the different is running at jdk or jre.
    at least i saw this in windows task manager.
     
  5. Erel

    Erel Administrator Staff Member Licensed User

    This will not help. The parameter will not be included in the executable jar.

    You have a few options:
    1. Run the jar with a batch file and add this parameter: -Dfile.encoding="UTF-8"
    2. Convert it to an executable with launch4j and add the parameter: https://www.b4x.com/android/forum/threads/create-windows-native-executables-exe-files.35863/#content
    3. Create a full packager and add the parameter to the installer.
     
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