Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > Java Basics
Java Basics General beginning Java language questions that don't fit in one of the more specific forums. Please specify what version.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Java Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old June 8th, 2006, 07:15 AM
Registered User
Join Date: Jun 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Exception in running a program

Hello Friend

I have written the following hello world program it compile perfectly but when i try to run the same it give the exception
Exception in thread "main" java.lang.NoClassDefFoundError: HELLO

The Program is

import java.io.*;
class HELLO

        public static void main()
                System.out.println("Hello World");



i Compiled as javac HELLO.java
and run as java HELLO

Old June 10th, 2006, 02:15 AM
Registered User
Join Date: Jun 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts

edit as
public static void main(String args[])

and code is OK

it seems you have path setting problem
with java launcher

Old June 21st, 2006, 10:39 PM
Authorized User
Join Date: Dec 2005
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts

Just take a look at "java Exceptions tutorial"

JAVA Printer

Similar Threads
Thread Thread Starter Forum Replies Last Post
Running a program off the network? myurick Visual Basic 2008 Essentials 4 April 3rd, 2008 02:22 PM
Exception Error While Running XSL.Files RICHBIRD XSLT 1 June 15th, 2006 02:58 AM
running another .exe from my program salhabb C++ Programming 1 January 18th, 2006 06:21 AM
Exception while running BMP ramko J2EE 0 August 5th, 2003 05:27 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.