GUI for Java Projects

Would any one guide me how I can run a Java project in a web browser. What do I need to have in my machine. Assuming I clone a Java project from git-hub, how do I run it a web browser to see the GUI of the project?

@kdaud you have to follow the below steps.

  1. Setup the openmrs sdk :- Guide Line

Pre requisites :-

  1. Installed Java
  2. Pre installed mysql in you’re machine (Docker container, Root installation)
  1. If you’re thinking about doing development choose Distributions server.
  2. And you can select the reference application version that you need.
  3. During the setup time it will be asking for the local connection to the mysql database that you’re going to persists openmrs data.First loging to you’re mysql server with root user and create a separate db for openmrs.
  4. After setup is completed you can run the openmrs sdk from any where in your’re machine with mvn openmrs-sdk:run command there you can choose which server instance to run select the one that you created recently.
  5. After with the port you specify (default 8080) you will be able to access the web interface http://localhost:8080/openmrs

And afterwards if you’re thinking about contributing.You may need to clone the modules that you going to contribute locally.And from the project root run mvn clean install and then run mvn openmrs-sdk:watch in order to add the project in to watch list of server this will allow you to develop and have the changes on the server real time without need of rebuilding. Make sure to clean cache of the browser for changes to appear on the screen.

Hope this would help @kdaud

@ayesh During installation of Setup OpenMRS Reference Application 2.3.1 on MySQL database, the process requires me select the database to use. Which one would be appropriate to choose? Attached is the snapshot


Have you set up mysql locally ? Or are you using a docker container

I set it locally though on setting up OpenMRS Reference Application 2.3.1 on MySQL database, it requires me to select the database to use

Yes you should install mysql locally.Follow the link below inorder to install mysql locally and to create a local database.After doing this you can select 1 st option in the installation

Set up and create db in mysql

After installing MYSQL locally, the process throws an exception of BUILD FAILURE at the end of the process. Have shares a log of the error in the screen shot

@ayesh should I unistall and re-install again mysql locally?

Can you login to mysql server from a cmd with command

mysql -u root -p

Unable to login in . Information given ‘mysql’ is not recognized as an internal or external command,

Ok am not familliar with winodws.But as the blog I shared suggests can you do like this

To configure remote access, launch myslq.exe by opening a command prompt and navigating to C:\Program Files\MySQL\MySQL Server 5.X\bin and type:

mysql -u root -p

Finally am there now! Thanks @ayesh for your responses. But have not yet known how I will be running the project in a web browser to access the GUI of the project

So the build passed.As I said previously use command mvn openmrs-sdk:run.Btw have you installed maven in you’re machine.If not please do so.Then you can access the portal from http://localhost:8080/openmrs

I installed maven in my machine plus tomcat server as well

mvn openmrs-sdk:run does not successfully complete the process. It show some Build Failure at the end of the process. Here is the log

This url http://localhost:8080/openmrs throws an error as well as shared in the log

@klaud am just wonderinng what you are trying to do!! are you running an openmrs procject?

@herbert24 Yes! however I also wished to know how I can run any Java project in a web browser

1 Like