List of usage examples for java.io File pathSeparator
String pathSeparator
To view the source code for java.io File pathSeparator.
Click Source Link
From source file:org.apache.atlas.graph.GraphSandboxUtil.java
public static void create() { Configuration configuration;//from w w w .j ava 2 s.c o m try { configuration = ApplicationProperties.get(); // Append a suffix to isolate the database for each instance long currentMillisecs = System.currentTimeMillis(); String newStorageDir = System.getProperty("atlas.data") + File.pathSeparator + "storage" + File.pathSeparator + currentMillisecs; configuration.setProperty("atlas.graph.storage.directory", newStorageDir); String newIndexerDir = System.getProperty("atlas.data") + File.pathSeparator + "index" + File.pathSeparator + currentMillisecs; configuration.setProperty("atlas.graph.index.search.directory", newIndexerDir); LOG.debug("New Storage dir : {}", newStorageDir); LOG.debug("New Indexer dir : {}", newIndexerDir); } catch (AtlasException ignored) { } }
From source file:net.grinder.util.GrinderClassPathUtils.java
/** * Construct classPath for grinder from given classpath string. * /* ww w. j a va 2 s .c o m*/ * @param classPath * classpath string * @param logger * logger * @return classpath optimized for grinder. */ public static String filterClassPath(String classPath, Logger logger) { List<String> classPathList = new ArrayList<String>(); for (String eachClassPath : checkNotNull(classPath).split(File.pathSeparator)) { String filename = FilenameUtils.getName(eachClassPath); if (isNotJarOrUselessJar(filename)) { continue; } logger.trace("classpath :" + eachClassPath); classPathList.add(eachClassPath); } return StringUtils.join(classPathList, File.pathSeparator); }
From source file:org.jsweet.util.ProcessUtil.java
public static void init() { // hack for Eclipse under Mac OSX if (!System.getenv("PATH").contains("/usr/local/bin") && new File("/usr/local/bin/tsd").exists()) { ProcessUtil.EXTRA_PATH = "usr/bin" + File.pathSeparator + "/usr/local/bin"; ProcessUtil.TSD_COMMAND = "/usr/local/bin/tsd"; ProcessUtil.MVN_COMMAND = "/usr/local/bin/mvn"; ProcessUtil.BOWER_COMMAND = "/usr/local/bin/bower"; }/*w w w .ja va2 s.co m*/ }
From source file:org.evosuite.executionmode.Setup.java
private static void addEntryToCP(String entry) { if (!Properties.CP.isEmpty()) { Properties.CP += File.pathSeparator; }// w w w .j av a2s .c o m Properties.CP += entry; }
From source file:com.jaeksoft.searchlib.util.ExecuteUtils.java
final public static String getClassPath() { List<String> classPathes = new ArrayList<String>(2); if (StartStopListener.REALPATH_WEBINF_CLASSES != null) classPathes.add(StartStopListener.REALPATH_WEBINF_CLASSES); if (StartStopListener.REALPATH_WEBINF_LIB != null) classPathes.add(StartStopListener.REALPATH_WEBINF_LIB + "/*"); return StringUtils.join(classPathes, File.pathSeparator); }
From source file:org.hardisonbrewing.maven.core.cli.CommandLineService.java
public static final void appendEnvVar(Commandline commandLine, String key, String value) { try {/* www . j av a2s . c o m*/ Properties systemEnvVars = commandLine.getSystemEnvVars(); String _value = systemEnvVars.getProperty(key); commandLine.addEnvironment(key, value + File.pathSeparator + _value); } catch (Exception e) { throw new IllegalStateException(e.getMessage()); } }
From source file:org.ebayopensource.turmeric.tools.codegen.util.ClassPathUtil.java
/** * Append to a StringBuilder the classpath obtained via the {@link #getClassPath()} method. * //from ww w. ja va 2s . co m * @param builder * the builder to append to. * @param classpath * the classpath obtained. */ public static void appendClasspath(StringBuilder builder, List<File> classpath) { boolean delim = false; for (File file : classpath) { if (delim) { builder.append(File.pathSeparator); } builder.append(file.getAbsolutePath()); delim = true; } }
From source file:com.eryansky.utils.SigarUtil.java
/** * ?CLASSPATH,sigar?dll,so?//from ww w .ja v a2 s .co m */ private static void resetClasspath() { String libPath = System.getProperty("java.library.path"); String classpath = SigarUtil.class.getResource("/").getPath(); System.setProperty("java.library.path", classpath + File.separator + "sigar" + File.pathSeparator + libPath); }
From source file:org.broadinstitute.gatk.utils.runtime.RuntimeUtils.java
/** * Return the current classpath as a list of absolute paths * @return//from w ww . j a v a 2 s . c o m */ public static List<String> getAbsoluteClassPaths() { final String[] relativeClassPaths = System.getProperty("java.class.path").split(File.pathSeparator); final List<String> absoluteClassPaths = new ArrayList<>(relativeClassPaths.length); for (String classPath : relativeClassPaths) { File cp = new File(classPath); if (cp.exists()) absoluteClassPaths.add(cp.getAbsolutePath()); } return absoluteClassPaths; }
From source file:net.sourceforge.pmd.util.ClasspathClassLoader.java
private static void addClasspathURLs(final List<URL> urls, final String classpath) throws MalformedURLException { StringTokenizer toker = new StringTokenizer(classpath, File.pathSeparator); while (toker.hasMoreTokens()) { String token = toker.nextToken(); LOG.log(Level.FINE, "Adding classpath entry: <{0}>", token); urls.add(createURLFromPath(token)); }/* w ww . jav a 2 s . com*/ }