Build

For languages such as C, C++, and JAVA, you must write a code and build it to get an executable file.

If you want add a build command

Open the project and click the Build icon > Add build command in the top toolbar. Alternatively, go to [Project] > [Build] > [Add build command]

To add a default build command for a language/package, right-click the [Build] item in the [Command] tab.

Default build commands include C, C++, Java, Maven, Go, .Net, C#, Swift, and Arduino (UNO, NAND).

Execution of a build command

Launch a build command by clicking the Build icon on the toolbar to execute the most recent build command, or click [Project] > [Build] Menu.

You can also build a specific file(extension, file name). Right-click the file in the Project tab on the left side. Then click [Build] > [Build Selected File].

Right-clicking a file in the Project tab on left layout

'Build selected file' is only available if the file is one of the following extensions.

  • *.c, *.cpp, *.cxx

  • *.cs

  • *.go

  • *.java

  • *.jsp

  • pom.xml

  • *.swift

If you want to run other files, use the default shell method like this: $<File Path>.

When you start a build, a tab for the build command name appears at the bottom. This tab is a build-only terminal that displays the results of a build command action. Clear the build performance history with the clear button.

a tab for the build command

Toggle Build Automatically

This feature is currently only supported in Spring-Maven projects.

When saving a file, it automatically builds and copies the file and stores it inside the target folder.

Supported files are as follows.

  • *.java

  • *.js

  • *.jsp

  • *.html

  • *.css

First, check [Project]>[Build Automatically Toggle] to change to Active state.

And when I save the file, For the *.java file, it is compiled into the ${deploy_path}/WEB-INF/classes folder.

  • The ${deploy_path} can be found in [Projects]>[Properties]>[Build/Run Settings]

*.js *.jsp *.html *.css file is copied in proportion to the path of the saved file. The coplied path is locate at the bottom of the path ${deploy_path}

  • By default, only files in the src/main/webapppath are applied.

  • With maven-war-plugin, it follows only the path set in warSourceDirectory.

Examples

  • If you saved src/main/webapp/index.jsp, it will be copied to ${deploy_path}/webapp/index.jsp.

  • When warSourceDirectory is set to myweb using maven-war-plugin

  • if you savedsrc/main/myweb/index.jsp, It will be copied to ${deploy_path}/myweb/index.jsp