本文整理了Java中java.lang.LinkageError.getLocalizedMessage()
方法的一些代码示例,展示了LinkageError.getLocalizedMessage()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。LinkageError.getLocalizedMessage()
方法的具体详情如下:
包路径:java.lang.LinkageError
类名称:LinkageError
方法名:getLocalizedMessage
暂无
代码示例来源:origin: org.hudsonci.plugins/jna-native-support-plugin
public boolean createSymlink(String targetPath, File symlinkFile, boolean usePosix) throws NativeAccessException {
if (usePosix) {
return PosixAPI.get().symlink(symlinkFile.getAbsolutePath(), targetPath) == 0;
} else {
try {
return LIBC.symlink(symlinkFile.getAbsolutePath(), targetPath) == 0;
} catch (LinkageError exc) {
logger.info("Could not create symlink with JNA. From - " + symlinkFile
+ " to " + targetPath + ". " + exc.getLocalizedMessage()
+ " Trying Posix API..");
// if JNA is unavailable, fall back.
// we still prefer to try JNA first as PosixAPI supports even smaller platforms.
try {
return PosixAPI.get().symlink(symlinkFile.getAbsolutePath(), targetPath) == 0;
} catch (Throwable ex) {
throw new NativeAccessException("Failed to Create Symlink. " + ex.getLocalizedMessage());
}
}
}
}
代码示例来源:origin: de.fosd.typechef/javabdd_repackaged
return TypedBDDFactory.init(nodenum, cachesize);
} catch (LinkageError e) {
System.out.println("Could not load BDD package "+bddpackage+": "+e.getLocalizedMessage());
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
public Class loadJavaClassVerbose(String className) {
try {
return loadJavaClass(className);
} catch (ClassNotFoundException cnfExcptn) {
throw runtime.newNameError("cannot load Java class " + className, className, cnfExcptn);
} catch (ExceptionInInitializerError eiie) {
throw runtime.newNameError("cannot initialize Java class " + className, className, eiie);
} catch (LinkageError le) {
throw runtime.newNameError("cannot link Java class " + className + ", probable missing dependency: " + le.getLocalizedMessage(), className, le);
} catch (SecurityException se) {
if (runtime.isVerbose()) se.printStackTrace(runtime.getErrorStream());
throw runtime.newSecurityError(se.getLocalizedMessage());
}
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
public Class loadJavaClassVerbose(String className) {
try {
return loadJavaClass(className);
} catch (ClassNotFoundException cnfExcptn) {
throw runtime.newNameError("cannot load Java class " + className, className, cnfExcptn);
} catch (ExceptionInInitializerError eiie) {
throw runtime.newNameError("cannot initialize Java class " + className, className, eiie);
} catch (LinkageError le) {
throw runtime.newNameError("cannot link Java class " + className + ", probable missing dependency: " + le.getLocalizedMessage(), className, le);
} catch (SecurityException se) {
if (runtime.isVerbose()) se.printStackTrace(runtime.getErrorStream());
throw runtime.newSecurityError(se.getLocalizedMessage());
}
}
代码示例来源:origin: org.kie.workbench.services/kie-wb-common-services-backend
private void buildIncrementally(final IncrementalBuildResults results,
final String... destinationPath) {
try {
final IncrementalResults incrementalResults = ((InternalKieBuilder) kieBuilder).createFileSet(destinationPath).build();
results.addAllAddedMessages(convertMessages(incrementalResults.getAddedMessages(),
handles));
results.addAllRemovedMessages(convertMessages(incrementalResults.getRemovedMessages(),
handles));
//Tidy-up removed message handles
for (Message message : incrementalResults.getRemovedMessages()) {
handles.remove(Handles.RESOURCE_PATH + "/" + getBaseFileName(message.getPath()));
}
} catch (LinkageError e) {
final String msg = MessageFormat.format(ERROR_CLASS_NOT_FOUND,
e.getLocalizedMessage());
logger.warn(msg);
results.addAddedMessage(makeWarningMessage(msg));
} catch (Throwable e) {
final String msg = e.getLocalizedMessage();
logger.error(msg,
e);
results.addAddedMessage(makeErrorMessage(msg));
}
}
代码示例来源:origin: org.jruby/jruby-complete
public Class loadJavaClassVerbose(String className) {
try {
return loadJavaClass(className);
} catch (ClassNotFoundException ex) {
throw initCause(runtime.newNameError("cannot load Java class " + className, className, ex), ex);
} catch (ExceptionInInitializerError ex) {
throw initCause(runtime.newNameError("cannot initialize Java class " + className, className, ex), ex);
} catch (LinkageError ex) {
throw initCause(runtime.newNameError("cannot link Java class " + className + ", probable missing dependency: " + ex.getLocalizedMessage(), className, ex), ex);
} catch (SecurityException ex) {
if (runtime.isVerbose()) ex.printStackTrace(runtime.getErrorStream());
throw initCause(runtime.newSecurityError(ex.getLocalizedMessage()), ex);
}
}
代码示例来源:origin: org.kie.workbench.services/kie-wb-common-services-backend
} catch (LinkageError e) {
final String msg = MessageFormat.format(ERROR_CLASS_NOT_FOUND,
e.getLocalizedMessage());
logger.warn(msg);
results.addBuildMessage(makeWarningMessage(msg));
代码示例来源:origin: org.jruby/jruby-core
public Class loadJavaClassVerbose(String className) {
try {
return loadJavaClass(className);
} catch (ClassNotFoundException ex) {
throw initCause(runtime.newNameError("cannot load Java class " + className, className, ex), ex);
} catch (ExceptionInInitializerError ex) {
throw initCause(runtime.newNameError("cannot initialize Java class " + className, className, ex), ex);
} catch (LinkageError ex) {
throw initCause(runtime.newNameError("cannot link Java class " + className + ", probable missing dependency: " + ex.getLocalizedMessage(), className, ex), ex);
} catch (SecurityException ex) {
if (runtime.isVerbose()) ex.printStackTrace(runtime.getErrorStream());
throw initCause(runtime.newSecurityError(ex.getLocalizedMessage()), ex);
}
}
内容来源于网络,如有侵权,请联系作者删除!