summaryrefslogtreecommitdiffstats
path: root/scilab/modules/javasci
diff options
context:
space:
mode:
authorAllan CORNET <allan.cornet@scilab.org>2010-01-12 13:35:19 +0100
committerAllan CORNET <allan.cornet@scilab.org>2010-01-12 13:35:19 +0100
commit8a33073e1b93c9ecf67138a4d57e34320c541cb0 (patch)
tree31108d5736de01cbccaade352c9092fe823c6093 /scilab/modules/javasci
parent65272d7d13ba96c47919bce77b06f1a50d979549 (diff)
parent43a414f8bc00d35a8eeb17a715504afe3b026309 (diff)
downloadscilab-8a33073e1b93c9ecf67138a4d57e34320c541cb0.zip
scilab-8a33073e1b93c9ecf67138a4d57e34320c541cb0.tar.gz
Merge remote branch 'refs/remotes/origin/5.2'
Diffstat (limited to 'scilab/modules/javasci')
-rw-r--r--scilab/modules/javasci/src/java/javasci/ClassPath.java15
1 files changed, 8 insertions, 7 deletions
diff --git a/scilab/modules/javasci/src/java/javasci/ClassPath.java b/scilab/modules/javasci/src/java/javasci/ClassPath.java
index 094a7e2..891ad5d 100644
--- a/scilab/modules/javasci/src/java/javasci/ClassPath.java
+++ b/scilab/modules/javasci/src/java/javasci/ClassPath.java
@@ -21,7 +21,6 @@ import java.io.File;
21import java.io.IOException; 21import java.io.IOException;
22import java.net.URL; 22import java.net.URL;
23import java.net.URLClassLoader; 23import java.net.URLClassLoader;
24import java.net.URI;
25import java.util.Iterator; 24import java.util.Iterator;
26import java.util.Vector; 25import java.util.Vector;
27/*--------------------------------------------------------------------------*/ 26/*--------------------------------------------------------------------------*/
@@ -37,15 +36,17 @@ public class ClassPath {
37 /** 36 /**
38 * add a filename to java classpath. 37 * add a filename to java classpath.
39 * @param s a filename 38 * @param s a filename
39 * @param i a int
40 * @throws IOException if an error occurs 40 * @throws IOException if an error occurs
41 */ 41 */
42 public static void addFile(final String s,int i) throws IOException { 42 public static void addFile(final String s, int i) throws IOException {
43 addFile(new File(s), i); 43 addFile(new File(s), i);
44 } 44 }
45 /*-----------------------------------------------------------------------*/ 45 /*-----------------------------------------------------------------------*/
46 /** 46 /**
47 * add a file to java classpath. 47 * add a file to java classpath.
48 * @param f a file 48 * @param f a file
49 * @param i a int
49 * @throws IOException if an error occurs 50 * @throws IOException if an error occurs
50 */ 51 */
51 public static void addFile(final File f, int i) throws IOException { 52 public static void addFile(final File f, int i) throws IOException {
@@ -69,7 +70,7 @@ public class ClassPath {
69 method.setAccessible(true); 70 method.setAccessible(true);
70 switch (i) { 71 switch (i) {
71 case 0: /* Load now */ 72 case 0: /* Load now */
72 method.invoke(sysloader , new Object[] { u }); 73 method.invoke(sysloader , new Object[] {u});
73 break; 74 break;
74 case 1: /* Load later (background) */ 75 case 1: /* Load later (background) */
75 queued.add(u); 76 queued.add(u);
@@ -105,7 +106,7 @@ public class ClassPath {
105 /** 106 /**
106 * Load all the classpath in dedicated threads in background 107 * Load all the classpath in dedicated threads in background
107 */ 108 */
108 public static void loadBackGroundClassPath(){ 109 public static void loadBackGroundClassPath() {
109 Thread backgroundLoader = new Thread() { 110 Thread backgroundLoader = new Thread() {
110 public void run() { 111 public void run() {
111 try { 112 try {
@@ -113,11 +114,11 @@ public class ClassPath {
113 Iterator<URL> urlIt = queued.iterator(); 114 Iterator<URL> urlIt = queued.iterator();
114 115
115 while (urlIt.hasNext()) { 116 while (urlIt.hasNext()) {
116 ClassPath.addURL(urlIt.next(),0); 117 ClassPath.addURL(urlIt.next(), 0);
117 } 118 }
118 119
119 }catch (Exception e){ 120 } catch (Exception e) {
120 System.err.println("Error : "+e.getLocalizedMessage()); 121 System.err.println("Error : " + e.getLocalizedMessage());
121 } 122 }
122 } 123 }
123 }; 124 };