Exception in thread "AWT-EventQueue-0" java.lang.ExceptionInInitializerError
at playGame.slideshow(playGame.java:13)
at Game$1.actionPerformed(Game.java:50)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:20
18)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.jav
a:2341)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel
.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259
)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonL
istener.java:252)
at java.awt.Component.processMouseEvent(Component.java:6505)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
at java.awt.Component.processEvent(Component.java:6270)
at java.awt.Container.processEvent(Container.java:2229)
at java.awt.Component.dispatchEventImpl(Component.java:4861)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832
)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
at java.awt.Container.dispatchEventImpl(Container.java:2273)
at java.awt.Window.dispatchEventImpl(Window.java:2719)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:729)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:688)
at java.awt.EventQueue$3.run(EventQueue.java:686)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDo
main.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDo
main.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:702)
at java.awt.EventQueue$4.run(EventQueue.java:700)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDo
main.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:699)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThre
ad.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.
java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
Caused by: java.lang.NullPointerException
at ImageReader.getImageNames(ImageReader.java:13)
at newActivity.<clinit>(newActivity.java:6)
... 38 more
You need to have the images in this folder: C:\Program Files (x86)\Game\Images
Create the folder if it doesn't exist.
kree wrote:This is very good, looking forward to the rewards. I can't really think of any rewards except for maybe a less expensive reward that lets you ruin.
Exception in thread "AWT-EventQueue-0" java.lang.ExceptionInInitializerError
at playGame.slideshow(playGame.java:13)
at Game$1.actionPerformed(Game.java:50)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:20
18)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.jav
a:2341)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel
.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259
)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonL
istener.java:252)
at java.awt.Component.processMouseEvent(Component.java:6505)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
at java.awt.Component.processEvent(Component.java:6270)
at java.awt.Container.processEvent(Container.java:2229)
at java.awt.Component.dispatchEventImpl(Component.java:4861)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832
)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
at java.awt.Container.dispatchEventImpl(Container.java:2273)
at java.awt.Window.dispatchEventImpl(Window.java:2719)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:729)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:688)
at java.awt.EventQueue$3.run(EventQueue.java:686)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDo
main.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDo
main.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:702)
at java.awt.EventQueue$4.run(EventQueue.java:700)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDo
main.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:699)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThre
ad.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.
java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
Caused by: java.lang.NullPointerException
at ImageReader.getImageNames(ImageReader.java:13)
at newActivity.<clinit>(newActivity.java:6)
... 38 more
You need to have the images in this folder: C:\Program Files (x86)\Game\Images
Create the folder if it doesn't exist.
Thanks for clearing that up for everyone I had a feeling this may be the problem. I'm going to change it to a relative path so that the folder can just be in the same directory as the game files.
GUI is loading, the rules Button takes me to the rules text (can't read it all because resolution is off). The 'Rewards' button takes me to more Buttons (none of these work either). The 'Play' Button goes gray when you click it, but nothing happens.
JonnyD wrote:I got the gui to work and the rules button works, but the rewards button does nothing and the play button sends me to a black screen. I see this in the cmd when I press play:
Exception in thread "AWT-EventQueue-0" java.lang.ExceptionInInitializerError
at playGame.slideshow(playGame.java:13)
at Game$1.actionPerformed(Game.java:50)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:20
18)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.jav
a:2341)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel
.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259
)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonL
istener.java:252)
at java.awt.Component.processMouseEvent(Component.java:6505)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
at java.awt.Component.processEvent(Component.java:6270)
at java.awt.Container.processEvent(Container.java:2229)
at java.awt.Component.dispatchEventImpl(Component.java:4861)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832
)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
at java.awt.Container.dispatchEventImpl(Container.java:2273)
at java.awt.Window.dispatchEventImpl(Window.java:2719)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:729)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:688)
at java.awt.EventQueue$3.run(EventQueue.java:686)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDo
main.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDo
main.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:702)
at java.awt.EventQueue$4.run(EventQueue.java:700)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDo
main.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:699)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThre
ad.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.
java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
Caused by: java.lang.NullPointerException
at ImageReader.getImageNames(ImageReader.java:13)
at newActivity.<clinit>(newActivity.java:6)
... 38 more
Did I do something wrong?
The directory C:\Program Files (x86)\Game\Images has to exist for the game to work and it has to have your desired images in it. So create a new folder named "Game" in C:\Program Files (x86) and then one named "Images" inside the Game folder and put your images inside it.
Hello everyone.
Let's get straight to business:
I've done some refactoring of the code and here are the main things which were changed:
1. Screen resolution fits automatically to your screen.
2. You don't need to wait until the task is over to close the program(sometimes it can be very indeed).
3. The list of activities can be much bigger - you just need to add them to the activities.xml-file(there are some activities and nothing hard to add new ones, using existing ones as an example).
4. You don't need to keep the Images folder in the "program files" folder. you need to put it right to the place were the main(.jar) file is.
5. I've packed everything into the .jar-file, so now it will be much more comfortable to use it.
I have some plans to implement in this game, but I don't have time at the moment, and I also don't have any place where to upload the archive. If someone of you, guys, have mediafire account, or you know any other fileshare(have an account there) I can send you all necessary files(except the pictures - there are too much of them and you can find them in the previous package anyway) and if you have such possibility, you could upload it somewhere and share the link in here.
So, if you have about 20 minutes of free time and a filesharing account(or you just want to get the new version of the project), pm me please.
@c3po:
I cannot get the game to run properly. When I open Game.jar, javaw.exe starts up, but no window appears.
The Images folder is in the same directory as instructed. I'm running Win7 64 .
Triple Alfa wrote:@c3po:
I cannot get the game to run properly. When I open Game.jar, javaw.exe starts up, but no window appears.
The Images folder is in the same directory as instructed. I'm running Win7 64 .
Triple Alfa wrote:@c3po:
I cannot get the game to run properly. When I open Game.jar, javaw.exe starts up, but no window appears.
The Images folder is in the same directory as instructed. I'm running Win7 64 .
Ok. Sorry for being away for such a long time - I've finally had a small vacation. what's the trouble with starting the game? did you try to start it through the console? are there any exceptions in it? I'm not on ly computer at the moment, so I'll be able to answer that in a day or two. hope I'll be able to help you.
c3po wrote:Ok. Sorry for being away for such a long time - I've finally had a small vacation. what's the trouble with starting the game? did you try to start it through the console? are there any exceptions in it? I'm not on ly computer at the moment, so I'll be able to answer that in a day or two. hope I'll be able to help you.
The only problem I have with the game is when I start it, it takes about half an hour for the window to be created and a not-tested amount of time to start when I press play. (Wasn't patient enough for the ladder). No exceptions come up.