File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes What is mean by corrupting of a file? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "What is mean by corrupting of a file?" Watch "What is mean by corrupting of a file?" New topic
Author

What is mean by corrupting of a file?

vijay jamadade
Ranch Hand

Joined: May 12, 2008
Posts: 241
Hi,

Sometimes the java files or class files in a deployed application just gives problems (don't know why) means that class file doesn't work. I heard from seniors that it is due to corruption of files. After again creating fresh class file and replacing that file the application again works.

Can you all please share your views on this or any personal experiences and solutions that you tried ?


Regards, Vijay Jamadade.
( Nothing is Impossible.)
Eduardo Bueno
Ranch Hand

Joined: Jun 04, 2009
Posts: 155
I've been working with java for one year. Never seen such matter. Maybe I need more time?
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12835
    
    5
Hardware malfunction or software malfunction can change anywhere from a single byte to an entire file and we call it a corrupted file.

My favorite is users who open a .class file with a word processor and save it back - not as common as it used to be fortunately.

Bill
Michael Angstadt
Ranch Hand

Joined: Jun 17, 2009
Posts: 274

I've never experienced this in my two years working with Java either.


SCJP 6 || SCWCD 5
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 40052
    
  28
William Brogden wrote:My favorite is users who open a .class file with a word processor and save it back - not as common as it used to be fortunately.
Can you open a .class file with a WP? I have had problems when I have done that with .java files, however.
Michael Angstadt
Ranch Hand

Joined: Jun 17, 2009
Posts: 274

Campbell Ritchie wrote:
William Brogden wrote:My favorite is users who open a .class file with a word processor and save it back - not as common as it used to be fortunately.
Can you open a .class file with a WP? I have had problems when I have done that with .java files, however.


I don't see why not. It would probably just treat it like a text file and display garbly-gook.
Fred Hamilton
Ranch Hand

Joined: May 13, 2009
Posts: 679
Campbell Ritchie wrote:
William Brogden wrote:My favorite is users who open a .class file with a word processor and save it back - not as common as it used to be fortunately.
Can you open a .class file with a WP? I have had problems when I have done that with .java files, however.


You can open just about anything in a wordprocessor, allthough it will liekly be gibberish. If you resave it, then the word processor adds it's own formatting codes to the file, and it will be useless. I suppose you might save the day if you reopen the file and choose the "Save as plain text" option, but thus is the reason why we prefer text editors to word processors for coding source files.

Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 40052
    
  28
It's easy enough to use a WP for coding, as long as you remember to tell it to save as text. But text editors (except possibly NotePad ) are still far better.
Fred Hamilton
Ranch Hand

Joined: May 13, 2009
Posts: 679
Campbell Ritchie wrote:It's easy enough to use a WP for coding, as long as you remember to tell it to save as text. But text editors (except possibly NotePad ) are still far better.


True enough, I kind of glossed over that point. I would have expected you'd know all about this, but you did mention above that you have had trouble opening .java files using a word processor, so I'm not sure what that was all about then. No matter.

And yeah like a fool I coded in Notepad for a couple of years, now that I've trie Notepad++ I'll never go back.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 40052
    
  28
I have had no problem opening .java files in a WP; it is closing them, and finding control characters appearing mysteriously that causes trouble.
Fred Hamilton
Ranch Hand

Joined: May 13, 2009
Posts: 679
Campbell Ritchie wrote:
William Brogden wrote:My favorite is users who open a .class file with a word processor and save it back - not as common as it used to be fortunately.
Can you open a .class file with a WP? I have had problems when I have done that with .java files, however.


I guess I misunderstood you here then.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 40052
    
  28
I obviously wasn't clear yesterday. Sorry.
Fred Hamilton
Ranch Hand

Joined: May 13, 2009
Posts: 679
Campbell Ritchie wrote:I obviously wasn't clear yesterday. Sorry.


no problem. I always think, and I imagine a lot of people are the same way, that once I start discussing something, then I should do what it takes to understand what the other guy is saying, and vice versa, even if it is rather trivial. cheers.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What is mean by corrupting of a file?