---
tags: mPOS, API, development
---
# mPOS API Server Development Environment (Java 11, Tomee, EclipseEE)
## Downloads / Installation
### Required
- Eclipse EE ([https://www.eclipse.org/downloads/packages/](https://www.eclipse.org/downloads/packages/))
- JDK 11
- OpenJDK 11 ([https://jdk.java.net/java-se-ri/11](https://jdk.java.net/java-se-ri/11)) , Or
- AdoptOpenJDK ([https://adoptopenjdk.net/](https://adoptopenjdk.net/)) **RECOMMENDED**
- Tomcat v9.0 [Tomee 8.0.1 plus] ([http://tomee.apache.org/download-archive.html](http://tomee.apache.org/download-archive.html))
- Oracle JDBC 6-11.2.0.4 ([https://mvnrepository.com/artifact/com.oracle.database.jdbc/ojdbc6/11.2.0.4](https://mvnrepository.com/artifact/com.oracle.database.jdbc/ojdbc6/11.2.0.4))
### Optional
- org.eclipse.paho.client.mqttv3-1.2.4 ([https://mvnrepository.com/artifact/org.eclipse.paho/org.eclipse.paho.client.mqttv3/1.2.4](https://mvnrepository.com/artifact/org.eclipse.paho/org.eclipse.paho.client.mqttv3/1.2.4))
## Setup Development Environment
<!--  -->
1. Clone mPOS project repo
```bash
git clone http://172.16.9.53:80/IT_MPOS/mPOS.git
```
<!-- ```bash
git clone [http://172.16.9.53:80/IT_MPOS/mPOS.git](http://172.16.9.53:80/IT_MPOS/mPOS.git)
``` -->
2. Open eclipse
- Workspace: `<repo>/BackEnd/`
3. File → Open Projects from File System

:::info
- Make sure source folder is `mPOS/src` and output folder is `mPOS/build`

:::warning
- if source folder invalid, remove and then re-add folder

:::
4. File → New → Other → Server → Server

5. Select `Tomcat v9.0 Server`, Change Server Name

6. Select Tomcat/Tomee Server Directory

7. Configure Project Facets

8. Create custom library (Name: TK3C_MPOS_LIB)

9. Add required JARs (jdbc driver, mqtt client)


10. Right-click project root (mPOS) → Build Path → Configure Build Path...

11. If not added, add required libraries to Classpath: `EAR Libraries, Server Runtime, Web App Libraries, JRE System Library`

12. Add TK3C_MPOS_LIB to Classpath


13. Final Classpath setting

14. Double click server (open server setting) → Open launch configuration


15. Add **jdbc driver** to server launch configuration

16. Add Datasource to Server config `context.xml`
```xml
<Resource name="jdbc/SCDB" type="javax.sql.DataSource" url="jdbc:oracle:thin:@10.253.2.250:1521:XE" driverClassName="oracle.jdbc.OracleDriver" username="..." password="..." auth="Container"/>
```

17. Set/Check Deployment Assembly


18. Add resource to server


20. Start server
