How to specify platform independent file path?
WINDOWS
File.separatorChar: \
File.separator: \
File.pathSeparator: ;
File.pathSeparatorChar: ;
LINUX
File.separatorChar: /
File.separator: /
File.pathSeparator: ;
File.pathSeparatorChar: ;
Y una función para obtener el path url del archivo:
protected String damePathURL(String serverPathFile){
try{
return serverPathFile.replaceAll(File.separator, "/");
}catch(Exception e){
//lanzaría una excepción de tipo java.util.regex.PatternSyntaxException al intentar sustituir el File.Separator=\
return serverPathFile.replaceAll(File.separator+File.separator, "/");
}
}
jueves, 4 de octubre de 2007
How to specify platform independent file path?
Publicado por
Juan Antonio Ruz
en
1:48
3
comentarios
jueves, 7 de junio de 2007
Tail for Win32
un programa para windows que hace como el tail -f de linux
Publicado por
Juan Antonio Ruz
en
2:42
0
comentarios
jueves, 19 de abril de 2007
windows xp home edition sp2 sobre macos problema restart reboot problem
http://www.apple.com/support/downloads/imacefifirmwareupdate11.html
Publicado por
Juan Antonio Ruz
en
6:13
0
comentarios
Categorías: MACOSX, Soluciones, windows
viernes, 13 de abril de 2007
configurar JAVA_HOME en eclipse y ant
Cuando recibimos el mensaje: Perhaps JAVA_HOME does not point to the JDK, que en mi caso me salió al intentar lanzar unas pruebas desde ANT tenemos que seguir las siguientes instrucciones :
-----------------------------------------------
Of course, JAVA_HOME is pointing to the right location, in both the OS environment and within Eclipse (This variable can be set within Eclipse through Window > Preferences > Java > Classpath Variables).
So how to fix the Ant build problem?
Go to Window > Preferences > Ant > Runtime. Choose the Classpath tab. Select the Global Properties node in the tree and click Add External JARs. Select tools.jar from your JDK directory (e.g., j2sdk1.4.2_03\lib\tools.jar).
------------------------------------------------
Publicado por
Juan Antonio Ruz
en
3:52
0
comentarios