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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T15:27:08+00:00 2026-06-05T15:27:08+00:00

I am currently using Ubuntu 11.10 and java SE 1.6.0_26. I am trying to

  • 0

I am currently using Ubuntu 11.10 and java SE 1.6.0_26. I am trying to run a very simple “Hello World” app. I placed the the java file HelloWorld.java on the Home folder. I compiled it using the command javac HelloWorld.java. I think its working because it doesn’t show any compilation error and a HelloWorld.class is created.

When I typed the command java HelloWorld I have this error:

Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorld
Caused by: java.lang.ClassNotFoundException: HelloWorld
        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: HelloWorld.  Program will exit.

BTW, here is my java code:

public class HelloWorld {
    public static void main (String args[]) {
        System.out.println("Hello World!!!");
    }
}
  • 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-05T15:27:10+00:00Added an answer on June 5, 2026 at 3:27 pm

    It could be that the file is not in your classpath..try the following command:

    java -classpath . HelloWorld
    

    V

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

Sidebar

Related Questions

I'm trying to open a file from Java in Ubuntu using FileInputStream.Now my problem
I'm trying to print a HTML String under Ubuntu 10.10 using Java, using this
I am using java-gnome (Ubuntu 11.04, libjava-gnome-java 4.0.11) and am trying to set my
I am currently using the following versions of node & express (ubuntu): node: 0.6.12
Currently using MySQL version 5.1.6 This is my first real world build and so
I have a dual-boot OS X / Ubuntu and am currently using separate Eclipse
I'm currently using JDK 6 on a Ubuntu 10.04 LTS server. Since Oracle will
I've been currently using PHP on Apache (on Ubuntu) to do dynamic server-side stuff,
I am currently using Eclipse 3.5.2 and Qt Jambi 4.7.2 in Ubuntu 11.04 Natty
I am currently using ubuntu 11.10. I just now installed rvm and ruby 1.9.2.

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.