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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T03:32:54+00:00 2026-06-05T03:32:54+00:00

try { MyClass[] myClass = cProxy.getMyClass(); return + myClass[0]; } catch (Exception e) {

  • 0
try {
  MyClass[] myClass = cProxy.getMyClass();
  return "" + myClass[0];
} catch (Exception e) {
  // nothing to do
}
return "" + MyClass.UNKNOWN; <-- NoClassDefFoundError thrown

I got MyClass object from other objects, I just wondering why instead of line

MyClass[] myClass = cProxy.getMyClass();

did the Exception throw when called the static variables “MyClass.UNKNOWN” of MyClass class?

What’s the deep meaning of NoClassDefFoundError and ClassNotFoundException? Thanks

  • 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-05T03:32:56+00:00Added an answer on June 5, 2026 at 3:32 am

    Here are excerpt from java Docs about both the exceptions.

    NoClassDefFoundError:
    Thrown if the Java Virtual Machine or a ClassLoader instance tries to load in the definition of a class (as part of a normal method call or as part of creating a new instance using the new expression) and no definition of the class could be found.
    The searched-for class definition existed when the currently executing class was compiled, but the definition can no longer be found.

    ClassNotFoundException :
    Thrown when an application tries to load in a class through its string name using:
    • The forName method in class Class.
    • The findSystemClass method in class ClassLoader .
    • The loadClass method in class ClassLoader.
    but no definition for the class with the specified name could be found.

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

Sidebar

Related Questions

Can I avoid the copying of object in the following way? MyClass Obj; try
Consider the following Cocoa/Obj-C code snippets: MyClass *obj; @try { [obj doSomething]; } @catch
I try to write and read object of class into and from binary file
I try to test javax.enterprise.event.Event mocked by mockito but the following exception is thrown
I have this static callback function in MyClass, and I try to call another
I try to get the first .myClass element of my page. To do that,
I try to develope a simple Broadcastreceiver. Here's my code: public class MyClass extends
I have the following example-class: public class MyClass<T> { public IList<T> GetAll() { return
I'm having problems when I try to load a workflow from the instance store.
Here is my try public MyClass { public Guid ID {set; get;} public DateTime

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.