File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes General Computing and the fly likes class not found error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » General Computing
Bookmark "class not found error" Watch "class not found error" New topic

class not found error

Kene Francis

Joined: Aug 25, 2004
Posts: 3
Hello everyone. I really think this is a very great place to talk about java. I have this problem anytime i'm compiling, i have to save the name of my program as "". Please, i would like to know how i can solve this problem. Thank you very much for your assistance.

The secret to success is constancy to purpose.
Nguyen Ngoc Giang

Joined: Aug 31, 2004
Posts: 1
What IDE are you using? In Java, your filename must be the same with your public class. Should you check whether your IDE set your classname by default ?
Carl Wilburn

Joined: Jun 17, 2004
Posts: 9
are you having the problem when you are compiling or when you are attempting to execute the program after compiling? class not found errors usually come during the execution process using the java interpretter.

can you cut/paste the exact command and error you are getting into a note?

Live, learn and do!
Kene Francis

Joined: Aug 25, 2004
Posts: 3
The filename is always the same with my public class. The problem really is that anytime i have to save my programs, they have to be between qoutes. For example: "" . If i don't do it this way, i'll receive error when compiling, and if i check the icon it's with the extension .txt instead of .java. Besides that though, they run compile and run perfectly. Thank you very much for your assistance.
fred rosenberger
lowercase baba

Joined: Oct 02, 2003
Posts: 11955

are you using Notepad? if so, when you save, there are two (maybe 3) boxes at the bottom. one is the filename, the other is the file type. if the type is set to ".txt", Notepad appends that to the end of the name, unless you put it in double quotes (which sounds like what you're saying.

if you change that bottom box to "all files" (or whatever), then you don't have to use quotes.

There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Nick George
Ranch Hand

Joined: Apr 04, 2004
Posts: 815
A minor subnote... convention calls for classes to be capitalized, thus, as opposed to

I've heard it takes forever to grow a woman from the ground
Dirk Schreckmann

Joined: Dec 10, 2001
Posts: 7023
Welcome to JavaRanch, Kene!

Your problem possibly surrounds a "feature" of the Windows operating sytem, where it hides file extensions from you because it thinks you're now bright enough to understand them.

Follow these steps to turn off this feature, if you like:
  • Open any Windows explorer (not internet explorer) window.
  • In the "Tools" menu, select "Folder Options..."
  • In the "View" tab of the "Folder Options" window, deselect the "Hide extensions for known file types" option.
  • Click "Apply"
  • Click "Apply to All Folders"
  • Success?

    [How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
    Dirk Schreckmann

    Joined: Dec 10, 2001
    Posts: 7023
    Moving this to the General Computing forum...
    I agree. Here's the link:
    subject: class not found error
    It's not a secret anymore!