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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T14:59:39+00:00 2026-06-06T14:59:39+00:00

I have a simple Swing app compiled with netbeans 7.1.2 on a ubuntu machine

  • 0

I have a simple Swing app compiled with netbeans 7.1.2 on a ubuntu machine which has the java version:

java version “1.6.0_22” OpenJDK Runtime Environment (IcedTea6 1.10.4)
(6b22-1.10.4-0ubuntu1~11.04.1) OpenJDK Server VM (build 20.0-b11,
mixed mode)

jar works great when i use the shell using “java -jar filename.jar” in linux but in
the windows 7 with the java version 1.7.05 i get:
“Error: could not find or load main class”

How do i resolve this issue?

  • 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-06T14:59:40+00:00Added an answer on June 6, 2026 at 2:59 pm

    This error usually shows up when you don’t include the current directory (.) in the classpath.

    If there are any external libraries that you specify when starting the program, then you probably do something like java -jar -classpath dir/library.jar program.jar. Instead, add . to the classpath: java -jar -classpath .;dir/library.jar program.jar

    Other possibilities are:

    • you didn’t include a Manifest in the JAR
    • in the Manifest that you did include, you didn’t specify which is the main class, or you did it wrong.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple java swing app, built in netbeans. There's a JList in
In a Java Swing app (built in Netbeans 6.9), I have a JTable with
I have the following simple Java Swing app: My button New button is marked/focused
I have a simple Swing Java application that performs searches, and the results are
I have been working on a simple Java app. I had it compiling and
I have a small Java desktop app that uses Swing. There is a data
I'm writing a simple Swing application in NetBeans and doing so on an Ubuntu
I have a simple c/c++ app that has an optional TCL interpreter with the
I have a simple Android RSS reader app in which I am using SAX
I have a simple Java Swing GUI Form with a browse button. The browse

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.