PageRenderTime 23ms CodeModel.GetById 13ms app.highlight 7ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Examples/perl5/java/runme.pl

#
Perl | 29 lines | 18 code | 11 blank | 0 comment | 0 complexity | a5c210f243462a44942893c5b86472a0 MD5 | raw file
 1use example;
 2
 3example::JvCreateJavaVM(undef);
 4example::JvAttachCurrentThread(undef, undef);
 5
 6$e1 = new example::Example(1);
 7print $e1->{mPublicInt},"\n";
 8
 9$e2 = new example::Example(2);
10print $e2->{mPublicInt},"\n";
11
12$i = $e1->Add(1,2);
13print $i,"\n";
14
15$d = $e2->Add(1.0,2.0);
16print $d,"\n";
17
18$d = $e2->Add("1","2");
19print $d,"\n";
20
21$e3 = $e1->Add($e1,$e2);
22print $e3->{mPublicInt},"\n";
23
24
25$s = $e2->Add("a","b");
26print $s,"\n";
27
28
29example::JvDetachCurrentThread()