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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T03:15:25+00:00 2026-05-17T03:15:25+00:00

I am on Arch Linux, I just installed JRE and JDK and all the

  • 0

I am on Arch Linux, I just installed JRE and JDK and all the proper bin files (javac and java) are in /opt/java/bin/

I simply compiled a standard hello world, and compiled it with javac running javac ./hello.java and that made a class.

Now my problem is running it. I run java ./helloworld.class and it gives me an error, even if the file I point java to is non-existant:

Exception in thread "main" java.lang.NoClassDefFoundError: //helloworld/class
Caused by: java.lang.ClassNotFoundException: ..helloworld.class
(..omitted for clarity..)
Could not find the main class: ./helloworld.class.  Program will exit.

You will notice the first line of the error, it munges the path //helloworld/class

When I feed java an absolute path, i.e java /home/foo/helloworld.class it gives the same error, but replaces the path’s / with . in the first line, again munged.

What do you think is wrong? I really don’t know why it is doing this..

  • 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-17T03:15:25+00:00Added an answer on May 17, 2026 at 3:15 am

    When you run java, you just pass it the fully qualified class name (including package), not the file name.

    java helloworld will look for helloworld.class.

    java helloworld.class will look for helloworld/class.class

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

Sidebar

Related Questions

Suppose I've got some Arch Linux installation which I'd like to distribute among students
I just installed Sphinx (distro: archlinux) downloading the source. Then I installed Thinking Sphinx
Recently I've migrated to Arch Linux, after ~4 years being loyal to Ubuntu. Everything
I am writing a small application with Qt 4.6 (64-bit Arch Linux, though that
i try to write a system call. I followed these steps: linux/arch/x86/kernel/syscall_table_32.S ----> .
I downloaded the Eclipse IDE for Java Developers Linux 32 Bit file from here
I have few years of exp on linux, mainly ubuntu (dual-boot). Now i am
Here is function that i am writing on 64 bit linux machine. void myfunc(unsigned
I have been trying to get Qt X11 cross compiled for PowerPC for a
Recently I have asked a question about what I should use to create self-contained

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.