Malnorma wrote:Is the class actually supposed to be named WingLeader.module.Buttons? i.e. in your code, do you have:
- Code: Select all
package WingLeader.module;
public class Buttons {
...
}
If so, you should rename the MyGame folder to WingLeader and use the name WingLeader.module.Buttons instead. If WingLeader.module.Buttons is in another class file entirely, you'll need to add it to the module as well (and any other related classes). If there's a problem instantiating your class, you'll need to either debug it or check Vassal's log to try and understand where it went wrong.
If you're willing to share the code you've written, you'll probably get more useful comments

Sorry about that. The project I am working on is WingLeader. I generally use a generic name rather than the particular name when asking of help because sometimes the exact names can cause confusion in and of themselves. But maybe I am wrong about that. Using a generic name certainly caused confusion this time.
Here is the VASSAL log I am getting with this recent error message. You will see it uses yet another different package name as I have tried to simplify the path by getting rid of the ".module".
I have tried this with a directory structure of src\WingLeader\Buttons.java and with WingLeader\Buttons.java (without changing the package name). Neither work. I have tried using Buttons, Buttons.class and Buttons.java as the file name.
As you can see, the problem is still that VASSAL can't seem to find the imported class. Thanks again for your help.
java.lang.ClassNotFoundException: Unable to load class WingLeader\Buttons
at VASSAL.tools.DataArchive.findClass(DataArchive.java:453)
at VASSAL.tools.DataArchive.loadClass(DataArchive.java:424)
at java.lang.ClassLoader.loadClass(Unknown Source)
at VASSAL.configure.ConfigureTree.importConfigurable(ConfigureTree.java:849)
at VASSAL.configure.ConfigureTree$5.actionPerformed(ConfigureTree.java:465)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.AbstractButton.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.io.FileNotFoundException: 'WingLeader\Buttons.class' not found in C:\Users\dougr_000\Documents\Programming Documents\almodule\WL v4 LAYER TEST.vmod
at VASSAL.tools.DataArchive.getInputStream(DataArchive.java:240)
at VASSAL.tools.DataArchive.findClass(DataArchive.java:449)
... 42 more