Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

Java Speed Tester Applet

speed test speed broadband

  • Please log in to reply
4 replies to this topic

#1 isuru

isuru

    CC Addict

  • Advanced Member
  • PipPipPipPipPip
  • 249 posts

Posted 06 November 2012 - 08:09 AM

Hi!

I saw an applet created to test download speed. But I'm confused how to achieve that. You can go to this url and check it out. It's a government website. I thought java has no support like ping, traceroute.
  • 0
Lost!

#2 gregwarner

gregwarner

    Obi Wan of Programming

  • Expert Member
  • PipPipPipPipPipPipPip
  • 1586 posts
  • Location:Arkansas
  • Programming Language:C, Java, C++, C#, PHP, Transact-SQL

Posted 06 November 2012 - 08:51 AM

Java has something called the JNI (Java Native Interface), which allows it to call libraries written in the host's native code. That's probably how they're doing it.
  • 0

ti-99-sig.png
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
– Douglas Hofstadter, Gödel, Escher, Bach: An Eternal Golden Braid


#3 isuru

isuru

    CC Addict

  • Advanced Member
  • PipPipPipPipPip
  • 249 posts

Posted 06 November 2012 - 10:24 AM

Java has something called the JNI (Java Native Interface), which allows it to call libraries written in the host's native code. That's probably how they're doing it.


Hmm.... Yeah, I think that is the only way. But using JNI restricts system Independence, right?
  • 0
Lost!

#4 gregwarner

gregwarner

    Obi Wan of Programming

  • Expert Member
  • PipPipPipPipPipPipPip
  • 1586 posts
  • Location:Arkansas
  • Programming Language:C, Java, C++, C#, PHP, Transact-SQL

Posted 06 November 2012 - 10:42 AM

Yes, but if you absolutely must have native access to the host, you're gonna be sacrificing platform portability anyway, so it should only be used when there is a very good reason to do so.

You can, however, write multiple libraries, one for each platform, and have Java detect the platform and load the appropriate library at runtime.
  • 0

ti-99-sig.png
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
– Douglas Hofstadter, Gödel, Escher, Bach: An Eternal Golden Braid


#5 lethalwire

lethalwire

    while(false){ ... }

  • Senior Member
  • PipPipPipPipPipPip
  • 766 posts
  • Programming Language:C, Java, PHP, JavaScript
  • Learning:PHP

Posted 07 November 2012 - 09:51 AM

Are you sure you're wanting to use the java applet route? With so many security issues in java right now, I leave all of my java plugins disabled and I'm sure many others do too.
  • 0





Also tagged with one or more of these keywords: speed test, speed, broadband

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download