---------- Forwarded message ----------
From: Jérôme Etévé <jerome.et...@gmail.com>
Date: 8 October 2010 15:10
Subject: Re: [Mason] Inline::Java and Mason
To: "Chao, Alvin - Chaoaj" <cha...@jmu.edu>


Hi,

 try building an instance of it (or using it) in your startup.pl

I had similar experience with the use of Text::Scan and building a
fake instance of it in my startup.pl
fixed the issue.

Jerome.

On 8 October 2010 14:18, Chao, Alvin - Chaoaj <cha...@jmu.edu> wrote:
> I am trying to get an Inline::Java example working in the Mason framework
> and running into problems.  The example works as a CGI and as a standalone
> pl file, but when running in an mhtml page it bombs.  I am able to get an
> Inline C program working without an issue, but when shifting to Java it
> doesn't work.  Do I need to load the Inline::Java module into the handler or
> httpd.conf or specify directory / classpath/env vars in those?
> Any help is appreciated.
> Regards,
> Alvin Chao
> ---------
> <%init>
> use Inline (Java => <<'ENDJAVA', DIRECTORY
> =>'/var/www/accounts-dev/logged_in/password/testjvm', J2SDK =>
> '/etc/alternatives/java_sdk');
> public class Pod_alu {
>            public Pod_alu(){
>            }
>
>            public int add(int i, int j){
>               return i + j ;
>            }
>
>            public int subtract(int i, int j){
>              return i - j ;
>           }
>        }
> ENDJAVA
> </%init>
> <%perl>
>  my $alu = new Pod_alu() || die "Error with Java call";
>  print($alu->add(9, 16) . "\n<br>") ; # Will print 25
>  print($alu->subtract(9, 16) . "\n<br>") ; # prints -7
> </%perl>
> ------------------------------------------------------------------------------
> Beautiful is writing same markup. Internet Explorer 9 supports
> standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
> Spend less time writing and  rewriting code and more time creating great
> experiences on the web. Be a part of the beta today.
> http://p.sf.net/sfu/beautyoftheweb
> _______________________________________________
> Mason-users mailing list
> Mason-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mason-users
>
>



--
Jerome Eteve.
http://www.eteve.net
jer...@eteve.net



-- 
Jerome Eteve.
http://www.eteve.net
jer...@eteve.net

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to