本文整理汇总了Java中com.pty4j.util.PtyUtil类的典型用法代码示例。如果您正苦于以下问题:Java PtyUtil类的具体用法?Java PtyUtil怎么用?Java PtyUtil使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
PtyUtil类属于com.pty4j.util包,在下文中一共展示了PtyUtil类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: findRCFile
import com.pty4j.util.PtyUtil; //导入依赖的package包/类
private static File findRCFile()
{
try
{
final String folder = PtyUtil.getPtyLibFolderPath();
if(folder != null)
{
File rcFile = new File(folder, "jediterm.in");
if(rcFile.exists())
{
return rcFile;
}
}
}
catch(Exception e)
{
LOG.warn("Unable to get JAR folder", e);
}
return null;
}
示例2: findRCFile
import com.pty4j.util.PtyUtil; //导入依赖的package包/类
private static File findRCFile() {
try {
final String folder = PtyUtil.getPtyLibFolderPath();
if (folder != null) {
File rcFile = new File(folder, "jediterm.in");
if (rcFile.exists()) {
return rcFile;
}
}
}
catch (Exception e) {
LOG.warn("Unable to get JAR folder", e);
}
return null;
}
示例3: exec
import com.pty4j.util.PtyUtil; //导入依赖的package包/类
public static PtyProcess exec(String[] command, Map<String, String> environment, String workingDirectory, boolean console, boolean cygwin,
File logFile) throws IOException {
if (Platform.isWindows()) {
if (environment == null) {
environment = new TreeMap<String, String>();
}
if (cygwin) {
return new CygwinPtyProcess(command, environment, workingDirectory, logFile, console);
}
return new WinPtyProcess(command, Advapi32Util.getEnvironmentBlock(environment), workingDirectory, console);
}
return new UnixPtyProcess(command, PtyUtil.toStringArray(environment), workingDirectory, new Pty(console), console ? new Pty() : null);
}
示例4: getLibraryPath
import com.pty4j.util.PtyUtil; //导入依赖的package包/类
private static String getLibraryPath() {
try {
return PtyUtil.resolveNativeLibrary().getAbsolutePath();
}
catch (Exception e) {
throw new IllegalStateException("Couldn't detect jar containing folder", e);
}
}