Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Brainstorm
  4. Java in Qt
Qt 6.11 is out! See what's new in the release blog

Java in Qt

Scheduled Pinned Locked Moved Unsolved Brainstorm
5 Posts 3 Posters 3.5k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    WhatIf
    wrote on last edited by
    #1

    Hello,

    I want to have java classes in my Qt project and I want to be able to call java methods from c++ code. Already installed JDK and configured it. If you know of any articles/tutorials on the topic, please list them.

    How to set up Qt to integrate java? And how to call java code from c++?

    Thank you

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Do you mean something like QtJambi ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • W Offline
        W Offline
        WhatIf
        wrote on last edited by WhatIf
        #3

        Qt/Java also gives programmers the ability to easily bind their own native code to Java. This is done using the Qt/Java Generator, which reads the code of an existing C++ library and generates a Java API which binds into the library.

        I hope I understood the statement correctly. I'm looking for a way to call java code from c++ function not to call c++ code from java.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Sorry, I misread your post. Then JNI is your friend. Which platform are you targeting ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • K Offline
            K Offline
            Konstantin Tokarev
            wrote on last edited by
            #5

            This library looks good as well: https://github.com/MSardelich/CJay

            Found by simply typing "call java from c++" into Google

            1 Reply Last reply
            1

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved