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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T04:26:51+00:00 2026-06-01T04:26:51+00:00

So I usually run my programs through Eclipse but I’m not allowed to use

  • 0

So I usually run my programs through Eclipse but I’m not allowed to use it in an upcoming competition, so I started trying to compile my programs through command prompt, and I kept getting the same error for everything I tried to compile… I have searched for answers but none of them seemed to be my problem. I’d appreciate it if someone could tell me what I am doing wrong. Thank you and sorry if there is already an answer to this.

C:\Users\DanielH\Desktop\Folder>javac Test.java

C:\Users\DanielH\Desktop\Folder>java Test.class
Exception in thread "main" java.lang.NoClassDefFoundError: Test/class
Caused by: java.lang.ClassNotFoundException: Test.class
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: Test.class.  Program will exit.

Test.java was written as:

import java.util.*;
import java.io.*; 

public class Test {
    public static void main(String[] arguments){
        Scanner fish=new Scanner(System.in);
        int a=fish.nextInt();
        int b=a-10;
        System.out.println(b);
}}
  • 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-01T04:26:52+00:00Added an answer on June 1, 2026 at 4:26 am

    Try java Test. The . (dot) is a package separator, so the JVM is trying to find the class named class in the folder Test (see NoClassDefFoundError: Test/class)

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

Sidebar

Related Questions

Usually every time `make install' is run, files are not put in a specific
When I run this code through several entries of a directory, it usually returns
I am trying to compile the following software so that I can step through
I usually don't have any problems setting up the classpath and running programs, but
Hey I usually run into a situation where I will create a class that
Usually we define iis web sites which allow anonymous authentication to run under the
When I run an MSI (without parameters) I usually have to click my way
I run an ASP.NET application on IIS 6.0. Usually I have compression turned on
I use GDB to debug C/C++ programs very often, and I'm reasonably knowledgeable with
I usually don't expect help from outside but I need to solve this quickly

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.