aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/com/jogamp/common/os/DynamicLibraryBundle.java
Commit message (Collapse)AuthorAgeFilesLines
* Bug 1479: NativeLibrary: Add getNativeLibraryPath() returning queried used ↵Sven Gothel2023-11-261-20/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | native library path, supported throughout DynamicLibraryBundle[Info] Motivation: It is helpful to retrieve the actually used native library pathname, since loading a library w/o absolute path but lookup through LD_LIBRARY_PATH may render it hard for the user to determine which library is used. +++ +++ Windows implementation simply can use GetModuleFileNameA() with the native library handle. POSIX implementation may utilize a symbol-name to retrieve its address within the loading native library used to retrieved the library information via dladdr(). To support this feature throughout DynamicLibraryBundle and DynamicLibraryBundleInfo, the custom DynamicLibraryBundleInfo specializations shall provide optional symbol-names per each tool-library-name for the POSIX implementation, see above. public interface DynamicLibraryBundleInfo { ... /** * Returns optional list of optional symbol names per {@link #getToolLibNames()} * in same order for an OS which requires the symbol's address to retrieve * the path of the containing library. */ public List<String> getSymbolForToolLibPath(); ... }
* iOS: NativeLibrary: Refine iOS, use proper alt system path for iOS+OSX, ↵Sven Gothel2019-06-211-1/+1
| | | | relax closeLibrary(..)
* Bug 1268 - DynamicLibraryBundleInfo: Add NativeLibrary's 'searchSystemPath' ↵Sven Gothel2015-11-151-3/+9
| | | | | | | | | | | and 'searchSystemPathFirst' attributes NativeLibrary can be instantiate by defining 'searchSystemPath' and 'searchSystemPathFirst' arguments, allowing to specify the system path role while looking up the library. Since NativeLibrary is utilized via DynamicLibraryBundleInfo upstream, the latter interface shall allow users to specify those attributes.
* DynamicLibraryBundle.toolDynamicLookupFunction(..): DEBUG: Show ↵Sven Gothel2015-08-051-1/+1
| | | | | | | 'toolGetProcAddressHandle' (Bug 1062) Show 'toolGetProcAddressHandle' in DEBUG mode in DynamicLibraryBundle.toolDynamicLookupFunction(..), allowing to validate source of symbols.
* Fix DynamicLibraryBundle.isToolLibComplete() no tool-lib case, regression of ↵Sven Gothel2015-03-181-1/+4
| | | | | | | | | | | | | | | commit 12feaa7d3b1544098f684d851e3caff1ec88cbc8 Regression of commit 12feaa7d3b1544098f684d851e3caff1ec88cbc8 'isToolLibComplete()' returned false if dynLinkGlobal is null, even if no tool-lib has been used. In which case dynLinkGlobal has not been initialized and hence is always null. 'isToolLibComplete()' now takes no tool-lib into consideration! Currently only 'OVRDynamicLibraryBundleInfo' of JOGL's 'oculusvr' binding used this configuration within JogAmp.
* Refine commit 12feaa7d3b1544098f684d851e3caff1ec88cbc8: Add 'throws ↵Sven Gothel2015-02-051-7/+11
| | | | SecurityException' decl., remove dead code, remove redundant check.
* Refine Native Library Code: Bulk Permissions, Cleanup DynamicLinker impl. - ↵Sven Gothel2015-01-301-10/+36
| | | | | | | | | | | | | | | and fix Android AArch64 BionicDynamicLinker (Bug 1122) - Bulk Permissions ProcAddressTable.reset(..) performs address lookup in one block. Now claiming all permissions upfront once, and releasing them afterwards. - Cleanup DynamicLinker impl. Proper top-down impl. of DynamicLinkerImpl, handling all security code and validations. - Fix Android AArch64 BionicDynamicLinker (Bug 1122) Dalvik uses diff RTLD_* defines for AArch64!
* gluegen: relax private variable access to package-private for members ↵Harvey Harrison2014-07-071-1/+1
| | | | | | | accessed from inner class Otherwise the compiler has to fill in a wrapping access function for the inner class to call, which is less efficient.
* Code Clean-Up based on our Recommended Settings (jogamp-scripting ↵Sven Gothel2014-07-031-13/+13
| | | | | | | | | | | | | | | c47bc86ae2ee268a1f38c5580d11f93d7f8d6e74) Code Clean-Up based on our Recommended Settings (jogamp-scripting c47bc86ae2ee268a1f38c5580d11f93d7f8d6e74) - Change non static accesses to static members using declaring type - Change indirect accesses to static members to direct accesses (accesses through subtypes) - Add final modifier to private fields - Add final modifier to method parameters - Add final modifier to local variables - Remove unnecessary casts - Remove unnecessary '$NON-NLS$' tags - Remove trailing white spaces on all lines
* Minor edits: space, final qualifier; setenv-build-*: Add generic JDK locationSven Gothel2014-06-171-1/+1
|
* gluegen: add all missing @Override annotationsHarvey Harrison2013-10-171-0/+1
| | | | Signed-off-by: Harvey Harrison <[email protected]>
* gluegen: remove trailing whitespaceHarvey Harrison2013-10-171-29/+29
| | | | Signed-off-by: Harvey Harrison <[email protected]>
* DynamicLibraryBundle: Remove unused importsSven Gothel2013-08-261-3/+0
|
* Remove _default_ workaround for Bug 566. Workaround shall no more be ↵v2.0.2Sven Gothel2013-07-201-7/+1
| | | | | | | required - and it deadlocks AWT/NEWT jogl/joal lib loading. Introduced w/ commits 1c03dfd6d1939a46018583419956e350e531f4fe and e9e61421ef6009e6788998c471d1d3d30aaefea6
* Security: Tighten DynamicLinker*, NativeLibrary and DynamicLibraryBundle ↵Sven Gothel2013-06-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | access (2) - Completes 23341a2df2d2ea36784a16fa1db8bc7385351a12 - Replace 'DynamicLinker' interface w/ well documented one - All DynamicLinker methods are now considered secure, i.e.: - open/lookup and close utilize reference counting on handle via a hash map. - lookupSymbol(..) and close(..) impl. validate the passed library handle whether it's retrieved via open*. This is the fast path, not that expensive. - lookupSymbolGlobal(..) performs Check acccess of 'new RuntimePermission("loadLibrary.*")' if SecurityManager is installed. This is the slow path. - DynamicLibraryBundleInfo now reflects the security requirements, i.e. whether priviledged access is needed.
* DynamicLookupHelper: Add secure isFunctionAvailable(..); NativeLibrary: Add ↵Sven Gothel2013-06-201-0/+6
| | | | TODO comments, re protected lookup functions.
* Security: Tighten DynamicLinker*, NativeLibrary and DynamicLibraryBundle access.Sven Gothel2013-06-201-37/+37
|
* gluegen: remove executable bit from java and c source filesHarvey Harrison2013-04-091-0/+0
| | | | Signed-off-by: Harvey Harrison <[email protected]>
* Promote AWTEDTExecutor to public package com.jogamp.common.util.awt ; ↵Sven Gothel2013-02-281-1/+1
| | | | Exclude java.part.awt in android gluegen-rt.
* DynamicLibraryBundle: API doc refinement, mention the ClassLoader role.Sven Gothel2012-05-041-2/+13
|
* Use ClassLoader to find JNI native libraries. ClassLoader was only used for ↵Sven Gothel2012-05-041-8/+8
| | | | | | | | | | | tool native libraries. NativeLibrary: Expose 'String findLibrary(String libName, ClassLoader loader)', allowing utilization of System.load(loader.findLibrary(libName)). JNILibLoaderBase.loadLibrary(): Add optional ClassLoader argument, used to locate the library DynamicLibraryBundle: Use DynamicLibraryInfo's ClassLoader to find native libraries (tool + jni)
* To help analyzing Bug 566, we allow overwriting the 'workaround' with sys ↵Sven Gothel2012-03-271-1/+5
| | | | prop -Djogamp.debug.NativeLibrary.UseCurrentThreadLibLoader
* Platform: Add AWT_AVAILABLE 'knowledge'; RunnableExecutor: Add AWTEDT impl. ↵Sven Gothel2012-03-261-0/+12
| | | | / API doc cleanup; DynamicLibraryBundle: Add getDefaultRunnableExecutor()
* DynamicLibraryBundle*: Allow DynamicLibraryBundleInfo impl. to designate a ↵Sven Gothel2012-03-261-1/+4
| | | | | | | | | | | | thread to load native libraries. (Fix Bug 566) Due to requirements of native libraries using tls_model("global-dynamic") a thread can be designated to load the 'tool' native libraries. In case the tool lib uses tls_model("global-dynamic"), an implementation shall try to let the early most thread load it. For example, AWT-EDT shall load Mesa8 (Ubuntu-TLS) libGL.so.1
* Minor edits: Fix API doc / Remove Thread.dumpStack()Sven Gothel2012-03-221-1/+0
|
* DynamicLibraryBundle (enhancement)Sven Gothel2012-02-121-26/+22
| | | | | | | - Hold DEBUG, DEBUG_LOOKUP in DynamicLookupHelper - Tool complete only if named tool's GetProcAddressFunc is avail - Allow no tool/glue lib's - Use DEBUG_LOCKUP for lockup symbol trace
* DynamicLibraryBundle/NativeLibrary: Add destroy() to bundle, causing ↵Sven Gothel2011-12-011-1/+22
| | | | unloading of native library.
* Unify JNI Library Loading into JNILibLoaderBase and use it for the ↵Sven Gothel2011-09-211-2/+2
| | | | | | | | gluegen-rt native lib as well - removed redundance - move proper JNLPAppletLauncher custom libloader code into JNILibLoaderBase - prepares for new JAR temp cache ..
* DynamicLibraryBundle*: Use generics for better spec / Drop Iterator in favor ↵Sven Gothel2011-08-311-31/+23
| | | | for int/size() for less temp objects
* DynamicLibraryBundleInfo: Allow impl. to select tool/system lookupSven Gothel2011-08-091-7/+19
|
* aapt build check fix ; DynamicLibraryBundle.isGlueLibComplete() == true if ↵Sven Gothel2011-08-051-3/+16
| | | | | | | | | | | | | last entry is loaded aapt build check fix - exe aapt if source are newer than apk DynamicLibraryBundle.isGlueLibComplete() == true if last entry is loaded - fix long standing bug, where GlueLib was not complete if preload dependencies were missing. this even lead to JOGL specific handling of this case .. duh. - added debug info
* debug: mention thread nameSven Gothel2010-12-171-1/+2
|
* Debug: out -> err streamSven Gothel2010-12-131-16/+16
|
* Fix API docSven Gothel2010-11-151-4/+8
|
* LICENSE.txt changes:Sven Gothel2010-09-141-25/+26
| | | | | | | | | | | | | - Added JogAmp Community and common denominator: New BSD 3-clause license - Added note to make/lib binary file (source and license) Added source and license text for external binaries used in build process (make/lib folder). Changed 'Sven Gothel' and 'Michael Bien' New BSD 3-clause license to 'JogAmp Community' Simplified BSD 2-clause license.
* currently no need for a (public) MiscUtils.java.Michael Bien2010-06-101-8/+6
|
* Adding DynamicLibraryBundle utility to bundle Tool and JNI native library ↵Sven Gothel2010-06-101-0/+327
loading and lookup Add JNILibLoaderBase.loadLibrary(String libname, boolean ignoreError); DynamicLibraryBundle provides Tool and JNI native library loading and lookup New classes: com.jogamp.common.os.DynamicLibraryBundle com.jogamp.common.os.DynamicLibraryBundleInfo com.jogamp.common.util.MiscUtils.java Change: DEBUG/VERBOSE properties 'gluegen' -> 'jogamp'