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: where to learn how to use java objects in C++


Jeff Sadowski wrote:

public class five
{
 public static int hello()
 {
  return 5;
 }
 public static void main(String argv[])
 {
  System.out.println(hello());
 }
}
.
.
.
int main(int argc,char **argv)
{
 int test=0;
 test=(int)five::hello();
 std::cout<<test<<"\n";
 return 0;
}

You cannot do it that way.


Take a look at:

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

David Daney


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