Link two databases through the java application I have a java application that migrates data from one database to another.
I have to do update data in my database with data from another database. Another database provided by the customer.

Now it is this way:

I make a request from java application to my database(oracle) to get the address and driver of database, user, password from which I want to get the data.

oracleConn = DriverManager.getConnection(...); //connect to my DB

PreparedStatement prStServerP = this.oracleConn.prepareStatement("SELECT adress, driver, user, password from connections where svr_id = ?"); //settings to connect to the remote DB


Then I establish a connection with the remote database.

Connection dbConn = this.getDbConnection(svrId);


From my database I get "selects" for the remote Database.

oraclePrSt = this.oracleConn.prepareStatement("SELECT slq_select FROM SELECTS where svr_id...")


Also from my database I choose the table which will put the data from the remote database.

I Doing "selects" in a remote database and put the data:

Statement dbPrSt = dbConn.createStatement();
ResultSet dbRs = dbPrSt.executeQuery(oracleRs.getString(3)); //here selects that I got from my database
ResultSetMetaData dbRsMd = dbRs.getMetaData();


After all of this I record the results from a remote database into a file and using sqlLoader writes data in my database.

Please, tell me is there any options to make it easier or better?
Your solution is fine if you only have a couple of tables to copy.
If you have a whole database you could export the entire database to a SQL dump and them run that whole script in the new database manually.

If you need to do transformation to the data, then you can look into Oracle ETL tools.