[vtkusers] vtkPanel and JAVA 1.4

jason_donmoyer at chiinc.com jason_donmoyer at chiinc.com
Tue Apr 16 09:46:06 EDT 2002


The class vtkPanel distributed with the vtk examples will not compile using
J2SDK 1.4.  The following excerpt from the release notes explains why:

------

The compiler now rejects import statements that import a type from the
unnamed namespace. Previous versions of the compiler would accept such
import declarations, even though they were arguably not allowed by the
language (because the type name appearing in the import clause is not in
scope). The specification is being clarified to state clearly that you
cannot have a simple name in an import statement, nor can you import from
the unnamed namespace. 
To summarize, the syntax 

import SimpleName;

is no longer legal. Nor is the syntax 
import ClassInUnnamedNamespace.Nested;

which would import a nested class from the unnamed namespace. To fix such
problems in your code, move all of the classes from the unnamed namespace
into a named namespace. 

-----------


You can temporarily get around this problem by compiling vtkPanel with an
older version of the JDK while continuing to use J2SDK 1.4 for the rest of
your classes.  Steps should be taken to fix this problem so that it complies
with the latest version of the JDK.  This is important so that users of vtk
can take advantage of the performance benefits of 1.4 without resorting to
recreating the JNI calls.

Thank you,

Jason Donmoyer



More information about the vtkusers mailing list