RE(4): NoClassDefFoundError (no Java 3D)

 
[Project:VV8770]
Hi Curtis, 

sorry it's taken me a while to respond to your tips.  
Thanks for the time you spent to answer my questions though.

Let me say up here, before I forget, that I am actually running Win NT.

> -----Original Message-----
> From: Curtis Rueden [mailto:curtis@xxxxxxxxxxxxx]
> Sent: Tuesday, 12 June 2001 11:30 PM
> To: David Verrelli
> Cc: visad-list@xxxxxxxxxxxxx
> Subject: RE(3): NoClassDefFoundError (no good news)
> 
> 
> Hi David,
> 
> I've addressed some of your questions below.  I hope my 
> suggestions are
> helpful.
> 
> >I am wondering whether I need to separately point my path to 
> each of the
> >Java2d AND Java3d jar files or directories?  Or which, if only one.
> 
> You should not need to set your CLASSPATH to point to your Java3D jar
> files explicitly.  You should not need to alter your PATH at 
> all, except
> perhaps to include your JDK 1.3 directory so that commands 
> like "javac"
> and "appletviewer" work properly.

I have been looking around the web as well, and one source said that it's
good to delete the java.exe and javac.exe files that are copied into the
system directory, because in that location (assuming the path statement
directs there first) they won't find vecmath.jar and so on (though
apparently this is fixed after version 1.2.2).

Actually, I think I may have copied some *.dll and *.jar files into the
system/profiles directory (from an older java version) to try to minimise
path problems, but perhaps this is adding to a different problem.
 
> >I am still not able to get anything to run except for running "java
> >visad.ss.SpreadSheet" (works from any directory, better with "-mx256m
> >-no3d").
> 
> If "java visad.ss.SpreadSheet" is working, then your 
> CLASSPATH is at least
> partially correct (you have either visad.jar or the parent 
> directory of your
> VisAD directory included), which is good.  If you are having 
> trouble with the
> examples in visad\examples, then you need to add "." to your 
> CLASSPATH as
> well.

Perhaps another problem may be used by my use of case:
"classpath" and "CLASSPATH" seem to be treated (at least partially) as
different variables, and I was not so consistent :-p

So there may be some problem with the intial assignment. However, when I
change that 'on the fly' from the DOS prompt it doesn't seem to solve any
problem.
 
> >Incidentally, I noticed that the "HelloUniverse" example 
> _does_ also come
> >with visad [though I forwarded you the one I downloaded from 
> Sun, if there's
> >any difference.]
> 
> As far as I know, VisAD does not include any files named
> "HelloUniverse.java".  I believe it does come with Java3D though.

Yes, I think I must have copied it to under my visad directory to have the
files all together :-)

Now, I still cannot get it to run:
JAVA:
--------------------
C:\jdk1.3.1\demo\java3d\HelloUniverse>java HelloUniverse.class
Exception in thread "main" java.lang.NoClassDefFoundError:
HelloUniverse/class

C:\jdk1.3.1\demo\java3d\HelloUniverse>java HelloUniverse.java
Exception in thread "main" java.lang.NoClassDefFoundError:
HelloUniverse/java
--------------------

and nothing happens, whereas I get scrolling errors (like for J3d VisAD)
from the following:
--------------------
C:\jdk1.3.1\demo\java3d\HelloUniverse>java HelloUniverse
.
.
.
wglCreateContext Failed: The operation completed successfully.

extensionStr == null
wglCreateContext Failed: The operation completed successfully.

extensionStr == null

C:\jdk1.3.1\demo\java3d\HelloUniverse>
--------------------

which scrolls until the (blank) window that opens is closed.

APPLETVIEWER:
--------------------
C:\jdk1.3.1\demo\java3d\HelloUniverse>set CLASSPATH
CLASSPATH=c:\visad.jar;.

C:\jdk1.3.1\demo\java3d\HelloUniverse>appletviewer -J HelloUniverse.class
Can't find class

C:\jdk1.3.1\demo\java3d\HelloUniverse>appletviewer -J HelloUniverse
Can't find class

C:\jdk1.3.1\demo\java3d\HelloUniverse>appletviewer -J HelloUniverse.java
Can't find class

C:\jdk1.3.1\demo\java3d\HelloUniverse>
--------------------
Nothing runs.

 
> >Speaking of downloads from Sun, the program "appletviewer" 
> wasn't included
> >in any of the three java versions I downloaded:
> >j2re-1_3_0_02-win.exe
> 
> This is the JRE version of Java 1.3.  To get appletviewer, you have to
> install the JDK version.  You can find it at:
>     http://java.sun.com/j2se/1.3/download-windows.html

I have now downloaded and installed:
j2sdk-1_3_1-win.exe

> >java3d1_1_2-win32-opengl-sdk.exe
> >java3d-1_2_1_01-win32-opengl-rt.exe.  [I downloaded
> >java3d-1_2_1_01-win32-opengl-sdk.exe just now, but it's not 
> there either.] 
> 
> As far as Java3D goes, the file you want is the second on your list:
>     java3d-1_2_1_01-win32-opengl-rt.exe
> If you install Java3D into the same folder that you installed 
> JDK 1.3, then
> Java3D will work without any modifications to your CLASSPATH.

Actually I think my last install was of
"java3d-1_2_1_01-win32-opengl-sdk.exe" - surely I don't also/instead need to
install the J2 runtime environment separately?

> >C:\APPS\david\visad\visad\examples>appletviewer SimpleImage
> >I/O exception while reading: 
> \C:\APPS\david\visad\visad\examples\SimpleImage
> >Make sure that SimpleImage is a file and is readable.
> 
> The appletviewer requires a *.html file argument.  None of 
> the VisAD examples
> will work with appletviewer without modification.  To run 
> SimpleImage, try:
>     java SimpleImage
> from your visad\examples directory.  If you can't get Java3D 
> working, you can
> still test whether your VisAD installation is working with:
>     java DisplayTest 38
> from your visad\examples directory.
> 
> >I tried running the HelloUniverse application that 
> apparently came with
> >visad, with no success:
> 
> Try reinstalling JDK 1.3 and Java3D 1.2.1.  If you still have 
> trouble, try
> the DirectX version of Java3D (assuming you are not running 
> Windows NT).
> 
> >C:\jdk1.2.1\visad>nmake -f MakeFile.WinNT compile
> >.
> >.
> >.
> >.
> >tor.
> >          sub_types.add( fieldRange );
> >                       ^
> >FieldImpl.java:1045: Method add(visad.Data) not found in class
> >java.util.Vector.
> >
> >... [additional errors snipped]
> 
> These errors appear to indicate that you are attempting to 
> compile VisAD
> with JDK 1.1.  VisAD requires Java v1.2 or higher.

According to your FAQ
(http://www.ssec.wisc.edu/~curtis/visad-faq.html#winnt) I ran:

c:\apps\david\nmake\nmake -f Makefile.WinNT compile

------------------------------------------------------------------------
. It must be assigned a value in an initializer, or in every constructor.
    public OffsetUnit(double offset)
           ^
OffsetUnit.java:138: Blank final variable 'scaledUnit' may not have been
initial
ized. It must be assigned a value in an initializer, or in every
constructor.
    public OffsetUnit(double offset, BaseUnit that)
           ^
OffsetUnit.java:138: Blank final variable 'offset' may not have been
initialized
. It must be assigned a value in an initializer, or in every constructor.
    public OffsetUnit(double offset, BaseUnit that)
           ^
OffsetUnit.java:166: Blank final variable 'scaledUnit' may not have been
initial
ized. It must be assigned a value in an initializer, or in every
constructor.
    public OffsetUnit(double offset, DerivedUnit that)
           ^
OffsetUnit.java:166: Blank final variable 'offset' may not have been
initialized
. It must be assigned a value in an initializer, or in every constructor.
    public OffsetUnit(double offset, DerivedUnit that)
           ^
Too many errors.  (The limit on reported errors is 100.)
104 errors
NMAKE : fatal error U1077: 'C:\WINNT\system32\cmd.exe' : return code '0x1'
Stop.

C:\jdk1.2.1\visad>
------------------------------------------------------------------------

(with the preceding errors having been scrolled by - unfortunately I don't
know enough to be able to distinguish between error messages that might be
helpful to you, and those which would not - as none of them help me much!)

Now, I don't want you to get confused, so let me state that although I
'unjarred' the visad *.java files to jdk1.2.1, the java that I (think) I am
actually running at the moment is updated to the SDK 1.3.1, and OpenGL
Java3D 1.2.1 SDK is also 'supposed' to be installed (it is certainly
downloaded).

------------------------------------------------------------------------
C:\jdk1.2.1\visad>java -version
java version "1.3.0_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0_02)
Java HotSpot(TM) Client VM (build 1.3.0_02, mixed mode)
------------------------------------------------------------------------


If you need to know what version of nmake I am running:

------------------------------------------------------------------------
C:\jdk1.2.1\visad>c:\apps\david\nmake\nmake -p

Microsoft (R) Program Maintenance Utility   Version 1.50
Copyright (c) Microsoft Corp 1988-94. All rights reserved.

makefile(67) : fatal error U1001: syntax error : illegal character '{' in
macro
Stop.
------------------------------------------------------------------------


> >P.S. Oh, and by the way, I can't get HelloUniverse to run in Internet
> >Explorer (V5.00.2314.1003CO) either [error is "can't be 
> instantiated],
> >though it doesn't surprise me, as I don't think the plug-in 
> is installed. 
[progress of sorts, as this is a different error to what I'm getting now
(see below).]
 
> Don't even try to get a Java3D applet working in a web 
> browser unless you
> really know what you are doing. :-)  It is quite tricky.

Trying to run (J3d) HelloUniverse in IE yields a (blank) grey square, with
the message 
"exception: java.lang.ClassNotFoundException: javax.media.j3d.Canvas3D" in
the status line when the mouse hovers over the box.

In case you think this rather proves your point, I was surprised to discover
that many J2D applications _do_ work, such as
"C:\jdk1.3.1\demo\applets\JumpingBox\example1.html"

However, I can't seem to run it using either java.exe or appletviewer.exe
from the DOS prompt!

If you thought this was wierd, then how about this:
What is apparently another J2D example,
"C:\jdk1.3.1\demo\jfc\Font2DTest\Font2DTest.html" does not work when I open
it.  Similarly to HelloUniverse, in the status line appears the message:
"exception: java.lang.ClassNotFoundException: java.awt.GraphicsEnvironment"
However in this case there is a jar file rather than a class file.
So running "C:\jdk1.3.1\demo\jfc\Font2DTest>java -jar Font2DTest.jar" does
work.
However I cannot do anything with the *.java source file that is tucked in a
sub-directory:  neither run it, nor compile it (various errors). 

One more error ('for the road'):
"C:\jdk1.3.1\demo\jfc\Java2D\Java2Demo.html"  brings up the error message:
"load: class Java2DemoApplet not found"

> >P.P.S. Is another possibility security controls 
> (firewall/antivirus/etc.)
> >stopping stuff?
> 
> A firewall might cause problems with VisAD's collaborative 
> applications,
> but should not prevent you from compiling and running 
> stand-alone VisAD
> applications, even those with Java3D.

Just on this, attempting to open something like 
"C:\jdk1.3.1\demo\java3d\HelloUniverse\HelloUniverse_plugin.html"
(or a website that does not exist) brings up a dialogue/message box:
"Your current security settingsprohibit running ActiveX controls on this
page. As a result, the page may notdisplay correctly."

> Let the list know if you have any further questions or problems.

I am unsure of how much interest/use this is to others on the list, so
apologies to anyone who has 'accidentally' read this far before realising it
doesn't apply to them ;-)

 
> -Curtis
> 

I am using VisAD/SpreadSheet to plot temperature (in a body of water) as a
function of time and depth.  In the NetCDF files to be loaded there are
_many_ other interdependent variables, which are either inputs,
intermediates or outputs which are of little interest to me.

Given that the 3D implementation doesn't work
(I get
--------
extensionStr == null
wglCreateContext Failed: The operation completed successfully.

extensionStr == null
wglCreateContext Failed: The operation completed successfully.

extensionStr == null
--------
messages)

[Lately I have also been running with the -no3d flag.  In that case the
above errors don't arise.]

I map temperature to RGB.  
I am wondering how to add the Temperature value (represented on the screen
as a colour) to come up along with the "x" and "y" values on a
centre-mouse-button (or equivalent) click.

However, given that I can't seem to compile the files successfully, maybe I
can't be the one to do it...

NOTE: I HAVE WORKED OUT WHAT WENT WRONG IN THE FOLLOWING (but have kept it
in for reference)
Finally, I have not been able to implement the derivative function in
VisAD's SpreadSheet.
The subtraction and extraction of a single component from a tuple _do_ both
work (need to be used together), e.g.<<     B2d2: A2.8-A1.9       >>.
The files I import describe two varieties of scenario, and I discovered by
trial and error that the variable I am interested in are stored in component
8 of the simpler scenario, and component 9 of the more colicated scenario.

Just one minute ago, to my surprise, I discovered I _can_ implement:
C1d1: d(A1.9)/d(dyresmTotNumOfProfiles)

This enables me to view the derivative of Temperature (and two other
variables also stored in component 9 of the tuple) versus time.

However I cannot implement the derivative with respect to depth, which
should simply be:
OKAY SORRY ABOUT THIS - I JUST REALISED MY MISTAKE HERE WAS TO INSERT AN
EQUALS SIGN (=).
It does work now ;-)


I realise that this is not exactly the most coherent posting, but until I
learn to program in Java I won't be able to set up Java until I am able to
program in Java .....
...and until then I will probably remain faintly incoherrent ;-)

Thanks, 

David.



P.S. Is it right that I can't run any of the test files that come with VisAD
unless I compile them?   Are they in the visad.jar file?

I recently downloaded visad_examples.jar, but had not added it to my
CLASSPATH.
However it doesn't help me:

-----------------------------------------------------------------
C:\>set CLASSPATH
CLASSPATH=c:\visad.jar;c:\visad_examples.jar;.

C:\>java DisplayTest
Exception in thread "main" java.lang.NoClassDefFoundError: DisplayTest

C:\>java visad.examples.DisplayTest
Exception in thread "main" java.lang.NoClassDefFoundError:
visad/examples/Displa
yTest (wrong name: DisplayTest)
        at java.lang.ClassLoader.defineClass0(Native Method)
        at java.lang.ClassLoader.defineClass(Unknown Source)
        at java.security.SecureClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.access$100(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClassInternal(Unknown Source)
-----------------------------------------------------------------
adding a number (e.g. " 38") aftre the command did not help either.



================================================
David Verrelli - Ext. 763
Environmental Engineering

EGIS CONSULTING AUSTRALIA
390 St. Kilda Road, Melbourne, VIC 3004
Tel: (03) 9272-6666   Fax: (03) 9272-6612
================================================

"The information contained in this email and any files transmitted with it are 
confidential and intended solely for the use of the individual or entity to 
whom they are addressed. If you have received this email in error please 
promptly notify the sender by reply email and then delete the email and destroy 
any printed copy. Additionally, if you have received this email in error, you 
must not disclose or use this information in any way."  More Information on 
Egis can be obtained at www.egisconsult.com.au

Egis Consulting Australia, Melbourne
Phone 61 3 9272 6666
Fax 61 3 9272 6611
http://www.egisconsult.com.au


  • 2001 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: