MD2 Problem... help out a noob

I know you guys must want to kill me for asking all these questions, but when it comes ot java I’m seriously deficient.

Having some issues with the MD2Loader HOWTO. I stuck the code for the howto into the HelloXith3D.java example code, and here’s the error I get:

C:\xith3d\xith3d-0.7.1\xith3d>javac -classpath C:\xith3d\third-party\third-party
\vecmath\vecmath.jar;C:\xith3d\third-party\third-party\jogl\jogl.zip;xith-md2.ja
r;C:\xith3d\xith3d-0.7.1\xith3d\libs\xith3d.jar;libs/xith-tk.jar;C:\xith3d\md2lo
ader\xith-md2.jar;C:\Program%20Files\Java\jdk1.5.0_06\jre\lib\ext\.;.;model -d c
lasses HelloXith3D.java
HelloXith3D.java:68: variable model might not have been initialized
try {  MD2Loader loader = new MD2Loader();  MD2Model md2Model = loader.load(new
FileInputStream("tris.md2"), "marvin.pcx");  model = md2Model.getInstance();} ca
tch (ModelLoadingException e) {/* Exception handling... */}scene.addChild(model)
;


                                                                          ^
HelloXith3D.java:68: unreported exception java.io.FileNotFoundException; must be
 caught or declared to be thrown
try {  MD2Loader loader = new MD2Loader();  MD2Model md2Model = loader.load(new
FileInputStream("tris.md2"), "marvin.pcx");  model = md2Model.getInstance();} ca
tch (ModelLoadingException e) {/* Exception handling... */}scene.addChild(model)
;
                                                                            ^
2 errors

I would also like to mention just how amazing all you guys at the forum have been. This is my 2nd time installing xith and everyone was incredibly helpful in getting everything up and running! Thanks!

you’ll also have to catch the FileNotFoundException (that’s Error2) and now imagine the try doesn’t succeed, then model is not initialized, so it doesn’t know what to do about it (that’s Error1).
the solution will look like this:


model = null;
try {  
  MD2Loader loader = new MD2Loader();
  MD2Model md2Model = loader.load(new FileInputStream("tris.md2"), "marvin.pcx");
  model = md2Model.getInstance();
} 
catch (ModelLoadingException e) {/* Exception handling... */}
catch (FileNotFoundException e) {/* Exception handling...*/}
if(model != null) scene.addChild(model);