Calling Java Class from C++

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vimalm
    New Member
    • Jul 2007
    • 2

    Calling Java Class from C++

    Hi,
    I am writing a C++ program to pass a string as a parameter to Java Class where it is doing some operation.I am using JNI to serve this purpose.
    Is there any simpler way than JNI to perform the above thing.
    please reply.

    Thanks in Advance
  • gpraghuram
    Recognized Expert Top Contributor
    • Mar 2007
    • 1275

    #2
    Originally posted by vimalm
    Hi,
    I am writing a C++ program to pass a string as a parameter to Java Class where it is doing some operation.I am using JNI to serve this purpose.
    Is there any simpler way than JNI to perform the above thing.
    please reply.

    Thanks in Advance
    I think JNI is the only and the best way to do this.

    Raghu

    Comment

    • vimalm
      New Member
      • Jul 2007
      • 2

      #3
      Originally posted by gpraghuram
      I think JNI is the only and the best way to do this.

      Raghu
      Thanks for Your reply Raghu.
      But JNI doesnt fit properly for my prblem.Thats why i m looking for an Alternative.
      Could You please suggest me any.

      Cheers,
      Vimal

      Comment

      • gpraghuram
        Recognized Expert Top Contributor
        • Mar 2007
        • 1275

        #4
        Originally posted by vimalm
        Thanks for Your reply Raghu.
        But JNI doesnt fit properly for my prblem.Thats why i m looking for an Alternative.
        Could You please suggest me any.

        Cheers,
        Vimal
        I dont know any other method oher than JNI.
        Other members can throw some light into this

        Raghuram

        Comment

        • JosAH
          Recognized Expert MVP
          • Mar 2007
          • 11453

          #5
          Originally posted by vimalm
          Hi,
          I am writing a C++ program to pass a string as a parameter to Java Class where it is doing some operation.I am using JNI to serve this purpose.
          Is there any simpler way than JNI to perform the above thing.
          please reply.

          Thanks in Advance
          Is there no way you can perform that 'operation' in C++? The C++ string class
          is not less powerful than the Java String class.

          kind regards,

          Jos

          Comment

          Working...