Solved

Exception in thread "main"

Posted on 2003-10-30
4
268 Views
Last Modified: 2012-05-04
Experts,
When running my java program I get the following error:
' java.lang.NoClassDefFoundError: reversePolishCalculator
 Exception in thread "main" '

How can I fix it?

kepkeakdi
0
Comment
Question by:keokeakdi
  • 2
4 Comments
 
LVL 5

Expert Comment

by:lwinkenb
ID: 9648777
add the directory that reversePolishCalculator.class is in to your classpath.
0
 
LVL 5

Assisted Solution

by:lwinkenb
lwinkenb earned 45 total points
ID: 9648800
set CLASSPATH=<path to class file>
0
 
LVL 35

Accepted Solution

by:
TimYates earned 40 total points
ID: 9648942
java -cp . reversePolishCalculator

or something

assuming you are trying to run reversePolishCalculator
0
 
LVL 8

Assisted Solution

by:Exceter
Exceter earned 40 total points
ID: 9650930
A slight variation: you can also try adding ;.; to the end of your classpath.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question