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

  • Home
  • SEARCH
  • 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 6713871
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:25:50+00:00 2026-05-26T08:25:50+00:00

This has been driving me nuts for the past hour. I have two computers,

  • 0

This has been driving me nuts for the past hour. I have two computers, one I work on primarily running linux mint 11 and the following version of the JDK:

java version "1.6.0_20"
OpenJDK Runtime Environment (IcedTea6 1.9.5) (6b20-1.9.5-0ubuntu1~9.10.1)
OpenJDK Client VM (build 19.0-b09, mixed mode, sharing)

Now on my windows computer I’m trying to use the same code I have compiled and ran on the linux one. The windows one is running XP with the following java:

java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) Client VM (build 20.1-b02, mixed mode, sharing)

I know the versions are different but should that really make a difference with something as simple as a nested class? I really hope I just made a mistake in the following code:

public class test {
    public static class nClass
    {
        public void testFunc()
        {
            System.out.println("Test worked.");
        }
    }
    public static void main(String args[]) {
        test.nClass t = new test.nClass();
        t.testFunc();
    }
}

This code compiles and runs fine on the linux computer. When I bring it over to the windows one it will compile fine but produces:

NoClassDefFoundError test$nClass at test.main(test.java:10)

I’m completely stumped and entirely frustrated.

  • 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-26T08:25:51+00:00Added an answer on May 26, 2026 at 8:25 am

    My guess is that you only copied the test.class file – you need to copy test$nClass.class as well… or recompile on Windows.

    (Note that these names don’t follow Java naming conventions. It’s not relevant to the question, but it’s a good idea to follow conventions even for sample code.)

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

Sidebar

Related Questions

This error has been driving me nuts. We have a server running Apache and
This has been driving me crazy for the past few minutes I have a
This has been driving me nuts for a week now. I have a class
This has been driving me nuts all day. I have a weird bug that
This has been driving me absolutely nuts. I have a substitute function like this:
This one has been driving me nuts for a few days now and I've
So this has just been driving me nuts! I have looked through tons of
I have a javascript function that has been driving me nuts. This is the
This has been driving me nuts. I've worked with SWFObject in the past which
This one has been driving me nuts... Considering plane is a CALayer, I rotate

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.