A problem found with the "jMonkeyEngine 3 Tutorial (2) - Hello Node" page

First off I’ll admit I’m very much a beginner with jMonkey and Java, and I am also not all that experienced with programming (I don’t consider scripting to be at all like programming). As such I know I will make a lot of mistakes, so please feel free to correct me on, well, anything that I’ve screwed up on. About a year ago I was trying to learn jMonkey, ran into a problem I couldn’t wrap my head around or find a solution for, and gave up. This time around I ran into the exact same problem, couldn’t find anywhere that explained it, then took (what was for me) a wild shot and found out what the problem was. I figure if I ran into it and had gotten discouraged in the past that many other people must have had the same happen to them. I couldn’t find anywhere where this was talked about, so I figured I’d make a thread so that it’s at least known about.

The problem I ran into was while going through the Tutorial for Beginners, specifically while working on the jMonkeyEngine 3 Tutorial (2) - Hello Node page. I was following along fine until I copied the Code Sample into jME. When trying to run it a window popped up saying:

One or more Projects were compiled with errors. Application you are running may end unexpectedly.
When I do try to run it seemingly nothing happens, which to me is a clear indication that the error is not something minor like a mispositioned cube.

The error, it turned out, was because I pasted the Hello Node sample code into HelloJME3.java (entirely replacing the first sample code), when what needs to be done is make a new Java class named HelloNode to paste it into. I carefully reread the first two pages of the tutorial and found that nowhere did it say I needed to make the new Java class to put the second sample code into. I had assumed that I would just keep pasting code into the same spot until told otherwise, as there was no indication I should do otherwise.

I feel the tutorial should be edited to make this clearer for beginners.


you’re right. The info is missing because it’s not an issue for any developper with some java experience. In java a “public class Xxxx” should be in a file named Xxxx.java (imply you can have only one public class per file. I thinks the error should be explicitly reported by the SDK (or any java IDE).
In some IDE if you copy/paste java code in a folder, it will automatically create the java file with the name of the public class.

my understanding of Tutorial(1) is that the target audiance is “an intermediate or advanced Java developer”.

As you are a beginner in java, you should also read (in parallele) some java tutorial (see http://docs.oracle.com/javase/tutorial/ ).

Oh, thank you. I apparently misread the amount of Java experience expected, thinking it was beginner to intermediate, not intermediate to advanced. That definitely explains it.

Thank you for the link as well. :slight_smile: I’ll read up on that more before hopping back into jMonkey alongside it, to make sure I have a better grasp of the basics.