Java Split() Method

public String[] split(String regex, int limit) {} +limit > 0: return exactly the number of substrings indicated ex: limit = 3: return exactly an array with first 3 substrings even though the father string can be splitted into more than 3 substrings [1;2;3;4;5;] -> Only… Read More

Java Set for the Heap Size

1.Find the Maximum heap size: javaw -XX:+PrintFlagsFinal | find “MaxHeapSize” 2.Find the Initial heap size: javaw -XX:+PrintFlagsFinal | find “InitialHeapSize” 3. Change the Heap size @set JAVA_OPTS=-Xms256m -Xmx1g OR java -Xms (set initial Java heap size) java -Xmx (set maximum Java heap size) java -Xss… Read More

JSP Take the Correct Absolute Path

1.Take the Correct Absolute Path Find the absolute path of the current coding JSP file String jspFilePath = getServletContext().getRealPath(request.getRequestURI()).replace(‘\\’, ‘/’); String absPath = jspFilePath.substring(0, jspFilePath.lastIndexOf(“/”)); absPath = absPath.substring(0, absPath.lastIndexOf(“/”));