- JDK 1.8 (JDK 1.9+ are not supported yet)
- On Linux Ubuntu system (e.g. Ubuntu 16.04.4 LTS), ensure that the machine has Oracle JDK 8, instead of having Open JDK 8 in the system. If you are building the source code by using Open JDK 8, you will get Build Failed result.
- Open UDP ports for connection to the network
- Minimum 2 CPU Cores
- Please take a look at the Tron Deployment Scripts repository.
-
Use Git from the console, see the Setting up Git and Fork a Repo articles.
-
develop
branch: the newest code -
master
branch: more stable than develop. In the shell command, type:git clone https://github.com/tronprotocol/java-tron.git git checkout -t origin/master
-
For Mac, you can also install GitHub for Mac then fork and clone our repository.
-
If you'd rather not use Git, Download the ZIP
If you don't want to checkout the code and build the project, you can include it directly as a dependency.
Using gradle:
repositories {
maven { url 'https://jitpack.io' }
}
dependencies {
implementation 'com.github.tronprotocol:java-tron:develop-SNAPSHOT'
}
Using maven:
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependency>
<groupId>com.github.tronprotocol</groupId>
<artifactId>java-tron</artifactId>
<version>develop-SNAPSHOT</version>
<!--You can use any of the tag/branch name available-->
</dependency>
-
Building using the console:
cd java-tron ./gradlew build
-
Building using IntelliJ IDEA (community version is enough):
Please run
./gradlew build
once to build the protocol files- Start IntelliJ.
SelectFile
->Open
, then locate to the java-tron folder which you have git cloned to your local drive. Then clickOpen
button on the right bottom. - Check on
Use auto-import
on theImport Project from Gradle
dialog. Select JDK 1.8 in theGradle JVM
option. Then clickOK
. - IntelliJ will import the project and start gradle syncing, which will take several minutes, depending on your network connection and your IntelliJ configuration
- Enable Annotations,
Preferences
-> Searchannotations
-> checkEnable Annotation Processing
. - When the syncing finishes, select
Gradle
->Tasks
->build
, and then double clickbuild
option.
- Start IntelliJ.