Why rename your .mozilla folder?
On Debian (Ubuntu and derivatives are based Debian), you will need to open a shell or terminal as root (elevate with sudo -s or use su). From there, do apt-get update to ensure you have a complete, current package list.
On Debian 8, I simply did: apt-get install default-jre icedtea-plugin. If Ubuntu has differing names for its packages, simply do aptitude search icedtea, etc. and request the packages that match your criteria instead.
Once the packages are installed, open Firefox. Open the Add-ons Manager. Go to Plugins, and change IcedTea (or Java) to "Ask to activate" or "Activate" to make the plugin active. The next time a site requests this plugin, you should see a plugin/lego badge and/or a popup asking to confirm it, depending on your plugin preferences.
If doing that still doesn't solve things, then first make sure you've synced your Firefox data, and reset Firefox. Then, remove and reinstall the above packages, and clear out your .mozilla, .firefox, and other related folders in your home folder (use Ctrl-H in Gtk filers or just to rm -rf .mozilla, etc. in a shell. Try again.
And if that doesn't work, then you will have to do whereis firefox, (the folder should be in /usr/lib, /usr/share, or /lib), and manually install the Java plugins yourself (guides are available elsewhere on the web for this). While it isn't recommended, if your system (browser) isn't seeing the plugins any other way, you'll have to do this.
Good luck; this should work, if not come close to solving your problem.