Inline-Java

 view release on metacpan or  search on metacpan

Java/PerlInterpreter/PerlInterpreter.pm  view on Meta::CPAN

use strict ;
use Inline::Java ;

$Inline::Java::PerlInterpreter::VERSION = '0.52' ;


use Inline (
	Java => 'STUDY',
	STUDY => [],
	AUTOSTUDY => 1,
	EMBEDDED_JNI => 1,
	NAME => 'Inline::Java::PerlInterpreter',
) ;


1 ;

lib/Inline/Java.pm  view on Meta::CPAN

	$o->set_option('J2SDK',					$jdk,			's', 1, \%opts);
	$o->set_option('CLASSPATH',				'',				's', 1, \%opts);

	$o->set_option('BIND',					'localhost',	's', 1, \%opts);
	$o->set_option('HOST',					'localhost',	's', 1, \%opts);
	$o->set_option('PORT',					-1,				'i', 1, \%opts);
	$o->set_option('STARTUP_DELAY',			15,				'i', 1, \%opts);
	$o->set_option('SHARED_JVM',			0,				'b', 1, \%opts);
	$o->set_option('START_JVM',				1,				'b', 1, \%opts);
	$o->set_option('JNI',					0,				'b', 1, \%opts);
	$o->set_option('EMBEDDED_JNI',			0,				'b', 1, \%opts);
	$o->set_option('NATIVE_DOUBLES',		0,				'b', 1, \%opts);

	$o->set_option('WARN_METHOD_SELECT',	0,				'b', 1, \%opts);
	$o->set_option('STUDY',					undef,			'a', 0, \%opts);
	$o->set_option('AUTOSTUDY',				0,				'b', 1, \%opts);

	$o->set_option('EXTRA_JAVA_ARGS',		'',				's', 1, \%opts);
	$o->set_option('EXTRA_JAVAC_ARGS',		'',				's', 1, \%opts);
	$o->set_option('DEBUGGER',				0,				'b', 1, \%opts);

lib/Inline/Java.pm  view on Meta::CPAN


	my @left_overs = keys(%opts);
	if (scalar(@left_overs)){
		croak "'$left_overs[0]' is not a valid configuration option for Inline::Java";
	}

	# Now for the post processing
	$Inline::Java::DEBUG = $o->get_java_config('DEBUG');

	# Embedded JNI turns on regular JNI
	if ($o->get_java_config('EMBEDDED_JNI')){
		$o->set_java_config('JNI', 1);
	}

	if ($o->get_java_config('PORT') == -1){
		if ($o->get_java_config('SHARED_JVM')){
			$o->set_java_config('PORT', 7891);
		}
		else{
			$o->set_java_config('PORT', -7890);
		}

lib/Inline/Java/JVM.pm  view on Meta::CPAN


	foreach my $sig (@SIG_LIST){
		local $SIG{__WARN__} = sub {} ;
		if (exists($SIG{$sig})){
			$SIGS{$sig} = $SIG{$sig} ;
		}
	}

	$this->{socket} = undef ;
	$this->{JNI} = undef ;
	$this->{embedded} = $o->get_java_config('EMBEDDED_JNI') ;
	$this->{owner} = 1 ;
	$this->{destroyed} = 0 ;
	$this->{private} = $o->get_java_config('PRIVATE') ;
	$this->{debugger} = $o->get_java_config('DEBUGGER') ;

	if ($this->{embedded}){
		Inline::Java::debug(1, "using embedded JVM...") ;
	}
	else{
		Inline::Java::debug(1, "starting JVM...") ;

t/01_init.t  view on Meta::CPAN

my $maxMemory = types1->maxMemory() ;

print STDERR "\nPerl version is $]\n" ;
print STDERR "Inline version is $Inline::VERSION\n" ;
print STDERR "Inline::Java version is $Inline::Java::VERSION\n" ;

print STDERR "J2SDK version is $ver, from $jdk\n" ;
print STDERR "Max memory is $maxMemory\n" ;
print STDERR "CLASSPATH is $main::cp\n" ;

if ($ENV{PERL_INLINE_JAVA_EMBEDDED_JNI}){
	print STDERR "Using JNI extension (embedded).\n" ;
}
elsif ($ENV{PERL_INLINE_JAVA_JNI}){
	print STDERR "Using JNI extension.\n" ;
}

ok(1) ;

__END__



( run in 0.742 second using v1.01-cache-2.11-cpan-71847e10f99 )