When many problems are displayed in the Problems view, users can select [Configure Filters] from the upper-right menu of the view to customize the contents displayed.
The following filter functions are available:
Range specification
The display contents can be restricted to projects that include the selected resource, for example, by specifying [On any element in same project].
Severity specification
Users can specify whether to display errors, warnings, or information.
Problem type specification
The display contents can be restricted by specifying builder, validator, or other problem types.
Other
The display contents can be narrowed down by specifying containing or not containing specific coding.
Ant can be invoked during a build by coding an Ant script and setting it as follows:
Select [Builders] from the project properties.
Click [New], then select [Ant Builder] in the [Choose configuration type] dialog box.
In [Build file] under [Main], specify the Ant script file to be used.
If updating files that are in the Workspace with an Ant script, in the [Refresh] tab, specify the resources that should be updated after the Ant script has executed.
Under the [Targets] tab, the target can be set to suit the manual build, automatic build, or other build mechanism.
The properties required for Ant execution can be specified from the [Properties] tab.
Point
The Ant script can be debugged by selecting the Ant script, then selecting [Debug As] > [Ant Build] in the context menu.
When adding a JAR file that is not in the Workspace to a classpath, the environment-dependent part can be absorbed using either of the methods below. This improves project resource portability.
On the preference page, use [Java] > [Build Path] > [Classpath Variables] to associate and manage names and paths.
To add to the classpath, select project properties, then [Java Build Path], then the [Libraries] tab, then use the [Add Variable] button. In the displayed dialog box, select the classpath variable then, from the [Extend] button, select the resource from under the path that is associated with the classpath variable.
On the preference page, use [Java] > [Build Path] > [User Libraries] to associate and manage a name and multiple JAR files. This is useful when specifying a library group.
To add to the classpath of a specified library, select project properties, then [Java Build Path], then the [Libraries] tab, then use the [Add Library] button.
Performing Build using isstudiobld.exe
Use the isstudiobld.exe tool to build a project from the command line without launching the workbench. The isstudiobld.exe tool is in the following location:
<Workbench installation folder>\eclipse\isstudiobld.exe
The method of using the isstudiobld tool is described below.
Format: | |
isstudiobld -data <workspace> [options] [<target> [<target2>...]] Note: [] can be omitted.< > are used to specify the respective values. | |
Parameters: | |
-data <workspace> | Specify the workspace folder. |
<target> | Specify the target of the Ant being executed. |
Options: | |
-f <buildfile> | Specify the build file (Ant script). When this option is omitted, use the build file at the following address. <Installation folder>\IDE\1101\etc\build\buildAll.xml |
-verbose or -v | Displays details. |
-D<property>=<value> | Specify a property. |
-propertyfile <name> | Load from a file where properties are specified. |
-vm <JDK installation folder>\jre\bin | Specify a folder in which there is a JDK java.exe that executes the build file (Ant script). When this option is omitted, use the JDK specified in the environment variable PATH. |
Note
Use the eclipse.incrementalBuild ant task to build the project.
In the eclipse.incrementalBuild Ant task, build the project according to the [JavaCompiler] and [Java Build Path] information specified in the project.
In the Ant tasks except eclipse.incrementalBuild, use the JDK that -vm option specifies.
The method for using the eclipse.incrementalBuild Ant task is shown below.
Attributes | Description |
---|---|
kind | The build type. Specify either incremental, full, or clean. The default value is incremental. |
project | The project to be built. If omitted, a build of the Workspace is performed. |
Example: Perform a full build of the Workspace.
<eclipse.incrementalBuild kind="full" />
Example: Clean the project project1.
<eclipse.incrementalBuild project="project1" kind="clean" />
Temporary Disablement of Breakpoints
When many breakpoints are set, execution is interrupted at too many places and debug efficiency may deteriorate.
In this case, breakpoints can be disabled temporarily without releasing the breakpoints. When [Group By] > [<Grouping Method>] is selected from the upper-right menu of the Breakpoint view, the breakpoints are grouped and therefore can be disabled together as a group.
Alternatively, [Skip All Breakpoints] can be selected from the Breakpoint view toolbar to disable all breakpoints.
Users may want to interrupt program execution if an exception has occurred. If so, use an exception breakpoint. From the menu, use [Run] > [Add Java Exception Breakpoint] to specify an exception class. This sets a breakpoint that interrupts execution when that exception has occurred.
During debugging, when step-in execution is performed for a statement such as,
addValue(obj.getName(), obj.getValue());
step-in is performed in the following sequence when a simple step-in (F5) is executed:
Step-in to obj.getName()
Step-in to obj.getValue()
Step-in to addValue()
If you want to step-in only to addValue(), select "addValue" on the editor, then select [Step Into Selection] from the menu. This performs 3. immediately without performing 1. and 2.
In addition to checking the object contents, users may want to test method execution during debugging.
If so, enter the expression in the Display view or the details frame of the Variables view and select the expression, then select either [Display], [Inspect], or [Execute] from the context menu.
Specifying the Java Version Used for Build and Debugging
The JRE System Library specified in the project build path is used to determine the Java version used for build and debugging. You can specify the Java version by configuring the JRE System Library of the project.
Specify the Java version with the JRE System Library as follows:
Default JRE of the workspace
Use the default JRE of the workspace. The default JRE of the workspace is the installed JRE that is checked in [Java] > [Installed JREs] page in the Preferences dialog box that appears when [Window] > [Preferences] is selected from the menu bar. If the default JRE of the workspace is changed, the JRE System Library used in each project is also changed.
Alternate JRE
Use the Alternate JRE to specify the Java version for a project. Select one of the installed JREs as that for the Java version used for build and debugging.
To configure the JRE System Library of a project, follow the procedure below.
Select a project from the Package Explorer view or the other views.
Select [Properties] from the context menu, or select [File] > [Properties] from the menu bar. The [Properties] dialog box appears.
Select [Java Build Path] in the left pane. The [Java Build Path] page is displayed.
Select the [Libraries] tab.
Select [JRE System Library] from the [JARs and class folders on the build path] list, and click [Edit]. The [Edit Library] dialog box appears.
Select [Workspace default JRE] or [Alternate JRE] from the System Libraries. If [Alternate JRE] is selected, select the Installed JRE to be used from the combo box.
To add JDK to the installed JRE, follow the procedure below:
From the workbench menu, select [Window] > [Preferences].
In the [Preferences] dialog box on the left pane, select [Java] > [Installed JREs].
In the right [Installed JREs] window, click [Add].
In the [JRE Type] window, select "Standard VM", then click [Next].
In [JRE home] of the [JRE Definition] window, specify the JDK installation folder. A name in accordance with the folder name selected in [JRE name] is displayed, and a list of JAR files for the JDK library specified in [JRE system libraries] is displayed. Click [Finish] to close the window.
Note
Though [Execution Environment] is included as a System Library option, you cannot use it in Interstage Studio.
Do not set a compiler compliance level that is higher than that of the Java version specified in the JRE System Library used.
Point
In Java compilation, you can specify Compiler compliance level, such as class files compatibility and Source compatibility, etc. You can specify compiler compliance level on the [Java Compiler] page of the project properties or on the [Java] > [Compiler] page of the workspace preferences.
The Stack Trace View can be used to read FJVM logs or thread dumps collected by the thread dump tool and to produce a hierarchical display of the list of registered threads and stack traces.
Use the following procedure to display the Stack Trace View:
Select [Window] > [Show View] > [Other] from the menu bar.
Select [Java] > [Stack Trace] in [Show View] dialog box.
See
For details on FJVM logs, refer to the "Interstage Application Server Tuning Guide" > "JDK/JRE Tuning".
Note
The Stack Trace View cannot be used in the Java EE 6 workbench.
The thread dump files that can be displayed by the Stack Trace View are those that were output with the thread dump tool "-f" option specified (thread dump output destination specified). Standard output thread dump files and thread dumps registered in application server log files cannot be displayed.
The Stack Trace View has the following functions:
Open FJVM Log/Thread Dump
Opens a FJVM log file or thread dump file and displays its data in the view. The contents of the opened file are also displayed in the Console view.
Close File
Closes the file currently displayed in the view.
Display Selected File
Used to select the file to be displayed when multiple files are open.
Display Console
Displays the contents of the file currently displayed in the Stack Trace view, in the Console view.
Sort
Displays threads after sorting them. Clicking this button toggles between on and off for sorting. Sorting is off by default.
If sorting is on, threads other than system threads are displayed first in ascending order of thread names, and system threads are then displayed in ascending order of thread names. If sorting is off, threads are displayed in the order that they were recorded in the file.
Show System Threads
Displays system threads. Selecting this command item toggles between showing system threads and hiding system threads.
Show Qualified Names
Displays qualified names (package names) together with the class names displayed for stack trace and monitor elements.
Show Monitors
Displays monitors. If some threads and monitors in the thread dump are in the deadlock state, the entries for them are highlighted and the icons for them are also changed to indicate the deadlock.
Selecting this command item toggles between turning on and turning off monitors.
Set Encoding
Specifies the type of encoding used when an FJVM log or thread dump file is loaded. The default is UTF-8. Use this command only if the file to be loaded is encoded in a format other than UTF-8.
If a thread dump contains monitor information and [Show Monitors] is turned on, the following elements are displayed.
Element | Icon | Description | |
---|---|---|---|
Monitor owned by the thread | Displayed as a child of the thread. It represents a monitor owned by the thread. The class name and ID of the object acting as the monitor are displayed to the right of the icon. If the thread owns multiple monitors, as many instances of this element as the number of these monitors are displayed. | ||
Thread that is waiting for the monitor | Displayed as a child of a monitor owned by the thread. It represents a thread that is waiting for the monitor. The thread name and information indicating whether the thread is a system thread are displayed to the right of the icon. If multiple threads are waiting for the monitor, as many instances of this element as the number of these threads are displayed. | ||
Monitor for which the thread is waiting | Displayed as a child of the thread. It represents a monitor for which the thread is waiting. The class name and ID of the object acting as the monitor are displayed to the right of the icon. | ||
Thread that owns the monitor | Displayed as a child of a monitor for which the thread is waiting. It represents a thread that owns the monitor. The thread name and information indicating whether the thread is a system thread are displayed to the right of the icon. | ||
Monitor locked | Displayed between stack trace entries to identify the process where a monitor became locked. The class name and ID of the object acting as the monitor are displayed to the right of the icon. |