--- title: SBIR WRB (07-23-2021) tags: sbir-star robots: noindex, nofollow --- <!-- 研究主題類別: 市場調查、通訊模組、無線技術 --> IntelliJ IDEA 編譯環境 (07-23-2021) === [toc] :::info 首次編譯TB,不建議直接使用IDEA進行操作,它會自動下載很多相關及不相關套件,不易控制。 先透過command line編譯成功後,再導入IDEA進行二次開發工作。 ::: :::info * Before importing the project into the IDE please build it using Maven tool from the root folder * Any modern Java IDE, although TB recommend IntelliJ IDEA ::: [toc] Windows 10 Environment --- ### Install JDK 11 * Download zipped package [here](https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.11%2B9/OpenJDK11U-jdk_x64_windows_hotspot_11.0.11_9.zip) * Unzip JDK 11 as below ``` C:\Program Files\Java\jdk-11.0.11+9\bin ``` * Set up Path > Windows key > Edit the system environment variables > Environment variables ``` User variables for User > New Variable name: JAVA_HOME Variable value: C:\Program Files\Java\jdk-11.0.11+9 Click Path in System Variables > Edit New C:\Program Files\Java\jdk-11.0.11+9\bin ``` > close all existing CMD window(s) before version check ![](https://i.imgur.com/ITFOTro.png) ### Install Maven 3.6.3 * Download zipped package [here](https://downloads.apache.org/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.zip) * Unzip Maven as below ``` C:\Program Files\apache-maven-3.6.3\bin ``` * Set up Path > Windows key > Edit the system environment variables > Environment variables ``` User variables for User > New Variable name: MAVEN_HOME Variable value: C:\Program Files\apache-maven-3.6.3 Click Path in System Variables > Edit New C:\Program Files\apache-maven-3.6.3\bin ``` > close all existing CMD window(s) before version check ![](https://i.imgur.com/wLdO8n5.png) ### Build from source > Recommended Windows tool: [Git for Windows](https://gitforwindows.org/) ``` git clone https://github.com/thingsboard/thingsboard.git cd thingsboard/ git checkout release-3.2 ``` > Build ``` mvn clean install -DskipTests ``` ![](https://i.imgur.com/s5tTKR8.png) > **IF** Failure to find org.gradle:**gradle-tooling-api:jar:6.3** ![](https://i.imgur.com/MkP7fNj.png) ``` Download gradle-tooling-api-6.3.jar to your local directory https://repo.gradle.org/gradle/libs-releases-local/org/gradle/gradle-tooling-api/6.3/gradle-tooling-api-6.3.jar ###Windows CMD mvn install:install-file -Dfile="C:\Users\User\Documents\workspace\gradle-tooling-api-6.3.jar" -DgroupId=org.gradle -DartifactId=gradle-tooling-api -Dversion=6.3 -Dpackaging=jar ###Git Bash(MINGW64) mvn install:install-file -Dfile=/c/Users/User/Documents/workspace/gradle-tooling-api-6.3.jar -DgroupId=org.gradle -DartifactId=gradle-tooling-api -Dversion=6.3 -Dpackaging=jar ``` --- ***見證人** ---