En
algun momento es necesario conocer las propiedades del
Lenguaje Java, aqui un ejemplo de como conocer dichas propiedades que
pueden resultar utiles cuando llevamos a produccion una aplicacion web o
win:
System.out.println("javax.net.ssl.trustStoreType--------->:" + System.getProperty("javax.net.ssl.trustStoreType"));
System.out.println("javax.net.ssl.trustStorePassword----->:" + System.getProperty("javax.net.ssl.trustStorePassword"));
System.out.println("javax.net.ssl.trustStore------------->:"
+ System.getProperty("javax.net.ssl.trustStore"));
System.out.println("javax.net.ssl.keyStoreType----------->:" + System.getProperty("javax.net.ssl.keyStoreType"));
System.out.println("javax.net.ssl.keyStorePassword------->:" + System.getProperty("javax.net.ssl.keyStorePassword"));
System.out.println("javax.net.ssl.keyStore--------------->:" + System.getProperty("javax.net.ssl.keyStore"));
System.out.println("path.separator----------------------->:" + System.getProperty("path.separator"));
System.out.println("file.separator----------------------->:" + System.getProperty("file.separator"));
System.out.println("java.class.path---------------------->:" + System.getProperty("java.class.path"));
System.out.println("java.class.version------------------->:" + System.getProperty("java.class.version"));
System.out.println("java.home---------------------------->:" + System.getProperty("java.home"));
System.out.println("java.vendor-------------------------->:" + System.getProperty("java.vendor"));
System.out.println("java.vendor.url---------------------->:" + System.getProperty("java.vendor.url"));
System.out.println("java.version------------------------->:" + System.getProperty("java.version"));
System.out.println("line.separator----------------------->:" + System.getProperty("line.separator"));
System.out.println("os.arch------------------------------>:" + System.getProperty("os.arch"));
System.out.println("os.name------------------------------>:" + System.getProperty("os.name"));
System.out.println("user.dir----------------------------->:" + System.getProperty("user.dir"));
System.out.println("user.home---------------------------->:" + System.getProperty("user.home"));
System.out.println("user.name---------------------------->:" + System.getProperty("user.name"));
System.out.println("Carpeta instalado Tomcat------------>:" + System.getProperty("catalina.base"));
Si utilizan Genexus les puede ser de mucha utilidad el utilizar la siguiente sentencia:
java [!&Ruta!]=httpContext.getDefaultPath();
Lo que retorna es:
C:\Tomcat7\webapps\miaplicacion
O tambien:
java [!&Ruta!]=System.getProperty("catalina.base"));
Lo que retorna es:
C:\Tomcat7
No hay comentarios:
Publicar un comentario