Hi, Vineet,

Just put the statement Scene model2 = ..... into try - catch block. The
code would look like

------------
Scene model2 = null;  //it's essential to declare the var. outside that
block.
                      //otherwise it wouldn't be visible from the rest
of the function.
try {
  Scene model2 = loader.load("TODD1.DEM");
}
catch(FileNotFoundException FNFe){
  System.err.println("The file wasn't found. Amazed? Check the paths!");
  System.err.println("The error itself is " + FNFe);
}
------------

And don't forget to import java.io.* classes (or just write the full
path to that exception in catch parameter (java.io.FileNotFoundException
FNFe) instead of import statement). But i'm sure u know this.

U can also declare that the function throws this exception. But then
u'll have to put the function call into try - catch block.

vladimir
--
             -=V=-
>~~~~~~~<=============>~~~~~~~<
Join in Java community now!
http://javacafe.virtualave.net/
>~~~~~~~<=============>~~~~~~~<


Vineet Gupta wrote:
>
> Hi,
>
>         I am trying to load the dem file using ncsa's portfolio but I get the
> following error:
> I am using current version of the portfolio, jdk121, and java 3d 1.1.2.
> Does anyone have any idea?/
>
>         thanks.
>         Vineet Gupta
>
> E:\java3d\july99>javac Terrain.java
> Terrain.java:137: Class Scene not found.
> Scene model2 = loader.load("TODD1.DEM");
> ^
> Terrain.java:137: Exception java.io.FileNotFoundException must be caught,
> or it
> must be declared in the throws clause of this method.
> Scene model2 = loader.load("TODD1.DEM");
>                           ^
> 2 errors
>
> ===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff JAVA3D-INTEREST".  For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to