Netbeans + Tutorial issue

Hello,

I have recently downloaded jME and started working through the tutorial to get a feel for the workflow. It appears that each section of the tutorial from ‘Hello Node’ uses the Box object without creating an instance of it.

// Create a wall with a simple texture from test_data
Box(2.5f,2.5f,1.0f);
Spatial wall = new Geometry("Box", box );
Material mat_brick = new Material( 
    assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
mat_brick.setTexture("ColorMap", 
    assetManager.loadTexture("Textures/Terrain/BrickWall/BrickWall.jpg"));
wall.setMaterial(mat_brick);
wall.setLocalTranslation(2.0f,-2.5f,0.0f);
rootNode.attachChild(wall);

This snippet is taken from ‘Hello Asset’. The web version of the tutorials appears to be fine.

Also when copying and pasting the code into NetBeans any blank new lines will cause a compiler error.

image

Does anyone know how to fix this in NetBeans?

First one is just a mistake in the tutorial - the line above the reference (box) should say ‘box =…’ and not just Box(…)

Should probably be

box = new Box(2.5f,2.5f,1.0f);
Spatial wall = new Geometry("Box", box );

I’m not seeing a mistake in the tutorial.

I’m not seeing what you’re seeing, can you link to it?

Press F1 within the jME SDK the mistake is with the built-in documentation not the web version.

Ahh, I forgot about those. I see thanks.

1 Like

Oh yeah, since the old wiki broke down the SDK Documentation is outdated on that… we should fix that…
Note that the illegal character sometimes happen (especially with äöüßéá etc, just try to delete the invisible character).

@Darkchaos,

Deleting the line does correct the editor, I thought it might be a character encoding setting which isn’t supported on Windows or something but I was unable to locate any settings for it within the SDK.

Thanks anyway.

That could be, somewhere in project properties there should be something set to utf-8, but looking at the line \u00... means an invalid unicode character (like: Maybe java forbids emojis).

Actually:

  is a HTML thing which works like a space but isn’t completely one (it disallows work-breaking iirc, which does not make sense to java)

1 Like