Java development tools (JDT) - release notes

1.0 Introduction
2.0 Known problems and limitations
    2.1 Running Java programs with non-Latin-1 characters in package or class names
    2.2 Missing debug attributes
    2.3 Setting breakpoints
    2.4 Using Hot code replace
    2.5 Scrapbook
    2.6 Debugging over slow connections
    2.7 Updating of inspected values
    2.8 Stepping over native methods that perform I/O
    2.9 Searching for constant field references
    2.10 Java compilation units outside of the build class path
    2.11 VM and process termination running on IBM 1.3 JVM on Linux 
    2.12 Actions to modify read-only files
    2.13 Java code templates
    2.14 Organize import and imports from default packages
    2.15 Add Javadoc action for fields
    2.16 Javadoc hover in the Java editor
    2.17 HTML code > displayed in new Java class instead of >
    2.18 Cannot run or debug class in a project with GB18030 characters in project name
    2.19 Unable to debug stack overflows
    2.20 Evaluation limitation   
    2.21 Breakpoints outside of the build class path   
    2.22 Quick fix and imports from default packages   
    2.23 Cut, copy, paste not working for linked resources in views showing Java elements
    2.24 Java working sets not working correctly for elements from JRE system library container   
    2.25 Cannot generate Javadoc for packages with GB18030 characters in the name
    2.26 Linked editing does not work correctly in overwrite mode
    2.27 Catch block code generation template must end with newline if last line is line comment
    2.28 Problem opening class file editor

1.0 Introduction

This contains information on known problems and limitations with Java development tools.

2.0 Known problems and limitations

2.1 Running Java programs with non-Latin-1 characters in package or class names

You may get a java.lang.NoClassDefFoundError when running Java programs with non-Latin characters in the package or class names. To work around this, package the class files as a JAR file and run the program out of the JAR, instead of directly from the the file system. 

2.2 Missing debug attributes

The debugger requires that class files be compiled with debug attributes in order to be able to display line numbers and local variables. Quite often, class libraries (for example, rt.jar) are compiled without complete debug attributes, and thus local variables and method arguments for those classes are not visible in the debugger.

2.3 Setting breakpoints

In general, the debugger will not allow you to place breakpoints on lines of code that are not executable (comments, blank lines, and so on). However, there are some cases where the debugger will allow breakpoints on lines of code that are not executable. For example, the debugger will allow a breakpoint to be placed on a variable declaration that does not contain an initializer. Note that enabled breakpoints which are successfully installed on an executable line in a running (debuggable) VM are displayed with a checkmark. Breakpoints that are displayed without a checkmark are not installed in a running (debuggable) VM.

2.4 Using Hot code replace

Hot code replace is supported on JDK 1.4.x VMs, and IBMR J9 VMs. Hot code replace is limited to changes which do not effect the shape of a class. That is, changes within existing methods are supported, but the addition or removal of members is not supported.

Hot code replace and stepping on JDK 1.4.0 VMs is unreliable. 

2.5 Scrapbook

Setting a breakpoint inside a scrapbook page is not supported.

When code is run in the scrapbook which directly or indirectly calls System.exit(int), the evaluation cannot be completed, and will result in a stack trace for a com.sun.jdi.VMDisconnectedException being displayed in the scrapbook editor.

Terminating a scrapbook page while it is performing an evaluation results in a com.sun.jdi.VMDisconnectedException being displayed in the scrapbook editor.

2.6 Debugging over slow connections

A global Java debug preference specifies the debugger timeout, which is the maximum amount of time the debugger waits for a response from the target VM after making a request of that VM. Slow connections may require that this value be increased. The timeout value can be edited from the Java > Debug preference page. Changing the timeout value only effects subsequently launched VM, not VMs that are already running.

2.7 Updating of inspected values

When inspecting the result of an evaluated expression in the debugger, it is important to note that the result displayed is the result of that expression at the time it was evaluated. For example, when inspecting a simple integer counter (primitive data type), the value displayed in the Expressions view is the value when the expression was evaluated. As the counter is changed in the running program, the inspected result will not change (since the view is not displaying the value bound to a variable - it is displaying the value of an expression, and the value of a primitive data type cannot change). However, if an expression results in an object, fields of that object will be updated in the inspector as they change in the running program (since the value bound to fields in an object can change).

2.8 Stepping over native methods that perform I/O

When the debugger steps over native methods that perform I/O to System.out or System.err, the output may not appear immediately unless the native performs a flush on the output buffer.

2.9 Searching for constant field references

Search does not find references to constant fields inside binaries because the Java Language Specification mandates that constant field values be inlined in the class file's bytecodes, leaving no trace of a field reference

2.10 Java compilation units outside of the build class path

When a compilation unit with compilation problems is moved outside the Java build class path, it retains its Java problems forever (its compilation problem list does not get refreshed because it will never be compiled again). Renaming a *.java file to one with another a different file extension suffix causes the same problem. 

2.11 VM and process termination running on IBM 1.3 JVM on Linux 

Terminating a launch, debug target, or system process associated with a debug target running on the IBM 1.3 JVM on the Linux platform does not work when the associated debug target has a suspended thread. To remove such debug targets from the debug UI, select Terminate and Remove from the debug view's pop-up menu (or use the shortcut "delete" key). Associated system processes in the OS may not be properly cleaned up. If a debug target has no suspended threads, termination works properly.

2.12 Actions to modify read-only files

Actions on the Source menu (e.g., Generate Getter and Setter) are always disabled when the file is read-only. This is currently true even when the repository provider supports automatically checking out files on modification.

2.13 Java code templates

You cannot use ${CURSOR} inside of a comment in a Java code template (Window > Preferences > Java > Templates). 

2.14 Organize import and imports from default packages

Organize import does not handle imports from default packages. Note that importing from a default package is no longer supported in JDK 1.4. 

2.15 Add Javadoc action for fields

The Add Javadoc action does not work for fields.

2.16 Javadoc hover in the Java editor

The Javadoc hover help shown when hovering over identifiers in the Java editor does not handle links inside of Javadoc comments properly. 

2.17 HTML code > displayed in new Java class instead of >

When you create a new Java class, the generated comments reads:

To change the template for this generated file go to Windows > Preferences > Java > Code Generation > Code and Comments.

The HTML code for greater than (>) sign is being used instead of the sign itself. The comment should read:

To change the template for this generated file go to Windows > Preferences > Java > Code Generation > Code and Comments.

2.18 Cannot run or debug class in a project with GB18030 characters in project name

Most class libraries do not properly support the creation of a system process (via java.lang.Runtime.exec(...)) when the specified command line contains GB18030 characters. This limitation means the debugger cannot launch applications when the command line it generates contains GB18030 characters.

2.19 Unable to debug stack overflows

If a debug session suspends on a java.lang.StackOverflowError exception (due to an exception breakpoint), the debugger may not be able to retrieve any debug information from the target JVM. As well, the debugger may not be able to reliably interact with the target JVM past this point.

2.20 Evaluation limitation

The debugger uses threads in the target JVM to perform evaluations (both explicit evaluations that the user requests, and implicit evaluations such as toString() invocations in the Variables view). The Java Debug Interface (JDI) requires that the thread in which an evaluation is performed be suspended by a user event (that is, a breakpoint or step request). Evaluations cannot be performed on threads suspended by the suspend action. As well, when a breakpoint is configured to suspend the JVM rather than just the individual thread, the threads which did not encounter the breakpoint are not in a valid state to perform an evaluation. When an evaluation is attempted in a thread that is not in a valid state to perform an evaluation, an error message will appear to the effect of "Thread must be suspended by step or breakpoint to perform method invocation".

2.21 Breakpoints outside of the build class path

Breakpoints can only be created on Java elements that are contained on the build class path of a project. The Java debugger automatically deletes breakpoints if their associated Java element is removed from the build path of a project. However, if the Java debug plug-in is not loaded when a build path is changed, such breakpoints will remain in the workspace, and can cause errors when the user attempts to go to the file associated with the breakpoint, from the Breakpoints view.

2.22 Quick fix and imports from default packages

Quick fix does not handle imports from default packages. Note that importing from a default package is no longer supported in JDK 1.4.

2.23 Cut, copy, paste not working for linked resources in views showing Java elements

The cut, copy, and paste actions do not work for linked files and folders appearing in views that show Java elements, including the Package Explorer. The workaround is to use these actions from the Navigator view instead.

2.24 Java working sets not working correctly for elements from JRE system library container

Appling a working set consisting entirely of elements from the JRE System library container as a filter to the packages view might result in an empty Package Explorer.

2.25 Cannot generate Javadoc for packages with GB18030 characters in the name

Most class libraries do not properly support the creation of a system process (via java.lang.Runtime.exec(...)) when the specified command line contains GB18030 characters. Since Javadoc is created using the Javadoc executable provided with the JDK, generating Javadoc fails if the package or class name contains GB18030 characters.

2.26 Linked editing does not work correctly in overwrite mode

Linked editing is used for renaming elements within a single compilation unit and for templates with multiple occurrences of the same template variable. Linked editing does not work correctly in overwrite mode.

2.27 Catch block code generation template must end with newline if last line is line comment

If the last line of the catch block code generation template is a line comment then the line must be terminated with a newline. Otherwise the closing curly bracket ends up on the comment line, resulting in a compilation error.

2.28 Problem opening class file editor

If the "Use classpath containers" preference has been enabled on the Plug-in Development > Java Build Path Control preference page, you may not be able to open a class file editor for a class file contained in a JAR in the "Required plug-in entries" container. One way to work around the problem is to expand the class file in the Packages Explorer; this displays the class file's structure just as the editor would. If a source code zip is available for the JAR, another option is to attach source to the JAR file.

To attach source to a JAR in the "Required plug-in entries" container, follow these steps:

  1. In the Package Explorer, select the project and open Project > Properties from the context menu
  2. Select the Java Build Path page
  3. Go to the Libraries page
  4. Expand the "Required plug-in entries" item
  5. Expand the item for the JAR
  6. Select Source Attachment and click Edit.
  7. Enter the location of the corresponding source zip.
  8. Click OK to acknowledge.

Return to the main readme file

>