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 9075299
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T18:50:00+00:00 2026-06-16T18:50:00+00:00

Im working on Ubuntu . I made simple GUI app which uses 3 classes.

  • 0

Im working on Ubuntu. I made simple GUI app which uses 3 classes. Main is Test.class which contains main method. I have packed them all into JAR from console level. Now I have “kalkulator.jar” which contains: Test.class, MyFrame.class, MyPanel.class and META-INF folder. In META_INf there is MANIFEST.MF. What is in MANIFEST.MF is: “Main-Class: Test” and newline character. Now I try to open my JAR from console using:
java -jar kalkulator.jar
I get: “Exception in thread “main” java.lang.NoClassDefFoundError: Test (wrong name: myproject/Test”)
myproject is package of all my classes.
So how can I solve it?

  • 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-16T18:50:01+00:00Added an answer on June 16, 2026 at 6:50 pm

    You need to do the following things:

    1. make sure that the directory hierarchy in your jar matches the package hierarchy, absolutely. The classes have to be in a directory named ‘myproject’ in the jar. If they are just at top level, it won’t work.

    2. Make the Main-Class name the fully qualified name of the class with the main method. (i.e. myproject.Test).

    3. Learn to use a build tool, e.g. ant, to do all this.

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

Sidebar

Related Questions

I'm working on a Python Gtk3 app on Ubuntu, which primarily uses WebView from
I'm running ubuntu, 64bit. I have this minimal test package that i made to
I made a gtk app with Ubuntu quickly tool.But I have encountered a few
I have a working rails app that uses imagemagick commands on my local mac
I am working on ubuntu. I have a file called test.txt. I would like
I am working on ubuntu OS,I have started working on pentaho-BI using eclipse.. Just
I'm working in Ubuntu with MySql and I also have Query Browser and Administrator
Is it feasible to have a Ruby on Rails app, which is: a) deployed
I'm working on ubuntu 10.04 and a gcc. I have a binary file with
I'm working with Ubuntu recently and I have been asked to remove files with

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.