Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8711299
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T04:50:33+00:00 2026-06-13T04:50:33+00:00

I am currently trying to build a simple java Game with Slick and Maven.

  • 0

I am currently trying to build a simple java Game with Slick and Maven.

My Setup does work basicly. But when I extend my Main Class to be a Slick “BasicGame” I can’t execute the jar anymore, promting this error message:

D:\workspace\GameTest\target>java -jar GameTest-1.0-SNAPSHOT.jar
Exception in thread "main" java.lang.NoClassDefFoundError: org/newdawn/slick/BasicGame
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(Unknown Source)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$000(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.newdawn.slick.BasicGame
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    ... 12 more
Could not find the main class: gameTest.MyGame. Program will exit.

Before I did this everything executed just fine. The Pom.xml is copied from here.

the MyGame class looks like this:
…
imports
…

public class MyGame extends BasicGame {

   ...
   empty implementations of BasicGame Methods
   ...

   public static void main(String[] args){
      System.out.println("Hello World");       
   }
}

Does anyone know why this error occures?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T04:50:34+00:00Added an answer on June 13, 2026 at 4:50 am

    Does anyone know why this error occurs?

    When you switched to using an executable jar, you created a situation where your dependent library – slick.jar – is no longer in your class path. Everything starts out OK because MyGame is in your jar file. But MyGame extends BasicGame which is not in your jar file. It is in slick.jar and your java command makes no reference to slick.jar.

    Somehow you have to get all your dependencies back into your class path. For more information check out related question Is it possible to create an "uber" jar containing the project classes and the project dependencies as jars with a custom manifest file?

    Just checked your pom.xml file – you’ll have to integrate lwjgl and vecmath into your class path also.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to build firefox but I'm having some problems. I currently have Visual
I'm trying to build a simple HTTP Server using Java, using java.net.ServerSocket = new
Good Afternoon, I'm currently trying to build something incredibly simple inside of the Google
I'm currently trying to build a simple component which should monitor, if the user
I'm currently trying to build a simple form that takes an email address and
I am currently trying to build myself a nice few classes to build my
I'm currently trying to build a provisioning service of a kind for a local
I'm currently trying to build a more or less complete set of unit tests
I am currently trying to build a very basic serial shell with my arduino.
I am currently trying to build a little widget that will retrieve a list

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.