I'm not sure if the following steps will help you or not to solve the "IO Error: The network adapter could not establish the connection" issue just give a try it works in my case.
The error was:
(In NetBeans and in Sqldeveloper)
Steps:
Step 1: Open CMD
Step 2: Type services.msc and hit enter
Step 3: Search for Oracle Services and make sure that the following three are running: OracleXETNSListener OracleXEClrAgent OracleServiceXE
Step 4: If not then just right click and hit start
Follow the following steps to create an offline installer setup so that whenever you format you don't have to download it again or you can install it to another pc without an internet connection.
I downloaded Visual studio 2017 Community edition from here but this procedure will work for other editions too. It took me near about 13 hours and download size was ( 30.5 GB )
Download visual studio setup exe file from the above link.
Open Command Prompt
Move to your downloaded directory where the exe file is
And use the following command
vs_community_something.something.exe
This is name of your downloaded file
In my case it is -> vs_community__1972895516.1509628450.exe
It differs per download so don't worry about matching the exact digits :p
--layout dir_path
where dir_path is a location where your offline installer will present. By default, all languages will be downloaded. For me I only want english US for that
/**
*
* @author yogesh
*/
public interface one extends Remote{
public int add(int num1,int num2)throws RemoteException;
public int sub(int num1,int num2)throws RemoteException;
public int mul(int num1,int num2)throws RemoteException;
public int div(int num1,int num2)throws RemoteException;
Load the changes by executing your profile: 777 ~/.profile
. ~/.profile
Start the Oracle 11gR2 XE:
sudo service oracle-xe start
Add user YOURUSERNAME to group dba using the command:
sudo usermod -a -G dba YOURUSERNAME
Step 4: Using the Oracle XE Command Shell
Start the Oracle XE 11gR2 server using the command:
sudo service oracle-xe start
Start command line shell as the system admin using the command:
sqlplus sys as sysdba
Enter the password that you gave while configuring Oracle earlier. You will now be placed in a SQL environment that only understands SQL commands.
Create a regular user account in Oracle using the SQL command:
create user USERNAME identified by PASSWORD;
Replace USERNAME and PASSWORD with the username and password of your choice. Please remember this username and password. If you had executing the above with a message about , then execute the following SQL command and try again:
alter database open resetlogs;
Grant privileges to the user account using the SQL command:
grant connect, resource to USERNAME;
Replace USERNAME and PASSWORD with the username and password of your choice. Please remember this username and password.
Exit the admin shell using the SQL command:
exit;
Start the shell as a regular user using the command: