dukehazord, you make a confusing question, the title was how to compile "java" file, while inside, it looks like you want to compile "javascript" (.js) and not "java" (.java) files.
Don't be fooled by the similar names, java and javascript are very different beasts, javascript was initially named "livescript", but was renamed "javascript" to benefit the hype around java at the begining of the Internet bubble time.
So, back to javascript, the company named Netscape who invent it used to compile javascript to kind of bytecode class file (livewire technology) but that was on the server side only, and I doubt is is used anymore today.
Since that time, there has been several open source projects around javascript, at least one of these allowing to compile javascript
: rhino (
http://www.mozilla.org/rhino/overview.html).
More generally, there is no reason for a language to be either only "interpreted" or only "compiled", it is IMHO always possible to write both an interpreter and an compiler for any programming language.
Not to mention Java, which first compile to a generic bytecode interpreted by a virtual machine that compile again parts of this bytecode on the fly to faster native CPU code ...
PS: pravin_vin2003, your posting is slightly off topic and in the wrong forum too I guess, my advice anyway is for you to restore your lost partition from your last backup ...