Thank you Todd. With your tip, I've overcome the error. The problem is that
now I have the following error:

======================================================
C:\Documents and Settings\asantillan\Desktop\perl>inlinejava2.pl
Can't open C:\Documents\config for output.
No such file or directory
 at -e line 0
BEGIN failed--compilation aborted.
Failed to autogenerate C:\Documents and
Settings\asantillan\Desktop\perl\_Inline
\config.
 at C:\Documents and Settings\asantillan\Desktop\perl\inlinejava2.pl line 4
BEGIN failed--compilation aborted at C:\Documents and
Settings\asantillan\Deskto
p\perl\inlinejava2.pl line 8.

this script that follows is inlinejava2.pl
======================================================
    #!/usr/bin/perl
    use strict; use warnings;

    use Inline Java => <<'EOJ';
    public class Hi {
        // The class body is shown in the Java Code above
    }
EOJ

    my $greeter = Hi->new("howdy");
    print $greeter->getGreeting(), "\n";
======================================================
When run, the script created the dir _Inline, but no config file was created
inside.








----- Original Message ----- 
From: "Todd Beverly" <[EMAIL PROTECTED]>
To: "Alejandro Santillan" <[EMAIL PROTECTED]>
Cc: <[email protected]>
Sent: Thursday, April 26, 2007 5:59 PM
Subject: Re: Using Inline::Java


> Alejandro Santillan wrote:
> > Hi all:
> >
> > I was trying to use the module Inline::Java unsuccessfully.
> > The code was:
> > #!/usr/bin/perl
> >
> >    use Inline Java => <<'END_OF_JAVA_CODE' ;
> >       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 ;
> >          }
> >       }
> >    END_OF_JAVA_CODE
> >
> >    my $alu = new Pod_alu() ;
> >    print($alu->add(9, 16) . "\n") ; # prints 25
> >    print($alu->subtract(9, 16) . "\n") ; # prints -7
> >
> >
> > And the problem so far seems to be the END_OF_JAVA_CODE.
> > As the error was:
> >
> > C:\Documents and Settings\asantillan\Desktop\perl>inlinejava.pl
> > Can't find string terminator "END_OF_JAVA_CODE" anywhere before EOF at
> > C:\Docume
> > nts and Settings\asantillan\Desktop\perl\inlinejava.pl line 6.
> >
>
> When you're using here docs, you need to make sure that your tag
> "END_OF_JAVA_CODE" starts in column one (no spaces before it) and that
> there are no spaces after the tag. Any other character on the line with
> your closing tag will cause it to be ignored.
>
> _______________________________________________
> Perl-Win32-Users mailing list
> [email protected]
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to