Revision 15948 trunk/libraries/libRaster/src/org/gvsig/raster/RasterLibrary.java

View differences:

RasterLibrary.java
110 110
	 * Directorio temporal para la cach?. Si gastamos el mismo que andami este se ocupar? de gestionar su
111 111
	 * destrucci?n al cerrar gvSIG.
112 112
	 */
113
	public static String tempCacheDirectoryPath = System.getProperty("java.io.tmpdir") + "/tmp-andami";
113
	public static String tempCacheDirectoryPath = System.getProperty("java.io.tmpdir") + File.separator + "tmp-andami";
114 114
	/**
115 115
	 * Ruta o rutas donde busca jars con clases que incorporen elementos nuevos que extiendan
116 116
	 * otros ya existentes. Estos pueden ser drivers o filtros.
117 117
	 */
118
	public static String[] pathExtensions = {"./"};
119
	
118
	public static String[] pathExtensions = {"." + File.separator};
119

  
120 120
	private static Hashtable clasesJar = new Hashtable();
121
	
121

  
122 122
	/**
123 123
	 * Ejecuta las acciones necesarias para arrancar la librer?a.
124 124
	 */
......
137 137
		ErmapperDriver.register();
138 138
		MrSidDriver.register();
139 139
		MemoryRasterDriver.register();
140
		
140

  
141 141
		GdalWriter.register();
142 142
		ErmapperWriter.register();
143 143
		JpegWriter.register();
......
206 206
	 */
207 207
	private static void registerClasses() throws Exception {
208 208
		RasterClassLoader loader = new RasterClassLoader();
209
		
209

  
210 210
		//Cargamos sobre jarList todos los File correspondientes a los jar contenidos en pathExtensions
211 211
		File[] jarList = null;
212 212
		for (int iPath = 0; iPath < pathExtensions.length; iPath++) {
......
216 216
												public boolean accept(File pathname) {
217 217
														return (pathname.getName().toUpperCase().endsWith(".JAR"));
218 218
												}
219
											  });
219
												});
220 220
			}
221 221
		}
222
		
222

  
223 223
		//Creamos las URL
224 224
		URL[] urls = new URL[jarList.length];
225 225

  
......
230 230
				Logger.getLogger(RasterLibrary.class.getName()).debug("Error formando la URL, jar incorrecto", e);
231 231
			}
232 232
		}
233
		
233

  
234 234
		//Comprobamos que no haya clases repetidas
235 235
		ZipFile[] jarFiles = new ZipFile[jarList.length];
236 236
		for (int i = 0; i < jarList.length; i++) {
......
243 243
					ZipEntry file = (ZipEntry) entradas.nextElement();
244 244
					String fileName = file.getName();
245 245

  
246
					if (!fileName.toLowerCase().endsWith(".class")) 
246
					if (!fileName.toLowerCase().endsWith(".class"))
247 247
						continue;
248
					
248

  
249 249
					fileName = fileName.substring(0, fileName.length() - 6).replace('/', '.');
250 250

  
251 251
					if (clasesJar.get(fileName) != null) {

Also available in: Unified diff