dorianwinterfeld has asked for the wisdom of the Perl Monks concerning the following question:

Most Wise Monks - I am maintaining some CGI code that uses the Inline-Java module. We are running ActiveState Perl on Windows and we are upgrading from Windows2003 to Windows2012. We installed ActivePerl5.22 and all the modules that the code requires. I testing and getting these error messages:

Can't find running JVM and START_JVM = 0 at C:/Perl64/site/lib/Inline/Java.pm line 478.
BEGIN failed--compilation aborted at /wwwroot/ELS_Applications/cgi-bin/fin_reg_el/rel2/FR_jdbc_perl_facade.pm line 21.

Here is line 478 of Java.pm:
$JVM = new Inline::Java::JVM($o);

Java is running:
C:\glassfish4\jdk7\lib>java -version
java version "1.7.0_21"
Java(TM) SE Runtime Environment (build 1.7.0_21-b11)
Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)

Do you have any suggestions as to how I can debug this?
- Dorian Winterfeld
dorian.winterfeld@gmail.com

Replies are listed 'Best First'.
Re: Inline-Java Module Errors
by haukex (Archbishop) on Apr 22, 2016 at 14:47 UTC

    Hi Dorian,

    The error message that Inline::Java is giving tells you that it is configured not to start its own JVM, but to connect to a JVM process that is already running. java -version only shows you that Java is installed, but not that there is a JVM process running in the background. I'm guessing that in your Windows 2003 setup, you had a JVM being started somewhere, maybe as a service. I'd suggest you inspect your Windows 2003 setup to find out where and how that JVM is being started, and replicate that on your new Windows 2012 system.

    Hope this helps,
    -- Hauke D

Re: Inline-Java Module Errors
by KurtSchwind (Chaplain) on Apr 25, 2016 at 15:52 UTC

    Check in your task manager for a running JVM. The Java Virtual Machine should already be started in your case.

    To re-iterate a bit of what was said, the command java -version will show you that java is installed. Which it looks like it is. So you have a JVM, but it might not be actively running.

    --
    “For the Present is the point at which time touches eternity.” - CS Lewis