This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcjh, Headers hierarchy and namespaces


ok thanks
my Hello World is working :)

Bryce McKinlay wrote:

Florian Bourgier wrote:

Thanks a lot it is linking and I get an executable. Bit at the execution, it is making a core.
What is wrong with my code ?


   std::string cppstr("Hello, C++ String");
   jstring jstr = JvNewString(cppstr.c_str(),20);
    // it fails also with
     jstring jstr = JvNewStringUTF(cppstr.c_str());



Did you initialize the runtime? See the "invocation" section here:


http://gcc.gnu.org/onlinedocs/gcj/About-CNI.html

Is there somewhere a documentation to find how to handles jstring, std::string and java::lang::String ?
because it is really difficult to find information in headers.


http://gcc.gnu.org/onlinedocs/gcj/About-CNI.html

Can you tell me where jstring is defined for example ?


gcj/javaprims.h:

typedef class java::lang::String* jstring;

Regards

Bryce




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]