473,486 Members | 2,424 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

class not found exception

14 New Member
how can i get rid of the class not found exception
May 26 '07 #1
2 993
JosAH
11,448 Recognized Expert MVP
how can i get rid of the class not found exception
Make sure the jvm can find your classes (check out the "-classpath" flag) and
put your .class files in the correct directories (or .jar files).

kind regards,

Jos
May 26 '07 #2
blazedaces
284 Contributor
Make sure the jvm can find your classes (check out the "-classpath" flag) and
put your .class files in the correct directories (or .jar files).

kind regards,

Jos
Just a quick note about this since I had very much trouble understanding how to figure out things about the classpath when I first started out... what OS are you using?

You may be using Windows (for some older versions of windows this is not true) in which case you might be using a program like JCreator to edit the code. In that particular program, you would go to options under configure (I think that's where it is), and then click on JDK profile on the left... edit... add path or add archive (NOTE: .jar files are archives, they are the same as .zip files).

If you're using command prompt to run your code though, you need to go to Controll Panel<<System<<Advanced Tab<< Click on button on the bottom called Environment Variables

Now you need to add a new "System Variables" (not user variable) called CLASSPATH

And it would say something like CLASSPATH=path1;path2;etc.

For more information go to http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/classpath.html

Jos, I may be wrong, but if he simply forgot to import something, couldn't that also cause it to say class not found exception, like if you didn't import something simple like java.util.*;? I may be wrong

Good look either way,

-blazed
May 26 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
2020
by: dinks | last post by:
Hi, I'm new to C++ and have been assigned a task which i dont completely understand. Any help would be greately appreciated. Here is the problem: The class "linkedListType" use the "assert"...
4
5605
by: Rahul Anand | last post by:
Getting SQL Exception when trying to implement Connection based Trasaction using SQL Helper class. I am using the follwing function to execute my stored procs: -=-=-=- ExecuteScalar(ByVal...
5
3392
by: Nick Flandry | last post by:
I'm running into an Invalid Cast Exception on an ASP.NET application that runs fine in my development environment (Win2K server running IIS 5) and a test environment (also Win2K server running IIS...
0
3196
by: Daniel Sélen Secches | last post by:
I found a good class to do a simple FTP. Very good.... I'm posting it with the message, i hope it helps someone ============================================================== Imports...
1
7074
by: Jim | last post by:
Have fully operational software package developed on VB.NET that worked until Jan 1 2003, with early stage deployments on Oct 10, Oct 23, Nov 11, Dec 12 and Dec 30. When attempted final...
0
1445
by: Nol | last post by:
Hi all, My webservice throws an exception, which is translated into a soap Fault in the soap message body. See below for the actual message format as it is send by the server. On the (dotNet)...
12
2503
by: mast2as | last post by:
Hi everyone... I have a TExceptionHandler class that is uses in the code to thow exceptions. Whenever an exception is thrown the TExceptionHander constructor takes an error code (int) as an...
0
1390
by: dfa_geko | last post by:
Hi All, Just had a question about the RSACryptoServiceProvider class. I'm kind of a newbie at this. In the following code at the end of the message, does the key get stored in the User...
4
2120
by: vasavimaruthi | last post by:
hi, i got class not found exception of a small jdbc program in windows. the program is like this import java.sql.*; public class Db1 { public static void main(String a)...
11
6221
by: Rafe | last post by:
Hi, I'm working within an application (making a lot of wrappers), but the application is not case sensitive. For example, Typing obj.name, obj.Name, or even object.naMe is all fine (as far as...
0
7100
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7126
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7175
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6842
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7330
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5434
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
1378
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
598
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
262
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.