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

  • Home
  • SEARCH
  • 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 8474851
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T17:44:08+00:00 2026-06-10T17:44:08+00:00

I’ve read around a lot but haven’t been able to find a solution yet.

  • 0

I’ve read around a lot but haven’t been able to find a solution yet.

I’m using lwjgl, it needs 2 jars and a native library to run: lwjgl.jar, lwjgl_util.jar and the natives library. I’ve tried this in every way i could think of, anyway, I’m trying with a command like this at the moment:

java - Djava.library.path="libs/natives/" -cp libs/jars/lwjgl.jar:libs/jars/lwjgl_util.jar DisplayTest.class

but in every way i try, i get:

Exception in thread "main" java.lang.NoClassDefFoundError: DisplayTest/class
Caused by: java.lang.ClassNotFoundException: DisplayTest.class
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
Could not find the main class: DisplayTest.class. Program will exit

Oh and it might be worth to mention that I’m working on a linux terminal.
Also, i get this to run perfectly fine in eclipse so I can’t really understand whats up here.

  • 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-10T17:44:09+00:00Added an answer on June 10, 2026 at 5:44 pm

    First off, you just need to pass the class name to java:

    java -Djava.library.path="libs/natives/" 
         -cp libs/jars/lwjgl.jar:libs/jars/lwjgl_util.jar DisplayTest
    

    (linebreaks for readability)

    I would try the following:

    1) Use the CLASSPATH enviroment variable, as in:

      CLASSPATH=.:/path/to/lwjgl/lwjgl.jar:/path/to/lwjgl/lwjgl_util.jar 
      export CLASSPATH
    

    Notice the dot (.) at the very beginning of the classpath;

    2) Run your java application:

      java -Djava.library.path="libs/natives" DisplayTest
    

    If this works, add the commands above to a shell script. Good luck!

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

Sidebar

Related Questions

Seemingly simple, but I cannot find anything relevant on the web. What is the
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
I have a jquery bug and I've been looking for hours now, I can't
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I have a French site that I want to parse, but am running into
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this

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.