I have an account in oracle database. I can connect it via jdbc in my java code.
When I access database from Oracle SQL Developer, under “Connections”->”Other Users”, I can access to their tables (I have been assigned privilege for reading others tables).
My question is, how to access / retrieve data from others tables via jdbc?
You need to prefix the table name with the schema name, which in Oracle is the same as the user name.
If having the user name hardcoded in the SQL statement is a problem, you could make that configurable on the Java side somehow or install a table alias (synonym) into your own schema on the Oracle side.