add the java example
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8183 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
8f010f1936
commit
d48a17e32f
6 changed files with 105 additions and 2 deletions
26
Examples/perl5/java/runme.pl
Normal file
26
Examples/perl5/java/runme.pl
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
use example;
|
||||
|
||||
example::JvCreateJavaVM(undef);
|
||||
example::JvAttachCurrentThread(undef, undef);
|
||||
|
||||
$e1 = new example::Example(1);
|
||||
print $e1->{mPublicInt},"\n";
|
||||
|
||||
$e2 = new example::Example(2);
|
||||
print $e2->{mPublicInt},"\n";
|
||||
|
||||
$i = $e1->Add(1,2);
|
||||
print $i,"\n";
|
||||
|
||||
$d = $e2->Add(1.0,2.0);
|
||||
print $d,"\n";
|
||||
|
||||
$d = $e2->Add("1","2");
|
||||
print $d,"\n";
|
||||
|
||||
$e3 = $e1->Add($e1,$e2);
|
||||
print $e3->{mPublicInt},"\n";
|
||||
|
||||
|
||||
|
||||
example::JvDetachCurrentThread()
|
||||
Loading…
Add table
Add a link
Reference in a new issue