HelloNode not showing both boxes

^---- I say how you can set the main class. You can also press shift-F6 to run the currently opened file.

ahh shift F6. I tried Fn F6 before as well when it wasn’t working. Now i now. Thanks for the tips…

Or you simply set the main class (or which you only have one in a normal project, for a tutorial project you might have multiple though).

thats good to know too because sometimes when you are troubleshooting, you are not thinking of all of that…

I would spend hours, days, months or even years and would never guessed he’s problem was wrong main class… :scream:

Well this is why we are sometimes quick to dismiss issues - we have all kinds of experience with how people sabotage themselves :wink:

1 Like

Standard debug procedure that will save you years and years on your life:

“Gee, I made a change in the code but nothing happened in my app.”
“I think I’ll add a System.out.println(“Kilroy was here.”) to even see if it’s running.”
“Hmmm… no println.” (looks for cause of not actually running new code)

I don’t know how many times I’ve helped developers with this exact same problem… from newbs up to senior devs, custom apps, Java, C++, whatever, all the way up to enterprise deployments. “I changed this code but nothing happened…” They think I’m amazing or something but it seems kind of obvious to me at the time. But in this case, I know enough about JME to wonder “Where else would the color blue come from?” There really could only be one answer (and ATI drivers aren’t it).

Anyway, I call it “Kilroy debugging” and it has saved my life many times. :slight_smile:

2 Likes

After a couple of reading on WIkipedia, I understood why “Kilroy debugging”. :joy:

that’s not fair fellas. I clicked on the green button and that button’s responsibility is to run the program. Therefore, it didn’t do what it was intended to do. The fact that i had to go and right click which is an additional step, by the way, was unknown to me. I typically don’t do that with any IDE…

Any other IDE, the button used to run the program, will run the program in which it is intended to run so perhaps that issue should be addressed in this environment as far as a usability concern for newbies like myself.

And for the record, I do include System.out.println(“statements”) in my code when I’m troubleshooting but the issue was I didn’t understand why it wasn’t accepting my changes. Please understand I am brand new to this jmonkey environment as well as graphic design so don’t take shots at me while I am trying to learn…

1 Like

In a normal game or program, you only have 1 main class. However, since now you’re doing tutorials, every class can be the main class. I always do this:

Tutorial - Shift - F6

My Game - F6

It did run the program. It ran the main class configured for the project. If you change the main class configured for the project to your new main class then it will run that.

I wasn’t taking shots. As I said, this is such a very common occurrence that there is a technique for finding it. And how many people read this thread and didn’t figure it out even though all of the evidence was there? :smile:

Took me several posts, too.

Kool. its OK. maybe I was being sensitive because I was frustrated as to why it wasn’t working and staying up late trying to fix it…

No worries. I’m just happy its working now… :smiley:

To be fair, the tutorial specifically says that you’re supposed to right-click and run the file :slight_smile:

I saw at the bottom of the code, build and run the file. The only places I saw to right click was when you have to navigate to add the libraries…Perhaps I missed it…

First tutorial, “Hello SimpleApplication” →

Right-click the HelloJME3 class and choose Run. If a jME3 settings dialog pops up, confirm the default settings.

You should see a simple window displaying a 3D cube.
Press the WASD keys and move the mouse to navigate around.
Look at the FPS text and object count information in the bottom left. You will use this information during development, and you will remove it for the release. (To read the numbers correctly, consider that the 14 lines of text counts as 14 objects with 914 vertices.)
Press Escape to close the application.
Congratulations! Now let’s find out how it works!