Problem solved. Thanks google. Thanks Mike. ----- Original Message ----- From: "Mike Crowl" <[EMAIL PROTECTED]> To: "Alejandro Santillan" <[EMAIL PROTECTED]>; <[email protected]> Sent: Thursday, April 26, 2007 7:14 PM Subject: RE: Using Inline::Java
> http://forum.java.sun.com/thread.jspa?threadID=651418&tstart=0 > > Google is your friend. > > Mike Crowl > Applications Developer - Affinity Group, Inc. > Phone: 303.728.7474 > Email: [EMAIL PROTECTED] > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > Alejandro Santillan > Sent: Thursday, April 26, 2007 4:07 PM > To: [email protected] > Subject: Re: Using Inline::Java > > Well. Now having javac.exe installed and the C:\Documents\config file in > place, the execution of the script: > > > #!/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 > > Gave the error: > > Exception in thread "main" java.lang.UnsupportedClassVersionError: > org/perl/inli > ne/java/InlineJavaServer (Unsupported major.minor version 49.0) > at java.lang.ClassLoader.defineClass0(Native Method) > at java.lang.ClassLoader.defineClass(ClassLoader.java:539) > at > java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12 > 3) > at java.net.URLClassLoader.defineClass(URLClassLoader.java:251) > at java.net.URLClassLoader.access$100(URLClassLoader.java:55) > at java.net.URLClassLoader$1.run(URLClassLoader.java:194) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(URLClassLoader.java:187) > at java.lang.ClassLoader.loadClass(ClassLoader.java:289) > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274) > at java.lang.ClassLoader.loadClass(ClassLoader.java:235) > at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302) > > I think I am near now, but really don't know what's going on now. > > Please heeeelp! > Alejandro > > > ----- Original Message ----- > From: "Alejandro Santillan" <[EMAIL PROTECTED]> > To: <[email protected]> > Sent: Thursday, April 26, 2007 6:42 PM > Subject: Re: Using Inline::Java > > > > I don't know why, but I've create a C:\Documents directory to deal > with > the > > error: > > > > > C:\Documents and Settings\asantillan\Desktop\perl>inlinejava2.pl > > > Can't open C:\Documents\config for output > > > > And inside the config file was created automatically. I am attaching > that > > file. > > > > Then to deal with the error: > > > > C:\Documents and Settings\asantillan\Desktop\perl>inlinejava2.pl > > Can't open C:\Documents and > Settings\asantillan\Desktop\perl\_Inline\config > > for > > input. > > > > I've copied the C:\Documents\config file to the _Inline\ directory. > > > > Now, the error is: > > > > >The error message was: > > >'"C:\Program Files\Java\j2re1.4.2_14\bin\javac.exe"' is not > recognized as > > an internal or external command, > > operable program or batch file. > > > > It seems my machine lacks the javac.exe program. I've instaled the > J2SDK > > today, but sun is like a conundrum to download and install what one > wants. > > > > I hope to solve the problem with a new install. > > > > Alejandro > > > > > > > > > > #!/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"; > > > > > > ----- Original Message ----- > > From: "Alejandro Santillan" <[EMAIL PROTECTED]> > > To: "Todd Beverly" <[EMAIL PROTECTED]>; > > <[email protected]> > > Sent: Thursday, April 26, 2007 6:13 PM > > Subject: Re: Using Inline::Java > > > > > > > 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 > > > > > ------------------------------------------------------------------------ > ---- > ---- > > > > _______________________________________________ > > 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 > _______________________________________________ > 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
