How to get a file’s parent folder properly in java?

By W.Zh

In java , file normally is a relative file, which means that these two are different in java:

        File f = new File(“./file1.txt”);
File f1 = new File(“file1.txt”);

f1.getParent() will get an error as it return a null. so how to get parent folder of a file normally by this way:


Logging in Weblogic

By. W.ZH

Basically for J2EE/JAVA logging, you have choice among: Log4J, Apache Commons Logging and also the
SLF4J . But for using weblogic server , oracle has one called  Oracle Diagnostic Loggings. Here some article can help:

log4J in your application of WLS:

ODL Manage in WLS EM

One example for ODL

firewall iptables

[root@yourserver tmp]# service iptables start
[root@yourserver tmp]# service iptables stop
[root@yourserver tmp]# service iptables restart
[root@yourserver tmp]# service iptables status