本文整理汇总了Java中java.lang.UnsatisfiedLinkError类的典型用法代码示例。如果您正苦于以下问题:Java UnsatisfiedLinkError类的具体用法?Java UnsatisfiedLinkError怎么用?Java UnsatisfiedLinkError使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
UnsatisfiedLinkError类属于java.lang包,在下文中一共展示了UnsatisfiedLinkError类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: run
import java.lang.UnsatisfiedLinkError; //导入依赖的package包/类
public Object run() {
try {
System.loadLibrary("jawt");
} catch (UnsatisfiedLinkError e) {
// catch and ignore an already loaded in another classloader
// exception, as vm already has it loaded
}
return null;
}
示例2: getInstance
import java.lang.UnsatisfiedLinkError; //导入依赖的package包/类
/**
* The instance of the HunspellManager, looks for the native lib in
* the directory specified.
*
* @param libDir Optional absolute directory where the native lib can be found.
*/
public static Hunspell getInstance(String libDir) throws UnsatisfiedLinkError, UnsupportedOperationException {
if (hunspell != null) {
return hunspell;
}
hunspell = new Hunspell(libDir);
return hunspell;
}
示例3: load0
import java.lang.UnsatisfiedLinkError; //导入依赖的package包/类
void load0(String filename, ClassLoader cL, boolean check) throws SecurityException, UnsatisfiedLinkError {
if (check) {
if (filename == null) {
throw new NullPointerException();
}
SecurityManager currentSecurity = System.getSecurityManager();
if (currentSecurity != null) {
currentSecurity.checkLink(filename);
}
}
VMClassRegistry.loadLibrary(filename, cL); // Should throw UnsatisfiedLinkError if needs.
}
示例4: implementsInterface
import java.lang.UnsatisfiedLinkError; //导入依赖的package包/类
public static boolean implementsInterface( String classname, Class tosubclass ) {
try {
if ( classname.equals("org.apache.xalan.extensions.ExtensionHandlerGeneral") ||
classname.equals("org.apache.log4j.net.ZeroConfSupport")
) throw new ClassNotFoundException( "Classes breaking this work" );
// JE: Here there is a bug that is that it is not possible
// to have ALL interfaces with this function!!!
// This is really stupid but that's life
// So it is compulsory that AlignmentProcess be declared
// as implemented
Class cl = Class.forName(classname);
// It is possible to suppress here abstract classes by:
if ( java.lang.reflect.Modifier.isAbstract( cl.getModifiers() ) ) return false;
Class[] interfaces = cl.getInterfaces();
for ( int i=interfaces.length-1; i >= 0 ; i-- ){
if ( interfaces[i] == tosubclass ) {
//logger.trace(" -j-> {}", classname);
return true;
}
//logger.trace(" I> {}", interfaces[i] );
}
// Not one of our classes
} catch ( ExceptionInInitializerError eiie ) {
} catch ( NoClassDefFoundError ncdex ) {
} catch ( ClassNotFoundException cnfex ) {
} catch ( UnsatisfiedLinkError ule ) {
//logger.trace(" ******** {}", classname);
}
return false;
}
示例5: isLoggable
import java.lang.UnsatisfiedLinkError; //导入依赖的package包/类
private static boolean isLoggable(int logLevel) {
try {
return Log.isLoggable(LOG_TAG, logLevel);
} catch (UnsatisfiedLinkError e) { // this lets the tests run on the jvm as well.
return false;
}
}
示例6: load
import java.lang.UnsatisfiedLinkError; //导入依赖的package包/类
/**
* @com.intel.drl.spec_ref
*/
public void load(String filename) throws SecurityException, UnsatisfiedLinkError {
load0(filename, VMClassRegistry.getClassLoader(VMStack.getCallerClass(0)), true);
}
示例7: loadLibrary
import java.lang.UnsatisfiedLinkError; //导入依赖的package包/类
/**
* @com.intel.drl.spec_ref
*/
public void loadLibrary(String libname) throws SecurityException, UnsatisfiedLinkError {
loadLibrary0(libname, VMClassRegistry.getClassLoader(VMStack.getCallerClass(0)), true);
}