I want to make java code that does only this:
Login to the \'xe\' connection in Oracle 11g database. That\'s all. How can do it ?
EDIT: yes, i was using JDBC,
If you want to connect as SYS you have to use sys as sysdba
So in your java code try like the following code
String url = "jdbc:oracle:thin:@//localhost:1521:xe";
String username = "sys as sysdba";
String password = "123456";
Connection connection= DriverManager.getConnection(url, username, password);
Regards