Desktop.getDesktop().open(new File("C:\\folder"));
Note: java.awt.Desktop
got introduced in JDK 6. is not supported in JDK 5
Runtime.getRuntime().exec("explorer C:\bin");
FileSystemView.getFileSystemView().getHomeDirectory()
Desktop.getDesktop().open(new File("C:\\folder"));
Note: java.awt.Desktop
got introduced in JDK 6. is not supported in JDK 5
Runtime.getRuntime().exec("explorer C:\bin");
FileSystemView.getFileSystemView().getHomeDirectory()
private int executeCallableStatement(final String aSql, final Integer fetchSize, QueryListener queryListener) throws SQLException {
if(isNotConnected()){
try{
queryListener.onError("DB연결을 먼저하세요!!");
}
finally{
queryListener.onFinished();
}
return 0;
}
final String sql = trimSqlErrorString(aSql);
int rownums=0;
ResultSet rset = null;
CallableStatement stmt = null;//ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY);
try{
stmt = connMgr.prepareCall(sql);
stmt.execute();
queryListener.onEachQueryExecuting(stmt);
if(stmt.getMoreResults()){
rset = stmt.getResultSet();
rownums = queryListener.onEachResultSet(sql, rset, fetchSize);
}
else {
rownums = stmt.getUpdateCount();
queryListener.onUpdatedCount(rownums, sql);
}
}
finally{
connMgr.close(rset, stmt);
queryListener.onEachQueryClosed();
}
return rownums;
}
private String trimSqlErrorString(String aSql) {
//.replaceAll("--[^\n]+\n", "").replaceAll("/\\*[^/]+\\*/", "").replaceAll("\\?","'1'").trim();
return MyStringUtil.trim(aSql).replaceAll("/\\*\\s+", "/*");
}
function StringBuffer() { this.buffer = []; }To use it:StringBuffer.prototype.append = function(string)
{
this.buffer.push(string);
return this;
}StringBuffer.prototype.toString = function()
{
return this.buffer.join("");
}
var s = new StringBuffer();link:
s.append("Hello, ").append(" World!");
alert(s.toString());