Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Dazed/Confused from previous posts on how to call Java method from Perl

by rgwest61 (Initiate)
on May 13, 2016 at 18:16 UTC ( #1162974=note: print w/replies, xml ) Need Help??


in reply to Dazed/Confused from previous posts on how to call Java method from Perl

I have tried to implement the below Perl code based on a response provided from another thread for which the requestor asked the same basic question that I am trying to resolve - "How to call Java methods from Perl:.

#! /usr/bin/perl -w use strict; use warnings; use Inline; use Inline ( Java => 'STUDY', STUDY => ['home.rwest.workspace....'], AUTOSTUDY => 1, ); use Inline::Java gw(caught);

When I attempt to execute this code I get the following: Error: You have specified 'Java' as an Inline programming language. I currently only know about the following languages: C, Foo, foo ... Why am I getting this Error? I saw a response from an internet search related to this error that Inline::Java needs to be installed. Can someone explain the entire process required to resolve this issue?

  • Comment on Re: Dazed/Confused from previous posts on how to call Java method from Perl
  • Download Code

Replies are listed 'Best First'.
Re^2: Dazed/Confused from previous posts on how to call Java method from Perl
by afoken (Canon) on May 13, 2016 at 18:43 UTC
    Error: You have specified 'Java' as an Inline programming language. I currently only know about the following languages: C, Foo, foo ...

    Is Inline::Java installed?

    use Inline; use Inline ( Java => 'STUDY', STUDY => ['home.rwest.workspace....'], AUTOSTUDY => 1, ); use Inline::Java gw(caught);

    There are at least two things wrong with that piece of code:

    • You need to use Inline only once.
    • There is a typo after Inline::Java, you want qw(), not gw().

    Have a look at the documentation of Inline::Java, it's full of examples. Also look at the test scripts of Inline::Java, they show how Inline::Java is actually used.

    Alexander

    --
    Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1162974]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2022-08-17 11:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?