Loading ...
Sorry, an error occurred while loading the content.

Re: Eiffel2Java example

Expand Messages
  • andersoxie
    Hi again I am now testing further and wanted to pass a Java class of my own to a Java constructor. If I pass a Java String to a routine returning Void I should
    Message 1 of 7 , Feb 4, 2012
    View Source
    • 0 Attachment
      Hi again

      I am now testing further and wanted to pass a Java class of my own to a Java constructor. If I pass a Java String to a routine returning Void I should write:

      (Ljava/lang/String;)V


      But what should I write if I have my own Java type that I want to pass. I tried with:

      (LMyJavaType;)V

      but that did not work.

      Regards

      Anders

      --- In eiffel_software@yahoogroups.com, "andersoxie" <anders@...> wrote:
      >
      > It was the problem. I was using 32-bit of EiffelStudio and 64-bit of the Java library.
      >
      > Thanks
      >
      > Anders
      >
      > --- In eiffel_software@yahoogroups.com, "Emmanuel Stapf" <manus@> wrote:
      > >
      > > It could be that you are using the 32-bit version of EiffelStudio with the 64-bit
      > > version of the Java library, or vice-versa. Could you double check?
      > >
      > > Regards,
      > > Manu
      > >
      > > > -----Original Message-----
      > > > From: eiffel_software@yahoogroups.com
      > > > [mailto:eiffel_software@yahoogroups.com] On Behalf Of andersoxie
      > > > Sent: Tuesday, January 31, 2012 9:49 AM
      > > > To: eiffel_software@yahoogroups.com
      > > > Subject: [eiffel_software] Eiffel2Java example
      > > >
      > > > I tried to build the Eiffel2Java example but got this error message from
      > > > the compiler:
      > > >
      > > > error LNK2019: unresolved external symbol __imp__JNI_CreateJavaVM@12
      > > > referenced in function _F9_315 eiffel2java.exe : fatal error LNK1120: 1
      > > > unresolved externals
      > > >
      > > >
      > > > I have added the jvm.lib folder to the LIB environment variable. I use
      > > > Eiffel Studio 6.8, Windows Vista, and java 64 bit JDK
      > > >
      > > > Regards
      > > >
      > > > Anders
      > > >
      > > >
      > > >
      > > > ------------------------------------
      > > >
      > > > Yahoo! Groups Links
      > > >
      > > >
      > > >
      > >
      >
    • Emmanuel Stapf
      ... It is hard to day why it would not work. Can you reduce your code to the bare essential until it cannot find the routine? Regards, Manu
      Message 2 of 7 , Feb 8, 2012
      View Source
      • 0 Attachment
        > But what should I write if I have my own Java type that I want to pass. I
        > tried with:
        >
        > (LMyJavaType;)V
        >
        > but that did not work.

        It is hard to day why it would not work. Can you reduce your code to the bare
        essential until it cannot find the routine?

        Regards,
        Manu
      • carl94706
        The way this is typed suggests that the full classpath is not entered for the class. Also, there may be a problem with how the -classpath variable is set up.
        Message 3 of 7 , Feb 9, 2012
        View Source
        • 0 Attachment
          The way this is typed suggests that the full classpath is not entered for the class.

          Also, there may be a problem with how the -classpath variable is set up. When I used Java this used to be the source of all sorts of these kinds of problem.

          --- In eiffel_software@yahoogroups.com, "Emmanuel Stapf" <manus@...> wrote:
          >
          > > But what should I write if I have my own Java type that I want to pass. I
          > > tried with:
          > >
          > > (LMyJavaType;)V
          > >
          > > but that did not work.
          >
          > It is hard to day why it would not work. Can you reduce your code to the bare
          > essential until it cannot find the routine?
          >
          > Regards,
          > Manu
          >
        • andersoxie
          Hi I tried to reduce the code and then got it to work. I missenterpreted an EiffelStudio message saying that it could not find the constructor. The problem was
          Message 4 of 7 , Feb 16, 2012
          View Source
          • 0 Attachment
            Hi

            I tried to reduce the code and then got it to work. I missenterpreted an EiffelStudio message saying that it could not find the constructor. The problem was that it found the constructor but the java code throwed an exception.

            Anders

            --- In eiffel_software@yahoogroups.com, "Emmanuel Stapf" <manus@...> wrote:
            >
            > > But what should I write if I have my own Java type that I want to pass. I
            > > tried with:
            > >
            > > (LMyJavaType;)V
            > >
            > > but that did not work.
            >
            > It is hard to day why it would not work. Can you reduce your code to the bare
            > essential until it cannot find the routine?
            >
            > Regards,
            > Manu
            >
          Your message has been successfully submitted and would be delivered to recipients shortly.