Module: JRubyNotify
- Defined in:
- lib/jruby-notify.rb,
lib/jruby-notify/notify.rb,
lib/jruby-notify/listener.rb
Defined Under Namespace
Constant Summary collapse
- VERSION =
'0.0.1'
- FILE_CREATED =
1
- FILE_DELETED =
2
- FILE_MODIFIED =
4
- FILE_RENAMED =
8
- FILE_ANY =
FILE_CREATED | FILE_DELETED | FILE_MODIFIED | FILE_RENAMED
Class Method Summary collapse
-
.define_library_path ⇒ Object
Defines the environment to be able to load the native JNotify libraries.
Class Method Details
.define_library_path ⇒ Object
Defines the environment to be able to load the native JNotify libraries
22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/jruby-notify.rb', line 22 def self.define_library_path library_path = java.lang.System.get_property('java.library.path') jnotify_library_path = File.(File.join(File.dirname(__FILE__), 'jnotify', 'shared')) new_library_path = [jnotify_library_path, library_path].join(java.io.File.pathSeparator) java.lang.System.set_property('java.library.path', new_library_path) field = java.lang.Class.for_name('java.lang.ClassLoader').get_declared_field('sys_paths') if field field.accessible = true field.set(java.lang.Class.for_name('java.lang.System').get_class_loader, nil) end end |