Problems in building a Github Java project
This is a follow-up question from my previous question. I was initially trying to just install and run with the executables, but now I am trying to build the project located at: https://github.com/garlicPasta/dotServer
It is essentially supposed to transmit a 3D graphics file (.ply
binary format) from the server to the Android client.
The server's executable .jar
file is already there, but my problem is about importing and running the project. After importing in Eclipse, I added many required .jar libraries as below and removed most of the error codes.
commons-cli-1.4.jar
commons-collections-3.2.2.jar
javatuples-1.2.jar
javax.json-api-1.0.jar
jply-0.2.0.jar
la4j-0.6.0.jar
nanohttpd-2.3.1.jar
But it looks like there is a DataAccesLayer.MultiResTreeProtos
file which I can not find and shows the following error:
The import DataAccesLayer.MultiResTreeProtos cannot be resolved
I see a Google proto folder with .proto
files inside the project; maybe these are required libraries but I'm not sure how they relate to the project.
Can someone with more experience help me to run the project and find out what is missing?
Solution 1:
I am trying to build the project located at: https://github.com/garlicPasta/dotServer
First you need to read and take care of the instructions in the README.md file:
Dependencies :
- gradle
- goggle protocol buffers
Build
For building run the following command in the project root
gradle build
The dotServer
project is designed to be built using the Gradle build tool.
The other dependency is goggle protocol buffers, so you have to download and install this as well. This will give you the infrastructure to handle the .proto
files, which includes the protocol buffer compiler (more about this later):
Protocol Compiler Installation
The protocol compiler is written in C++. If you are using C++, please follow the C++ Installation Instructions to install
protoc
along with the C++ runtime.
I see a Google proto folder with .proto files inside the project
maybe these are required libraries but I'm not sure how they relate to the project.
The .proto
files are Protocol Buffer (aka. Protobuf) definition files, which are complied by the protocol buffer compiler (protoc
) into .java
files.
Once you do this you will have the "missing" .java
files.
See Java Generated Code for more information.
Building your project
You have two choices:
-
Use Gradle
- Download and install the Gradle build tool and use this to directly build your project, or
-
Use Eclipse together with Gradle Tooling
Download and install the Gradle tooling for Eclipse and use Eclipse to build your project:
Read Using the Gradle build system in the Eclipse IDE - Tutorial which explains how to install the Gradle tooling for Eclipse and also import an existing Gradle project into Eclipse.