The Artima Developer Community
Sponsored Link

Java Answers Forum
NoClassDefFoundError

1 reply on 1 page. Most recent reply: Feb 14, 2003 12:11 PM by chad yu

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
emma

Posts: 2
Nickname: tigerlilly
Registered: Feb, 2003

NoClassDefFoundError Posted: Feb 13, 2003 2:13 PM
Reply to this message Reply
Advertisement
I am recieving the following error even when I run a simple HelloWorld application:
Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorld
I have recently reformatted my HD (Windows 98 OS) and have tried numerous changes the path in the autoexec to point to j2sdk1.4.1_01\bin. Each java program compiles fine, the error only arises when I try to run it. I don't want to hardcode a pointer to my folder where I'll be keeping my java, as I will be using a large number of classes with XML and SOAP. Would it be possible to do this (it's been so long since I had to install Java!!). Below is a copy of my autoexec file. Cheers
ps - I've been pointing it to the lib folder aswell and have tried it without %PATH%...nothing seems to work. I don't want to have to enter a load of classpath info into the cmd window as I'll be compiling and running through editors
(Windows 98 OS)

@ECHO OFF
SET BLASTER=A220 I7 D1 H7 P330 T6
SET SBPCI=C:\SBPCI
rem - By Windows Setup - LOADHIGH C:\WINDOWS\COMMAND\MSCDEX.EXE /D:CD1
PROMPT $P$G
PATH=C:\WINDOWS;C:\WINDOWS\COMMAND;C:\;C:\CDROM;C:\BRCD\COMMAND;C:\BRCD\BI N;C:\j2sdk1.4.1_01\bin;%PATH%

mode con codepage prepare=((850) C:\WINDOWS\COMMAND\ega.cpi)
mode con codepage select=850
keyb uk,,C:\WINDOWS\COMMAND\keyboard.sys


@SET CLASSPATH=C:\PROGRA~1\PHOTOD~1.1\ADOBEC~1


chad yu

Posts: 2
Nickname: rcln520
Registered: Feb, 2003

Re: NoClassDefFoundError Posted: Feb 14, 2003 12:11 PM
Reply to this message Reply
You need to set up you CLASSPATH to at least include the current dir . and some other common directories. Once the CLASSPATH is correctly set up, you will run your Java program successfully.

Flat View: This topic has 1 reply on 1 page
Topic: Free space of harddisk Previous Topic   Next Topic Topic: Class AWTAutoShutdown

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use