package Cipres::ServiceInstaller; use strict; use Cipres::SuperClasses::ProcessLauncher; use Cipres::SuperClasses::Authenticator; use File::Spec; use File::Basename; use vars '@ISA'; @ISA = qw(Cipres::SuperClasses::ProcessLauncher Cipres::SuperClasses::Authenticator); sub new { my $class = shift; my $self = { # this is a list of the most recent search results returned # by the registry '_default_path' => Cipres::Registry::Observable->new(), }; # instantiate SUPER classes $_->new( $self ) for ( @ISA ); return bless $self, __PACKAGE__; } sub get_command { my ( $name, $path, $suffix ) = fileparse( __FILE__ ); my $jar_file = File::Spec->canonpath( File::Spec->catfile( $path, '../../../cipres', 'cipres-classpath.jar' ) ); my $default_path = File::Spec->canonpath( File::Spec->catdir( $path, '../../../../share/cipres/resources/optional_services', ) ); my ( $jar_name, $jar_path, $jar_suffix ) = fileparse( $jar_file ); my $jni_path = `java -classpath $jar_file org.cipres.jni.JavaLibPath`; chomp( $jni_path ); my $lib_path = $jar_path . ':' . $jni_path; return "java -ea -Djava.library.path=${lib_path} -Ddefault.path=${default_path} \$@ -classpath ${jar_file} org.cipres.registry.ServiceInstaller & |"; } sub get_name { 'installer' } 1;