- no server-side
- no third-party
Sounds like you are "stuck" with what you have already provided. Your script actually got me curious because on first glance it did seem you were mixing server and client (java and javascript) + all the comments pointed to it. But curiosity is good thing :)
Apparently, though not really reliable you can call Java methods in supporting browsers. Java is client side too (the concept that was lost).
I will copy and paste this, I've never tried (because I've never been limited the same way as you are):
if (java && java.net)
ip = ''+java.net.InetAddress.getLocalHost().getHostAddress();
else ip = 'unknown';
Taken from About.com - which also describes what you need to do to at least give it a chance to work (upload, can't do it from local).
UPDATE:
Forget it. I'm not a java guy (in the first place), as @Esailija has noted, the script above will not (no longer) work:
2.1.5 Deprecated Functionality: the Global Packages, java and netscape Keywords
The Mozilla family of browsers has historically provided
support for access to the Java language from JavaScript even on web
pages that don't contain Java applets. In this browser family, there
are global java, netscape and Packages keywords available to
JavaScript code which allow calling static methods, accessing static
fields, and creating new instances of Java classes in similar fashion
to the per-applet Packages keyword above.
The semantics of these keywords becomes problematic when more than one
applet is available on the web page. If you want to access one
particular applet's user-defined classes (for example, in a
com.mycompany package), how would the global Packages keyword know
which applet to refer to? The new Java Plug-In also supports attaching
more than one Java virtual machine instance to the web browser for
executing applets. The semantics of these global keywords becomes even
more complicated in this situation.
For this reason, the global java, netscape and Packages JavaScript
keywords are deprecated. They continue to function in the Firefox
browser, but it is strongly recommended to transition existing code
using them to use the new per-applet Packages keyword. It is not
possible to access user-defined classes using these global keywords;
attempts to do so will yield undefined results.
Reference here