X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=eclipse%2Fplugins%2Forg.argeo.slc.ui.launch%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Fui%2Flaunch%2FDeployedSlcRuntime.java;fp=eclipse%2Fplugins%2Forg.argeo.slc.ui.launch%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Fui%2Flaunch%2FDeployedSlcRuntime.java;h=0000000000000000000000000000000000000000;hb=f6d736c058ddb7a59164295c138c2e9c38363b36;hp=bca1113df8b592bc315f5c2db53370b344108e9e;hpb=6958180362d5bb9724f21a55f723800ef397d876;p=gpl%2Fargeo-slc.git diff --git a/eclipse/plugins/org.argeo.slc.ui.launch/src/main/java/org/argeo/slc/ui/launch/DeployedSlcRuntime.java b/eclipse/plugins/org.argeo.slc.ui.launch/src/main/java/org/argeo/slc/ui/launch/DeployedSlcRuntime.java deleted file mode 100644 index bca1113df..000000000 --- a/eclipse/plugins/org.argeo.slc.ui.launch/src/main/java/org/argeo/slc/ui/launch/DeployedSlcRuntime.java +++ /dev/null @@ -1,50 +0,0 @@ -package org.argeo.slc.ui.launch; - -import java.io.File; -import java.io.IOException; -import java.util.List; -import java.util.Vector; - -import org.eclipse.core.runtime.CoreException; -import org.eclipse.jdt.launching.IVMInstall; -import org.eclipse.jdt.launching.JavaRuntime; - -public class DeployedSlcRuntime implements SlcRuntime { - private File baseDir; - private String relLibDir = "lib"; - - public DeployedSlcRuntime(String baseDirPath) { - try { - this.baseDir = new File(baseDirPath).getCanonicalFile(); - } catch (IOException e) { - throw new RuntimeException("Cannot get path for " + baseDirPath, e); - } - } - - public String[] getClasspath() throws CoreException { - List classpath = new Vector(); - File libDir = new File(baseDir.getPath() + File.separator + relLibDir); - File[] files = libDir.listFiles(); - for (File file : files) { - try { - classpath.add(file.getCanonicalPath()); - } catch (IOException e) { - throw new RuntimeException("Cannot get path for " + file, e); - } - } - return classpath.toArray(new String[classpath.size()]); - } - - public IVMInstall getVmInstall() throws CoreException { - return JavaRuntime.getDefaultVMInstall(); - } - - public String getAntHome() { - return baseDir.getPath(); - } - - public String getJavaLibraryPath() { - return baseDir.getPath() + File.separator + "bin"; - } - -}