Problem with NamedKeyStroke

I have created my own, custom Button (based on DoActionButton but it calls given class and method).

The problem is I can’t have it respond to key strokes because Vassal can’t load

java.lang.NoClassDefFoundError: VASSAL/tools/NamedKeyStroke at rsr.RsrButton.getAttributeTypes( at VASSAL.configure.AutoConfigurer.<init>( at at VASSAL.configure.ConfigureTree$5.actionPerformed( [...] Caused by: java.lang.ClassNotFoundException: Unable to load class at at at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) ... 31 more Caused by: 'VASSAL/tools/NamedKeyStroke.class' not found in E:\dominik\gry\VASSAL\ at at at ... 34 more

Why whould it try to load that class from my module when it should be in Vassal core?

I have not done anything really special in my code (it’s basically the same button but with less parameters) and it compiles normally.

Ok, my fault, by checking Vengine.jar and it’s contents I see in the compiled classes that NamedKeyStroke is not used anymore in those sources. Propably somethings wrong with my copy of Vassal source.

I will switch to javax.swing.KeyStroke instead.

Maybe I’m connected to wrong repository?

NamedKeyStroke is a class in the VASSAL 3.2 source (trunk). It does not exist in the 3.1 branch. Depends which branch you are using. NamedKeyStroke and javax.swing.KeyStroke are incompatible. I strongly suggest you be using the 3.1 branch.


Messages mailing list …

Post generated using Mail2Forum (

Ok, I didn’t know that. I was always using trunk repository for compiling the module, while it was then run in normal version of Vassal downloaded from the site.