Class: BitGirder::Ops::Java::JavaEnvironment

Inherits:
BitGirderClass
  • Object
show all
Includes:
Io
Defined in:
lib/bitgirder/ops/java.rb

Constant Summary

Constants included from Io

Io::ORDER_BIG_ENDIAN, Io::ORDER_LITTLE_ENDIAN

Constants included from Core

Core::ENV_BITGIRDER_DEBUG, Core::EXIT_FAILURE, Core::EXIT_SUCCESS

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Io

as_encoded, as_json, as_read_src, as_write_dest, can_connect?, debug_kill, debug_wait2, digest_file, dump_json, dump_yaml, enc_utf8, ensure_dir, ensure_dirs, ensure_parent, ensure_wiped, file_exists, first_line, fsize, fu, int_to_byte_array, is_executable, load_json, load_yaml, mktmpdir, open_tempfile, parse_json, read_full, slurp, slurp_io, strict_decode64, strict_encode64, which, write_file

Class Method Details

.get_defaultObject



61
62
63
# File 'lib/bitgirder/ops/java.rb', line 61

def self.get_default
    self.new( :java_home => JavaEnvironments.get_java_home )
end

Instance Method Details

#as_classpath(val) ⇒ Object



52
53
54
55
56
57
58
59
# File 'lib/bitgirder/ops/java.rb', line 52

def as_classpath( val )
    
    if val.respond_to?( :join )
        val.join( ":" )
    else
        val.to_s
    end
end

#jcmd(cmd) ⇒ Object



45
46
47
48
49
# File 'lib/bitgirder/ops/java.rb', line 45

def jcmd( cmd )
    
    not_nil( cmd, :cmd )
    file_exists( "#@java_home/bin/#{cmd}" )
end