]>
git.argeo.org Git - gpl/argeo-slc.git/blob - eclipse/plugins/org.argeo.slc.ui.launch/src/main/java/org/argeo/slc/ui/launch/DefaultSlcRuntime.java
1 package org
.argeo
.slc
.ui
.launch
;
4 import java
.io
.IOException
;
6 import java
.util
.Vector
;
8 public class DefaultSlcRuntime
implements SlcRuntime
{
10 private String relLibDir
= "lib";
12 public DefaultSlcRuntime(String baseDirPath
) {
14 this.baseDir
= new File(baseDirPath
).getCanonicalFile();
15 } catch (IOException e
) {
16 throw new RuntimeException("Cannot get path for " + baseDirPath
, e
);
20 public String
[] getClasspath() {
21 List
<String
> classpath
= new Vector
<String
>();
22 File libDir
= new File(baseDir
.getPath() + File
.separator
+ relLibDir
);
23 File
[] files
= libDir
.listFiles();
24 for (File file
: files
) {
26 classpath
.add(file
.getCanonicalPath());
27 } catch (IOException e
) {
28 throw new RuntimeException("Cannot get path for " + file
, e
);
31 return classpath
.toArray(new String
[classpath
.size()]);
34 public String
getAntHome() {
35 return baseDir
.getPath();
38 public String
getJavaLibraryPath() {
39 return baseDir
.getPath() + File
.separator
+ "bin";