org.pentaho.di.core.Const.getOS()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(3.2k)|赞(0)|评价(0)|浏览(132)

本文整理了Java中org.pentaho.di.core.Const.getOS()方法的一些代码示例,展示了Const.getOS()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Const.getOS()方法的具体详情如下:
包路径:org.pentaho.di.core.Const
类名称:Const
方法名:getOS

Const.getOS介绍

[英]determine the OS name
[中]确定操作系统名称

代码示例

代码示例来源:origin: pentaho/pentaho-kettle

/**
 * @return True if the OS is a Linux derivate.
 */
public static boolean isLinux() {
 return getOS().startsWith( "Linux" );
}

代码示例来源:origin: pentaho/pentaho-kettle

public GPBulkLoader( StepMeta stepMeta, StepDataInterface stepDataInterface, int copyNr, TransMeta transMeta,
 Trans trans ) {
 super( stepMeta, stepDataInterface, copyNr, transMeta, trans );
 if ( Const.getOS().startsWith( "Windows" ) ) {
  enclosure = "\"";
 } else {
  enclosure = "'";
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

/**
 * @return True if the OS is a Windows derivate.
 */
public static boolean isWindows() {
 return getOS().startsWith( "Windows" );
}

代码示例来源:origin: pentaho/pentaho-kettle

/**
 * Adds quotes to the passed string if the OS is Windows and there is at least one space .
 *
 * @param string
 * @return
 */
private String addQuotes( String string ) {
 if ( Const.getOS().startsWith( "Windows" ) && string.indexOf( " " ) != -1 ) {
  string = "\"" + string + "\"";
 }
 return string;
}

代码示例来源:origin: pentaho/pentaho-kettle

/**
 * @return True if the OS is an OSX derivate.
 */
public static boolean isOSX() {
 return getOS().toUpperCase().contains( "OS X" );
}

代码示例来源:origin: pentaho/pentaho-kettle

public static void setTableItemLook( TableItem item, Display disp ) {
 if ( !Const.getOS().startsWith( "Windows" ) ) {
  return;
 }
 Color background = GUIResource.getInstance().getColorBackground();
 if ( background != null ) {
  item.setBackground( background );
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

setErrors( 1 );
if ( Const.getOS().equals( "Windows 95" ) ) {
 cmdstr = "command.com /C " + cmdstr;
} else {
 if ( Const.getOS().startsWith( "Windows" ) ) {
  cmdstr = "cmd.exe /C " + cmdstr;

代码示例来源:origin: pentaho/pentaho-kettle

String ip = getIPAddress();
String mac = "none";
String os = getOS();
String s = "";
@SuppressWarnings( "unused" )

代码示例来源:origin: pentaho/pentaho-kettle

public static void setGCFont( GC gc, Device device, FontData fontData ) {
 if ( Const.getOS().startsWith( "Windows" ) ) {
  Font font = new Font( device, fontData );
  gc.setFont( font );
  font.dispose();
 } else {
  gc.setFont( device.getSystemFont() );
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

if ( Const.getOS().startsWith( "Windows" ) ) {
 sbCommandLine.append( "cmd /c " );

代码示例来源:origin: pentaho/pentaho-kettle

logBasic( BaseMessages.getString( PKG, "JobShell.RunningOn", Const.getOS() ) );
if ( Const.getOS().equals( "Windows 95" ) ) {
 base = new String[] { "command.com", "/C" };
 if ( insertScript ) {
  fileObject = createTemporaryShellFile( tempFile, realScript );
} else if ( Const.getOS().startsWith( "Windows" ) ) {
 base = new String[] { "cmd.exe", "/C" };
 if ( insertScript ) {
 if ( Const.getOS().equals( "Windows 95" ) || Const.getOS().startsWith( "Windows" ) ) {
 if ( Const.getOS().equals( "Windows 95" ) || Const.getOS().startsWith( "Windows" ) ) {

代码示例来源:origin: pentaho/pentaho-kettle

if ( Const.getOS().startsWith( "Windows" ) ) {
 return addQuotes( pathToFile );
} else {

相关文章