$ perl -e ' while(my($k, $v) =each(%ENV)) { print "$k\t$v\n" if $k =~ /J/; } ' JAVA_HOME /usr/lib/jvm/default-java PERL_INLINE_JAVA_J2SDK /usr/lib/jvm/java-6-openjdk-i386 $ $JAVA_HOME/bin/java -version java version "1.6.0_24" OpenJDK Runtime Environment (IcedTea6 1.11.5) (6b24-1.11.5-0ubuntu1~12.04.1) OpenJDK Server VM (build 20.0-b12, mixed mode) $ $PERL_INLINE_JAVA_J2SDK/bin/java -version java version "1.6.0_24" OpenJDK Runtime Environment (IcedTea6 1.11.5) (6b24-1.11.5-0ubuntu1~12.04.1) OpenJDK Server VM (build 20.0-b12, mixed mode) $ sudo cpan Inline::Java CPAN: Storable loaded ok (v2.27) Reading '/home/parthiban/.local/share/.cpan/Metadata' Database was generated on Sat, 16 Feb 2013 01:07:21 GMT Running install for module 'Inline::Java' Running make for P/PA/PATL/Inline-Java-0.53.tar.gz CPAN: Digest::SHA loaded ok (v5.61) CPAN: Compress::Zlib loaded ok (v2.033) Checksum for /home/parthiban/.local/share/.cpan/sources/authors/id/P/PA/PATL/Inline-Java-0.53.tar.gz ok CPAN: File::Temp loaded ok (v0.22) CPAN: Parse::CPAN::Meta loaded ok (v1.4404) CPAN: CPAN::Meta loaded ok (v2.120921) CPAN.pm: Building P/PA/PATL/Inline-Java-0.53.tar.gz CPAN: CPAN::Reporter loaded ok (v1.2009) Welcome to the Inline::Java installation procedure. A Java 2 SDK is required to install and use Inline::Java. Please specify your Java 2 SDK installation directory using the J2SDK option to Makefile.PL as such: perl Makefile.PL J2SDK=/path/to/your/j2sdk/installation You can set the JAVA_HOME environment variable to specify your Java 2 SDK installation directory. For example, if you are using the CPAN installer you can do: JAVA_HOME=/path/to/your/j2sdk/installation cpan Inline::Java (/usr/bin/perl Makefile.PL INSTALLDIRS=site exited with 256) CPAN::Reporter: Makefile.PL result is 'unknown', Stopped with an error. CPAN::Reporter: preparing a CPAN Testers report for Inline-Java-0.53 Do you want to review or edit the test report? (yes/no) [no] Do you want to send the report? (yes/no) [yes] no CPAN::Reporter: test report will not be sent Warning: No success on command[/usr/bin/perl Makefile.PL INSTALLDIRS=site] CPAN: YAML loaded ok (v0.77) PATL/Inline-Java-0.53.tar.gz /usr/bin/perl Makefile.PL INSTALLDIRS=site -- NOT OK Running make test Make had some problems, won't test Running make install Make had some problems, won't install Could not read metadata file. Falling back to other methods to determine prerequisites