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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T23:00:36+00:00 2026-06-12T23:00:36+00:00

I built a package called com.hello in eclipse and I wrote an easy HelloWorld

  • 0

I built a package called “com.hello” in eclipse and I wrote an easy HelloWorld program. Eclipse automatically added “package com.hello;” on top of my program. And HelloWorld.java was put in

F:\workspace\helloWorld\src\com\hello;

HelloWorld.class was put in

F:\workspace\helloWorld\bin\com\hello.

It worked very well in Eclipse. But when I entered the directory “F:\workspace\helloWorld\bin\com\hello” and used command line with “java HelloWorld,” I got NoClassDefFoundError. I know it may have something to do with the classpath. But I’m not quite sure.

  • 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-12T23:00:38+00:00Added an answer on June 12, 2026 at 11:00 pm

    Your class is in a package com.hello. To run it, you must make sure the base directory of the package, which is F:\workspace\helloWorld\bin in your case, is in the classpath.

    Try running it like this:

    java -cp F:\workspace\helloWorld\bin com.hello.HelloWorld
    

    You can also go to the directory F:\workspace\helloWorld\bin and then run it with

    java com.hello.HelloWorld
    

    This will work because Java will use the current directory as the default (if you do not have the CLASSPATH environment variable set).

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

Sidebar

Related Questions

I understand that Aptana is built from Eclipse. I tried searching for the Package
I have two projects, Main and Core . I have a package called com.package.Sample
package com.ustr.eMIRnew; import java.util.ArrayList; import java.util.HashMap; import android.R; import android.app.Activity; import android.os.Bundle; import android.widget.ListView;
I have a SSIS package built in Business Intellegience Development Studio which have both
It seems to me that the new Package system that is built-in on Emacs
I have a compiling problem. I followed tutorial about Hello world program for Android
Possible Duplicate: Selecting class by Maven build profile I have two packages called com.app.util
I'm quite new to nodeJS and I'm trying to install a package called inotify
I wrote a C++ project called 'Foo' using Microsoft Visual Studio 2005 Verison 8.0.50727.762
My code: package com.example.linkingpage; import android.app.Activity; import android.app.AlertDialog; import android.app.Dialog; import android.content.DialogInterface; import android.content.Intent;

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.