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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T11:55:11+00:00 2026-06-17T11:55:11+00:00

I have a jar file without its main class specified in manifest. So i

  • 0

I have a jar file without its main class specified in manifest.
So i followed an answer given here:

How to run a class from Jar which is not the Main-Class in its Manifest file

It seems to try to run main from this class. However it looks like importing some other class from this jar file is broken for some reason.

Here is the minimized version of my problem:

jar tf test.jar

gives:

META-INF/
META-INF/MANIFEST.MF
ClassIWantToRun.class
something/
something/something/
something/something/something/ClassA.class

Sources of ClassIWantToRun.class viewed with jd-gui seems to be:

import something.something.something.ClassA;

public class ClassIWantToRun
{
    public static void main(String[] args)
    {
        int x = ClassA.comeMethod();
    }
}

Running this with:

java -cp test.jar ClassIWantToRun

gives me the exception:

Exception in thread "main" java.lang.NoClassDefFoundError: com/ibm/OS4690/FlexosException
    at ClassIWantToRun.main(ClassIWantToRun.java:7)
Caused by: java.lang.ClassNotFoundException: com.ibm.OS4690.FlexosException
    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)
    ... 1 more

I know only basics of Java but it seems that ClassA can not be found even with the line: import something.something.something.ClassA
How can i make this run?

  • 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-17T11:55:12+00:00Added an answer on June 17, 2026 at 11:55 am

    The exception indicates that you need to add some other JARs into the classpath. Classes in your test.jar depend on other classes. e.g. on com.ibm.OS4690.FlexosException.

    You can try searching for another JAR file (in the same place you took your test.jar) so that it will contain the FlexosException.class file. Once you find it, run your test.jar as

    java -cp test.jar;<path_to_another_jar_here> ClassIWantToRun
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a jar file with predefined entry point in its manifest file. And
I have created an executable JAR with the manifest: Manifest-Version: 1.0 Main-Class: MyClass Class-Path:
I have some class files from a .jar file. I am looking for a
I have a *.jar file. Its *.java reads from console a undefined number of
That is when you have any jar file attached to you your class path.
Is is mandatory to have classpath inside a Manifest file inside the java jar
I have a jar file named stdlib.jar . This has many classes in its
I try to run an jar from an php file like this: exec(java -jar
I have an external library(just one class file called org.vinay.dep.DependedClass).It is well within its
Given a class, org.eclipse.ui.views.navigator.ResourceNavigator for example, how do I find out which jar file

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.