And what is the error you are receiving?
You may as well simplify this as well by making it a prepared statement. Prepared statements have many advantages over standard statements.
String username = "abc";
String sqlText = "select CustId, CustLoginId, CustPassword from javaDB.Customer where custLoginId = ?";
PreparedStatement stmt = conn.prepareStatement(sqlText);
ResultSet rs = stmt.executeQuery();