Using compile and make from Together

When developing with Together you can compile classes and make your project without leaving the Together environment. There are several options:

You configure compile and make tools using the Default Options dialog (Options | Default | Tools - Compile) or Project Options dialog (Options | Project -Tools-Compile). For information on multiple configuration levels, see User's Guide: Configuring Together: Multi-level configuration.

Using the default Java compiler (SDK)

On Windows platforms, Together installs and uses javac.exe from Java 2(tm) SDK version 1.3 as the default compiler.* This compiler is located in $TGH$/jdk/bin.

For other operating systems, you need to obtain the recommended Java 2 SDK for your platform, install it, and make sure it is included in your environment's search path. Field "JDK Home" in the Options Dialog points by default to $TGH$/jdk.If JDK is not a psrt of installation, actual JDK location should be specified in this field. Otherwise, compile, make and run will not work.

Executing the compiler and make tools

The default Java compiler/maker can be executed from :

Compiler and maker are pre-configured to redirect their output to Messages tab of the Message Pane. In case of errors/warnings during compiling/making you can simply click to the appropriate line inside Message Pane and navigate directly to the line of source code which caused the error/warning. The Message Pane also displays executed commands and status of tools' execution.

Configuring the compiler/make utilities

Generally, default compiler is already configured, so it's ready to work. However, if you need to reconfigure it, this can be done from Together Options Dialog (use Options | Default... menu command to display it) or Project Options Dialog (Options | Project menu command).

Using another Java compiler

You can use another Java compiler/make tools instead of default ones. In this case you need to configure these tools using Options Dialog. 

Configuring another compiler or make utility

Configuring can be done from Together Options Dialog (use Options | Default... menu command to display it) or Project Options Dialog (Options | Project... menu command). After opening the dialog choose "Tools" page. There you can see the settings for Compiler and Make.

Expand "Compiler" sub-tree to configure compiler or "Make" to configure make tool. You can configure command for the executed tool, command line parameters, compiler/make output, menu settings - where configured tools should be displayed or not, etc.

Notes:

Tip: For proper setup use on-fly help displayed in "Description" window of Options Dialog.

Executing other compiler or make utility

If you replaced default compiler and make commands with your own, you can run them the same way as default tools:

In this case, when configuring the tools, you have to specify appropriate menu command names and where these commands should be displayed. So you should already know how to execute compile and make utilities.

Tool Commands for popular compilers

Together comes with a pre-defined external tool definition for a Java compiler. The tool definition is pre-configured in the Tools page of the Default Options dialog for the Symantec sj compiler:

Using a C++ compiler

Together doesn't have any default C++ compiler, so you have to set up your own one. The procedure is very similar to Configuring other Java compiler/make utilities.

Configuring C++ compile/make utilities

Configuring can be done from Together Options Dialog (use Options | Default... menu command to display it) or Project Options Dialog (Options | Project... menu command). After opening the dialog choose "Tools" page. There you can see the settings for Compiler and Make.

Expand "Compiler" sub-tree to configure compiler or "Make" to configure make tool. You can configure command for the executed tool, command line parameters, compiler/make output, menu settings - where configured tools should be displayed or not, etc.

Tips:

Executing C++ compile/make utilities

When configuring the tools, you have to specify appropriate menu command names and where these commands should be displayed. So you should already know how to execute compile and make utilities.

Compiler output

Compiler errors/warnings are presented in a navigable overview of the entire list of errors/warnings, thus reducing the compiler's default output. You can then expand the overview list to get the detail.

For example, if the compiler returns an error , use the right-click menu in the Builder's output pane and choose "Full Output" to see exact location of the error. You can reverse the display selecting "Reduced output" on the Builder's speedmenu.

See also:

Using the Integrated Debugger
Using the Editor
Guide to the Options pages: Tools page

*(Current version as of this writing. For up to date information on supported/shipping JDK see system requirements posted at www.togethersoft.com.)