项目作者: seanJosephFitzpatrick

项目描述 :
String Comparison - 4th year project
高级语言: CSS
项目地址: git://github.com/seanJosephFitzpatrick/JavaRMI.git
创建时间: 2016-12-08T18:23:07Z
项目社区:https://github.com/seanJosephFitzpatrick/JavaRMI

开源协议:MIT License

下载


RMI String Comparison Service.

image

4th year Software Development project. The project is a dynamic Web Application using Java Server Pages JSP to compare two text strings using string comparison algorithms. This is achieved using the Java Remote Method Invocation RMI API which provides a mechanism to create distributed applications in java. Java RMI allows a machine (JVM) to invoke methods on another machine (JVM). The first machine (JVM) looks up the method it wants to invoke in the RMI Registry and sends the two strings. The method is invoked on the second machine (JVM) and the two strings are compared and the result returned to the first machine (JVM).

Languages, Technologies and Implementation Architecture used for this project:

  • Java, Java RMI, Java Server Pages, Eclipse.

Algorithms Implemented.

[Hamming Distance][https://en.wikipedia.org/wiki/Hamming_distance]
[Levenshtein Distance][https://en.wikipedia.org/wiki/Levenshtein_distance]
[Damerau-Levenshtein Distance][https://en.wikipedia.org/wiki/Damerau%E2%80%93Levenshtein_distance]

Getting Started

Download and extract the zip folder here JavaRMI

Prerequisites

Eclipse JEE Neon. You can download here Eclipse JEE Neon

  • Select Operating System —> Eclipse IDE for Java EE Developers
    Java 8. You can download the latest version of Java here Java 8
    Apache-tomcat-9.0.0.M13. You can download Apache Tomcat here Apache Tomcat
  • Select version 9 —> Binary Distribution —> zip

Installing

Insall Java JDK/JRE
Video tutorial of How to Install Java JDK/JRE here Install Java

Install Eclipse Neon JEE
Video tutorial of How to Install Eclipse Neon on Windows 10 here Install Eclipse Neon JEE

Insall Apache Tomcat
Video tutorial of How to Install Apache Tomcat on Windows here Install Apache Tomcat

Deployment

There are two methods for deployment. Running the application using the string-service.jar and comparator.war files is the fastest as you just need java and Apache installed.

  • Eclipse
    Launch Eclipse and set the workspace as the root folder that was extracted from the GitHub project. Select the folder using the Eclipse popup window browse button. Create a new project File tab —> New —> Other —> Web —> Dynamic Web Project and name it JavaRMI. This is the name of the folder containing the project, Eclipse will pull in the files into the created project. You can see a video of how to add sever to eclipse project Here.
    Once the project and server is set up in eclipse, right click on the JavaRMI project —> Properties —> Targeted Runtimes and tick the box for Apache tomcat 9. Click Apply and ok.

To run the application in Eclipse
1) right click on Servant.java in the ie.gmit.sw package and select —> run as —> java application.
2) right click on the server in the servers tab and start server.
3) right click on index.jsp in the webcontent folder and run on server.

  • Apache Tomcat
    Place the string-service.jar and comparator.war file into the apche-tomcat/webapps folder. The string-service.jar can be placed in any folder, place in the same folder for convenience. Navigate into the apcha-tomcat/webapps folder using the command line.
    Run the string-service.jar with the following command: java –cp ./string-service.jar ie.gmit.sw.Servant.

Navigate into the apache-tomcat/bin folder using a seperate Command Line. Run the comparator.war with the following command startUp.bat.

Open a browser and type localhost:8080/comparator into the address bar.

1) Select Algoritm from the drop-down menu
2) Enter a text string into each input box
3) Click the compare button

Built With

Authors

Sean Fitzpatrick

License

This project is licensed under the MIT License