43 |
|
|
44 |
private Runtime() { |
private Runtime() { |
45 |
String path = getLibraryPath(); |
String path = getLibraryPath(); |
46 |
|
if (path == null) |
47 |
|
{ |
48 |
|
libpath = new String[0]; |
49 |
|
} |
50 |
|
else |
51 |
|
{ |
52 |
int numColons = 0; |
int numColons = 0; |
53 |
int pathLength = path.length(); |
int pathLength = path.length(); |
54 |
for(int i=0;i<pathLength;i++) { |
for(int i=0;i<pathLength;i++) { |
60 |
int current = 0; |
int current = 0; |
61 |
int libpathIndex = 0; |
int libpathIndex = 0; |
62 |
while(true) { |
while(true) { |
63 |
int next = path.indexOf(':',current); |
int next = path.indexOf(File.pathSeparatorChar,current); |
64 |
if(next == -1) { |
if(next == -1) { |
65 |
libpath[libpathIndex] = path.substring(current); |
libpath[libpathIndex] = path.substring(current); |
66 |
break; |
break; |
69 |
libpathIndex++; |
libpathIndex++; |
70 |
current = next+1; |
current = next+1; |
71 |
} |
} |
72 |
|
} |
73 |
} |
} |
74 |
|
|
75 |
/** Get the current Runtime object for this JVM. |
/** Get the current Runtime object for this JVM. |