Student Query Design : This is an example of server-client module using JAVA RMI, allowing remote communication between systems connected in same network. Program Details Server: Stud.java - Interface file Student.java StudentImpl.java - Interface Implementation file MyServer.java Client: Stud.java - Interface file MyClient.java
Steps Platform used: - LINUX UBUNTU Connect two PCs with wireless connection and note the IP Address of the Server (you may like to connect using the ad-hoc connection) IP address can be checked using the following command:
If Wi-Fi ad hoc is setup, see the inet4 of wlan connection Otherwise, for Ethernet connection, se the inet4 of eth connection Change this IP Address in Server.java and Client.java file in the command for connection Server steps On the server side -- Open the Directory to the destination folder, right click on the blank space and select ‘Open in Terminal’ Open two terminals Type the following commands – On terminal window 1 Ensure you have the necessary packages and the path of mysql connector is set in the destination folder To set the path use this command
NOTE: You may want to ensure that the path of your .jar file is the same Compile all the java files #javac –d *.java Create the Stub and Skeleton using rmic tool
Bind to registry
On Terminal window 2 Ensure you have the path set for mysql connector
Ensure the server program is complied
Start the server
On Client side -- Open the Directory to the destination folder, Right click on blank space and select ‘Open in Terminal’ Ensure you have the path set for mysql connector
Compile the client java file
Start the Client Program
It will prompt you to enter the last name, when you enter the required information corresponding firsts name of the student is displayed.
To connect two laptops (wireless devices):
- On any one of two the machines that you are using, click on the network icon on the panel (top right cornerof the desktop).
- Select the ‘Create New Wi-Fi Network....’ option
- Create a new wifi connection.
- Now give your network a name and choose security options. Enter the password (not necessary).
- Click on ‘Create’
- Wait while the network is created. Once its connected it will display a notification on the upper right corner of the desktop.
- The network was successfully created and is ready to use.
- On the Client computer, click on the wireless icon to see available networks and connect to the ad hoc network you just created on the other machine by providing password (if given).