- java 8
# install java 8 on Ubuntu
sudo apt update
sudo apt install openjdk-8-jdk -y
# to check if you have multiple version of java and setting default to java 8
sudo update-alternatives --config java
# now other versions of java needs to be deleted
# if not deleted Assignment2 will cause an error
# fist list the installed java versions using this command
dpkg --list | grep -i jdk
# now use this command to remove all the components of other version
sudo apt purge openjdk-11-jdk
sudo apt purge openjdk-11-jdk-headless
sudo apt purge openjdk-11-jre
sudo apt purge openjdk-11-jre-headless
# now check again if only java 8 present
dpkg --list | grep -i jdk
- Terminal 1
# compile all java files javac *.java # compile implementation file rmic ServerImplementation # start rmiregistry rmiregistry
- Terminal 2
# start the server java Server
- Terminal 3
# connect the client # for addtion, substraction, division, multiplication java Client 10 20 # for square, square root java Client 25 # for string equal java Client abc abc # for palindrome java Client aba
- Terminal 1
# complile all the files idlj -fall ServiceModule.idl javac *.java ServiceModule/*.java # start orbd orbd -ORBInitialPort 1056
- Terminal 2
# start the server java ServiceServer -ORBInitialPort 1056
- Terminal 3
# connect the client java ServiceClient -ORBInitialPort 1056 -ORBInitialHost localhost
- MPI setup
- Download MPJ Express
- Extract it in Downloads Folder
# replace {ubuntu_username} with your machines username like ubuntu, vboxuser # or check username by going into home dir cd /home && ls # set MPJ_HOME env variable export MPJ_HOME=/home/{ubuntu_username}/Downloads/mpj-v0_44 # update PATH env variable export PATH=$MPJ_HOME/bin:$PATH # compile the java program javac -cp $MPJ_HOME/lib/mpj.jar ArrSum.java # run compiled java program $MPJ_HOME/bin/mpjrun.sh -np 4 ArrSum
- Terminal 1
python server.py # or python3 server.py
- Terminal 2
python client.py #or python3 client.py
- Terminal 1
# complile the java program javac TokenRing.java # run compiled java program java TokenRing
- Terminal 1
# compile the java program javac Bully.java javac Ring.java # run compiled java program java Bully java Ring
# git clone for ubuntu
git clone https://github.com/b1ink0/SPPU-BE-IT-DS.git
# in cmd
curl -L -o SPPU-BE-IT-DS-main.zip https://github.com/b1ink0/SPPU-BE-IT-DS/archive/refs/heads/main.zip
# or in powershell
Invoke-WebRequest -Uri "https://github.com/b1ink0/SPPU-BE-IT-DS/archive/refs/heads/main.zip" -OutFile "SPPU-BE-IT-DS-main.zip"