http://qs321.pair.com?node_id=1162974


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 (Chancellor) 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". ;-)