Results 1 to 12 of 12

Thread: C/C++ with Java

  1. #1
    Joao Lourenco is offline Member
    Join Date
    Sep 2012
    Posts
    9
    Rep Power
    0

    Default C/C++ with Java

    Hello,

    I'm trying to make an app which as to get some values from a game(Microsoft Flight Simulator), there is a way to get the values which is using an SDK called FSUIPC.
    FSUIPC is built in C and it works with C, there is a java DLL version of it but it's only 32 bits...
    I tried to recreate the DLL and compile it as 64 bits but as 64 bits it can't get the values from the game (its 32 bit's) or at least its not working..

    There is also FSUIPC for, VB, Python, MFC, Delphi, C#, BCB5, ASM and RealBasic.

    How can I get it to work on Java?

  2. #2
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    4,104
    Rep Power
    6

    Default Re: C/C++ with Java

    Use a 32 bits runtime?
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  3. #3
    Joao Lourenco is offline Member
    Join Date
    Sep 2012
    Posts
    9
    Rep Power
    0

    Default Re: C/C++ with Java

    The problem is that this is a heavy game and everyone (including me) have a 64 bit windows computer... is there anyway to use 32 in 64 bit OS?

  4. #4
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    4,104
    Rep Power
    6

    Default Re: C/C++ with Java

    ... what? You already mentioned the game is 32 bits, it works doesn't it? I really don't get your question.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  5. #5
    Joao Lourenco is offline Member
    Join Date
    Sep 2012
    Posts
    9
    Rep Power
    0

    Default Re: C/C++ with Java

    The game is 32 bit's and it works on 64 bit. The FSUIPC is 32 bit's also, but I when I load it to Java, Java crashes because it can't load a 32 bit DLL in a 64 bit system... thats the problem..

    How can I load a 32 bit Dll in a 64 bit system... Or is there any other way of making this...

  6. #6
    kjkrum's Avatar
    kjkrum is offline Senior Member
    Join Date
    Apr 2011
    Location
    Tucson, AZ
    Posts
    1,060
    Rep Power
    6

    Default Re: C/C++ with Java

    Is FSUIPC open-source? Is it documented how it talks to the game? The wide variety of platforms suggests that it might be. It might be better to reimplement it in Java instead of trying to use the native library.
    Get in the habit of using standard Java naming conventions!

  7. #7
    Joao Lourenco is offline Member
    Join Date
    Sep 2012
    Posts
    9
    Rep Power
    0

    Default Re: C/C++ with Java

    FSUIPC is not Open source. The SDK is composed by a .lib file that allow us to access FSUIPC dll's that are in the game directory.

  8. #8
    kjkrum's Avatar
    kjkrum is offline Senior Member
    Join Date
    Apr 2011
    Location
    Tucson, AZ
    Posts
    1,060
    Rep Power
    6

    Default Re: C/C++ with Java

    Install a 32-bit JDK/JRE.
    Get in the habit of using standard Java naming conventions!

  9. #9
    Joao Lourenco is offline Member
    Join Date
    Sep 2012
    Posts
    9
    Rep Power
    0

    Default Re: C/C++ with Java

    The users will have to have the 32-bit JDK too right?

  10. #10
    kjkrum's Avatar
    kjkrum is offline Senior Member
    Join Date
    Apr 2011
    Location
    Tucson, AZ
    Posts
    1,060
    Rep Power
    6

    Default Re: C/C++ with Java

    I suppose. But it doesn't seem like that should be a problem, if the game itself being 32-bit is not a problem.
    Get in the habit of using standard Java naming conventions!

  11. #11
    Joao Lourenco is offline Member
    Join Date
    Sep 2012
    Posts
    9
    Rep Power
    0

    Default Re: C/C++ with Java

    It is because as I sad... the game is heavy and 90% of the people have 64 bit pc's.

  12. #12
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    4,104
    Rep Power
    6

    Default Re: C/C++ with Java

    Are we in a repeat? You still haven't explained what "the game is heavy" has to do with being recommended to use a 32 bits runtime. Bundle a 32 bits runtime with your application, provide a batch file to boot it or use one of the many executable generator tools and be done with it.

    Its so simple. The game is 32 bits. The DLLs are 32 bits. Of course you need a 32 bits Java runtime.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •