Tag Archives: Java

使用独立于系统的换行符 System Independent Newline Characters

使用System.getProperty(“line.separator”)来取得当前系统的换行符, 避免代码移植时出现换行问题.

Posted in Java | Tagged | Leave a comment

Eclipse is running in a JRE, but a JDK is required 解决方法

解决警告:Eclipse is running in a JRE, but a JDK is required
Some Maven plugins may not work when importing projects or updating source folders.

Posted in Java | Tagged , , | 3 Comments

JDBC CallableStatement INOUT Parameter 参数使用

INOUT参数既作输入又做输出用.  除了需要使用setDataType(value)之外, 还需要registerOutParameter. 例如:
String sql = "CALL ALTOBJ ( SOMETHING, ?, ?)"; // 第一个参数为IN

More…

Posted in Java | Tagged , , | 1 Comment

[旧]Java: JDBC 取得ResultSet的长度

JDBC 取得ResultSet的长度:

	resultSet.last(); // 游标移到最后, 获得rs长度
			int length = resultSet.getRow();
			resultSet.first(); // 还原游标到rs开头
Posted in Java | Tagged , | 1 Comment

Linux下设置Java Environment(环境变量)

今天在安装好Java后, 设置了环境变量, 并且source了profile一次, java -version, 测试成功; 后来用putty在外面用的时候发现java变量未生效. vi profile, 文件中变量已设置. 后来才知道每次Source /etc/profile, 只是在当前Te

More…

Posted in Java, Linux | Tagged , , | Leave a comment