public inbox for java@gcc.gnu.org
 help / color / mirror / Atom feed
From: Bucher Fabio <fabio.bucher@ntb.ch>
To: "java@gcc.gnu.org" <java@gcc.gnu.org>
Subject: create an object with cni
Date: Mon, 24 Jun 2013 09:37:00 -0000	[thread overview]
Message-ID: <17B34E365AFABC468216733E4B4CC75492AD7EF3@mail-server.ntb.ch> (raw)

Hi

I just have a simple programm: One Java class, one C++ class.

Java:
public class Java_with_CNI {

    public Java_with_CNI(){
    }

    public void printHello(){
        System.out.println("Hallo Du, ich wurde durch CNI aufgerufen");
    }
}

and my C++ class:
#include <gcj/cni.h>
#include "Java_with_CNI.h"

class Hallo{
    int main(){
        Java_with_CNI test = new Java_with_CNI::Java_with_CNI();
        test.printHello();
        return 0;
    }
};


This is my first time i use C++, so I dont know whats wrong with my class. I just want to create a new Object (Java_with_CNI) and call the printHello()-method.
What is wrong with my class?

Thank you for your help and best regards
Fabio Bucher




             reply	other threads:[~2013-06-24  9:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-24  9:37 Bucher Fabio [this message]
2013-06-24 10:27 ` Bryce McKinlay
2013-06-24 12:17 Bucher Fabio
2013-06-24 12:28 ` Bryce McKinlay
2013-06-24 12:54 Bucher Fabio

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=17B34E365AFABC468216733E4B4CC75492AD7EF3@mail-server.ntb.ch \
    --to=fabio.bucher@ntb.ch \
    --cc=java@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).