Is the package the same?

If not than the only thing that you will have to do is, provide the fully qualified package name when declaring variables. ie
Code:
ResultSet myResultSet = myStatement.executeQuery("SELECT * FROM SomeTable");

java.util.Date utilDate = new java.util.Date();

java.sql.Date sqlDate = myResultSet.getDate(1);
Notice that the package is specified (java.util and java.sql)

If the packages are the same, than you will run into problems