File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What is mean by corrupting of a file?

 
vijay jamadade
Ranch Hand
Posts: 243
1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ?
 
Eduardo Bueno
Ranch Hand
Posts: 155
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13048
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 277
Eclipse IDE Java PHP
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've never experienced this in my two years working with Java either.
 
Campbell Ritchie
Sheriff
Pie
Posts: 47300
52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 277
Eclipse IDE Java PHP
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 684
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 47300
52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 684
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 47300
52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 684
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 47300
52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I obviously wasn't clear yesterday. Sorry.
 
Fred Hamilton
Ranch Hand
Posts: 684
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic