Re: Updates to JPL
[email protected] (Brian Jepson) Fri, 2 Jun 2000 06:10:19 -0700 (PDT)
| Newsgroups | perl.jpl |
|---|---|
| Message-ID | <[email protected]> |
On Fri, 2 Jun 2000 [email protected] wrote: > > Brain: > > I took your suggestion and forwarded our earlier conversations to the JPL > list and have cc: them on this one. To address your questions, a) I did > add the D:\jdk1.2.2\jre\bin\classic to my %PATH% variable and all is well; > b) the MSVCRT.LIB should be in your %LIBRARY% path -- it's a default MS > thing. I was wondering if perhaps it was missing from your directory. I > think MSVCRT is the lib with the basic functions and symbols you were > missing in your link. Thanks - I have it in my %LIB% and %LIBRARY% path, which is: LIBRARY=e:\Program Files\Microsoft Visual Studio\VC98\mfc\lib;e:\Program Files\Microsoft Visual Studio\VC98\lib;C:\Program Files\Microsoft Visual Studio\VC98\lib However, I get these error messages when I run "perl Makefile.PL" in the JNI directory: Note (probably harmless): No library found for '-l' Note (probably harmless): No library found for 'oldnames.lib' Note (probably harmless): No library found for 'kernel32.lib' Note (probably harmless): No library found for 'user32.lib' Note (probably harmless): No library found for 'gdi32.lib' Note (probably harmless): No library found for 'winspool.lib' Note (probably harmless): No library found for 'comdlg32.lib' Note (probably harmless): No library found for 'advapi32.lib' Note (probably harmless): No library found for 'shell32.lib' Note (probably harmless): No library found for 'ole32.lib' Note (probably harmless): No library found for 'oleaut32.lib' Note (probably harmless): No library found for 'netapi32.lib' Note (probably harmless): No library found for 'uuid.lib' Note (probably harmless): No library found for 'wsock32.lib' Note (probably harmless): No library found for 'mpr.lib' Note (probably harmless): No library found for 'winmm.lib' Note (probably harmless): No library found for 'version.lib' Note (probably harmless): No library found for 'odbc32.lib' Note (probably harmless): No library found for 'odbccp32.lib' Note (probably harmless): No library found for 'msvcrt.lib' Writing Makefile for JNI Since it says "probably harmless" I figured I could ignore it. Maybe not? Could the spaces in the path name be confusing Makefile.PL? [...] > I also added "if $JPL::DEBUG" to all of the print statements to turn off > all of the debug output. Is there a way to turn jpldebug in JNI.XS OFF > or ON programmatically? I'm not sure about that - are you looking for a #define or an environment variable? [...] > Are there (i.e., to you have or know the location of) any extensive > examples of using this module? Particularly, JNI. Aside from the stuff in the Perl Resource Kit, I'm not aware of any extensive examples. There is a chapter online at: http://www.oreilly.com/catalog/prkunix/excerpt/UGch03.html Many of these examples show Perl calling into Java from within a .jpl file, and in a lot of cases, the Java code is just scaffolding because we had problems embedding Java in Perl with initial versions. I think you can just use the Perl stuff in some cases - for example, consider ObjectExample.jpl (which can be found in that online chapter). I just copied out this Perl code and ran it on Redhat 6.1: # Import the class definition. # use JPL::Class 'java::awt::Frame'; # Create a new instance of the Frame. # my $f = new java::awt::Frame; # What does Perl think of this Frame? # print " Got a ", ref $f, "\n"; This produced some interesting debugging output, but I finally got: Got a java::awt::Frame -- Brian Jepson * ([email protected]) * http://www.jepstone.net/