HelloAssets Tutorial ZipLocator problem

photo jmonktut3issue_zpsa6dd456d.jpg

photo jmonktut3issueB_zps5abdfa52.jpg

Hey, I’m doing the 3rd tutorial called HelloAssets …

At the Excercise - How to Load Assets part I add to the simpleInitApp the code Im told to

assetManager.registerLocator(“town.zip”, ZipLocator.class);
Spatial gameLevel = assetManager.loadModel(“main.scene”);
gameLevel.setLocalTranslation(0, -5.2f, 0);

after writing the first line - assetManger.registerLocator(“town.zip”, ZipLocator.class); the registerLocator part gets a cross-out line through and ZipLocator get’s red autocorrect line under it.
On the line number I get yellow exclamation mark in red bubble, on mouseover the bubble tells me:
cannot find symbol symbol:
class ZipLocator
location: HelloAssets

the town.zip file is in the root of the project / out by assets build nbproject src test , folders and the files that the project created…

My immediate guess is an import issue - I’m not that experienced but I messed some imports up that gave same issue with “cannot find symbol class location”, so that’s my first, best, and only idea… well it could be something else of course.

Anyone who can tell me what is going wrong, please help.

I added screenshots of jmonkey to try show stuff to help understanding what’s wrong.

ps. Awesome engine this jmonkey …! :smiley:

You’re missing an import methinks:

import com.jme3.asset.plugins.ZipLocator;

as a trick, see the little attention icon on the left of the offending line of code, where the line number should be? right-click on that icon and it will give you a list of possible fixes to the issue, in this case choose to add the required import.

edit: ps sometimes you get a list of possible imports, requires one to think logically as to which is needed…

“requires one to think logically as to which is needed”
-Aye don’t even get me started here :stuck_out_tongue: – in a universe that seems entirely logically consistent, the human inability to properly distinguish correct logical progression of the simplest of things – like spending 1 hour figuring out moving from center, to left, to right and back left and right and left and… which is fairly simple… ugh… ;p

But yea :slight_smile: Thanks a heckload, I figured there was a ZipLocator import like that I needed - the world makes sense again, THANK YOU ! :wink:

  • hadn’t thought of what’d happen if I clicked after doing the mouse-over on the problem thing, expected no actions, sweet tho with the solution proposals :smiley:

In the SDK, Ctrl+Shift+i fixes imports.