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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T16:52:57+00:00 2026-05-31T16:52:57+00:00

http://pastebin.com/1btVw8Cb There are two classes in the above code. So above is my code

  • 0

http://pastebin.com/1btVw8Cb

There are two classes in the above code.

So above is my code which is working fine when I hit run in Eclipse, runs fine in Netbeans as well.

I am trying to create a standalone application, a jar file.

The error I get when I double my jar is:

Could not find the main class: NewJFrame. Program will exit.
I get the following from the command promt:

E:\Java Programs\Eclipse Workspace\test3\src\test3>java testT.jar
Exception in thread "main" java.lang.NoClassDefFoundError: testT/jar
Caused by: java.lang.ClassNotFoundException: testT.jar
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: testT.jar.  Program will exit.

I followed the command from here: "Could not find the main class: XX. Program will exit."
So this is what I am typing in the command promt to create my jar:

E:\Java Programs\Eclipse Workspace\test3\src\test3>jar cfm MyJar.jar manifest.tx
t *.class SINGLE.TXT

https://i.stack.imgur.com/ncm1q.jpg

Some shots above I took to show the process.

So I think the problem could be error when I do javac? But it builds fine and runs fine in netbeans and eclipse >< Please help.

  • 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-05-31T16:52:58+00:00Added an answer on May 31, 2026 at 4:52 pm

    it is now working. I have not changed anything, maybe the memory got curroupted and that is why it was giving me problems. I think restart the computer is what fixed it. But yea, I don’t know for sure what was wrong, though it is working fine now. So thank you for your help guys

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

Sidebar

Related Questions

Here are my classes: http://pastebin.com/3dc5Vb1t When I try to run BookStore b = new
A copy of my code is here http://pastebin.com/jcLRCrQr Everything loads fine and the CCS
I have simple front controller plugin which contains this code: http://pastebin.com/m155c59b0 When session expire
There are two JSON var (JSON.parse'd already) var acc http://pastebin.com/7DyfFzTx var sit http://pastebin.com/vnZiVaDx My
thirtydot edit: (there's no doctype) Here is the code in pastebin: http://pastebin.com/zwPTd8dd <html> <head>
When I run my program core.py ( http://pastebin.com/kbzbBUYd ) it returns: File core.py, line
Code: http://pastebin.com/h8WuYbJn Full error: Fatal error : Call to undefined function AddUser() in C:\xampp\htdocs\scripts\steam.php
i am porting opera recovery from alredy existed c++ code http://pastebin.com/ViPf0yn6 i struck at
I am porting opera recovery from already existing C++ code http://pastebin.com/ViPf0yn6 I struck at
I am trying to learn Flex and now i have the next code: http://pastebin.com/rZwxF7w1

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.