projects
/
nestedvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
make nestedvm work under SableVM
[nestedvm.git]
/
src
/
org
/
ibex
/
nestedvm
/
util
/
Platform.java
diff --git
a/src/org/ibex/nestedvm/util/Platform.java
b/src/org/ibex/nestedvm/util/Platform.java
index
ed59627
..
55fe2f1
100644
(file)
--- a/
src/org/ibex/nestedvm/util/Platform.java
+++ b/
src/org/ibex/nestedvm/util/Platform.java
@@
-13,7
+13,10
@@
public abstract class Platform {
static {
float version;
try {
static {
float version;
try {
- version = Float.valueOf(System.getProperty("java.specification.version")).floatValue();
+ if(getProperty("java.vm.name").equals("SableVM"))
+ version = 1.2f;
+ else
+ version = Float.valueOf(getProperty("java.specification.version")).floatValue();
} catch(Exception e) {
System.err.println("WARNING: " + e + " while trying to find jvm version - assuming 1.1");
version = 1.1f;
} catch(Exception e) {
System.err.println("WARNING: " + e + " while trying to find jvm version - assuming 1.1");
version = 1.1f;
@@
-33,6
+36,15
@@
public abstract class Platform {
}
}
}
}
+ public static String getProperty(String key) {
+ try {
+ return System.getProperty(key);
+ } catch(SecurityException e) {
+ return null;
+ }
+ }
+
+
abstract boolean _atomicCreateFile(File f) throws IOException;
public static boolean atomicCreateFile(File f) throws IOException { return p._atomicCreateFile(f); }
abstract boolean _atomicCreateFile(File f) throws IOException;
public static boolean atomicCreateFile(File f) throws IOException { return p._atomicCreateFile(f); }