mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-23 00:51:01 +03:00
Update JVMHelper.java
Optimized "for" loop
This commit is contained in:
parent
1b516ccf2f
commit
e7846adaf2
1 changed files with 4 additions and 5 deletions
|
@ -100,16 +100,15 @@ public static String[] getClassPath() {
|
|||
public static URL[] getClassPathURL() {
|
||||
String[] cp = System.getProperty("java.class.path").split(File.pathSeparator);
|
||||
URL[] list = new URL[cp.length];
|
||||
int it = 0;
|
||||
for (String s : cp) {
|
||||
|
||||
for(int i = 0; i < cp.length; i++) {
|
||||
URL url = null;
|
||||
try {
|
||||
url = new URL(s);
|
||||
url = new URL(cp[i]);
|
||||
} catch (MalformedURLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
list[it] = url;
|
||||
it++;
|
||||
list[i] = url;
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue