StrategicHandler Demo Problem

Hi,

I have problem with strategic handler demo. I have errors in imports:



import org.lex.input.mouse.MouseManager;

import org.lex.input.mouse.component.CombinedMouse;

import org.lex.input.mouse.MouseBindingManager;



I have added MouseManager.jar to libs, when I use code complition this classes are available, but I still get class ont found error.



import com.jme.scene.SceneElement;

import com.jme.scene.state.AlphaState;



I have added jME2-Compile library built from latest source files, and i do not have does classes in my library.



I'm using NetBeans 6.5.



Thx for help in advance.

org.lex.game.Demo.<clinit>(Demo.java:46) is still in the import declarations of the Demo class - it is the first line that references anything in the MouseManager library. I therefore believe, you do not have MouseManager in the build path of your StrategicHandler. I did a new project of StrategicHandler2 just to see if it would work, and I had no problems, whatsoever. This is what I did:



1. Created a new empty Java project in Eclipse, naming it ‘MouseManager jme2’.

2. Unzipped the MouseManager source from the zip file and placed it in the source folder of ‘MouseManager jme2’.

3. Added jME2 project (which I already had set up earlier in my workspace), to the build path of ‘MouseManager jme2’.

At this step I can run MouseManager example code.

4. Created a new empty Java project in Eclipse, naming it ‘StrategicHandler jme2’.

5. Unzipped the StrategicHandler source from the zip file and placed it in the source folder of ‘StrategicHandler jme2’.

6. Added jME2 project (which I already had set up earlier in my workspace), to the build path of ‘StrategicHandler jme2’.

7. Added ‘MouseManager jme2’ project to the build path of ‘StrategicHandler jme2’

At this step I can run StrategicHandler example code.



If you do not want to create a separate project for MouseManager, then you do not have to. If you only want to play with the source of the StrategicHandler, you can follow these steps:

1. Create a new empty Java project in Eclipse, naming it ‘StrategicHandler jme2’.

2. Unzip the StrategicHandler source from the zip file and place it in the source folder of ‘StrategicHandler jme2’.

3. Add jME2 project, to the build path of ‘StrategicHandler jme2’.

4. Add MouseManager jar file to the build path of ‘StrategicHandler jme2’

At this step you should be able to run StrategicHandler example code.



Yet you might not care about the StrategicHandler source at all - and you might only want to use it. In that case there is only 1 step:

1. Add both - the MouseManager jar file and the strategicHandler jar file to the build path of your project, where you want to use their features.

Thx, I did  everything as you have wirtten and now StrategicHandler demo starts. Thanks again.

Are you sure you're using the Strategic Handler for JME2?

Yes, I took source code form svn. So I think it is ok.

Actually the SVN is still for jME 1.0. You need to download the src.zip or binary.jar from under the downloads to get StrategicHandler for jME 2.0. You will also need to get MouseManager for jMe 2.0.



Actually the difference between jME 1 and jME 2 versions of StrategicHandler are really minor… the main differences come from the MouseManager…

I have downloaded strategicHandler src for jME2, and I've added mouseManager_r1_jme2.jar to my libraries. It solved this import problems:



import com.jme.scene.SceneElement;

import com.jme.scene.state.AlphaState;



But I still get:



run:

java.lang.ExceptionInInitializerError

Caused by: java.lang.RuntimeException: Uncompilable source code - cannot find symbol

symbol  : class MouseBindingManager

location: package org.lex.input.mouse

        at org.lex.game.Demo.<clinit>(Demo.java:46)

Could not find the main class: org.lex.game.Demo.  Program will exit.

Exception in thread "main"

Exception in thread "main" Java Result: 1

BUILD SUCCESSFUL (total time: 3 seconds)