Installed Java on desktop and all my my documents disappeared. How do I fix?

I'm going to assume you're talking about Windows.

I assumed that it was an app like google chrome, and this way I could quickly click on it

Chrome is almost certainly not actually installed to your desktop, it just puts a shortcut there. The actual application files should live somewhere like C:\Program Files\Google\Chrome and are huge. Java should also be installed somewhere under Program Files for most users.

So I think you're saying that you've set the actual install location to the desktop? Programs generally assume that they "own" the directory they are installed to, and they must be installed to separate locations. If you try to install something to a directory which already has contents the installer will likely warn you of the problem, and if you tell it to go ahead anyway it may well erase the current contents of that directory. Does that sound like what might have happened?

Unless the installer was kind enough to move your files to the Recycle Bin rather than just delete them completely then I'm afraid you're probably not going to get them back, but you can always look into data recovery software.

/r/java Thread