Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 241091
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T20:43:27+00:00 2026-05-11T20:43:27+00:00

I’m writing a Java applet to run differently under different hardware. For instance if

  • 0

I’m writing a Java applet to run differently under different hardware. For instance if I know a computer has a large amount of RAM but a weak processor, I can alter the balance of some time-memory trade-offs. Being able to discover the exact make and model of the CPU on which the applet is running could be helpful. Having such information would allow me to benchmark my software against different systems and find bottlenecks.

Generally what I’m looking for is:

  • Number of cores and/or processors
  • 32 bit vs 64 bit CPU
  • CPU Cache line size
  • Size of L1, L2, L3 cache
  • Set associativity of cache
  • Size of TLB
  • Exact Make/Model information on the CPU
  • FSB information
  • Amount of RAM
  • Amount of swap/virtual memory
  • The JVM in which the applet is being run
  • Operating System running JVM
  • System Load
  • Number of used/unused Kernal threads
  • Bandwidth of internet connection
  • Memory available
  • Graphics cards in use
  • If Operating System is being visualised
  • Network resource in use

Is any of this information baked into Java Applets. Are there libraries for finding any of this information? Applet benchmarking tools to discover/guess some of it? Any clever tricks you can think of?

Are their any aspects of computer hardware which are blocking. That is, could a Java applet detect that something is in use or unavailable by trying to access it and being denied (maybe a particular TCP port or graphics accelerator).

Disclaimer: I know that caring about the hardware goes against the Java ideology of not caring about the hardware. While comments point this out may be helpful for other readers that see this question, please note that such answers are not what I am looking for.

EDIT

Added additional information:

java.lang.management provides all sorts of information on the system which the JVM is running on.

java.lang.management.OperatingSystemMXBean provides:

  1. getAvailableProcessors() The number of available processors equivalent Runtime.availableProcessors()
  2. getSystemLoadAverage() The average load on the system the system load average for the last minute.

java.lang.management.ManagementFactory

  1. getGarbageCollectorMXBeans() returns a list ofGarbageCollectorMXBeans. Each GarbageCollectorMXBean can be queried for the following information:

    1. getCollectionCount() number of gc which have occured using this
      bean.
    2. getCollectionTime() approximate accumulated time elapsed
      between gc’s in milliseconds. (Note:
      The Java virtual machine
      implementation may use a high
      resolution timer to measure the
      elapsed time.)
    3. getName() the name of the memory manager.
    4. getMemoryPoolNames() the memory pools that this gc manages.
  2. getThreadMXBean() returns the ThreadMXBean which provides:

    1. getCurrentThreadCpuTime() Returns the total CPU time for the current thread in nanoseconds. If the implementation distinguishes between user mode time and system mode time, the returned CPU time is the amount of time that the current thread has executed in user mode or system mode.
  3. getRuntimeMXBean returns RuntimeMXBean
    1. getUptime() uptime of the Java virtual machine in milliseconds.
    2. getStartTime() start time of the Java virtual machine in milliseconds.
    3. getInputArguments() Returns the input arguments passed to the Java virtual machine which does not include the arguments to the main method.
  4. getCompilationMXBean returns the CompilationMXBean
    1. getName() the name of the JIT
    2. getTotalCompilationTime() time in milliseconds it took to compile your code.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T20:43:27+00:00Added an answer on May 11, 2026 at 8:43 pm

    The ones that are quite simple to obtain are the information accessible via the System.getProperties (or System.getProperty) method.

    For example, os.name will return the name of the operating system. On my system, I got the Windows XP as the result.

    Some information available by System.getProperties, which seems to be accessible by the applet include:

    • java.vm.version — version of the JVM.
    • java.vm.vendor — vendor name of the JVM.
    • java.vm.name — name of the JVM.
    • os.name — name of the operating system. (e.g. Windows XP)
    • os.arch — architecture of system. (e.g. x86)
    • os.version — version of the operating system. (e.g. 5.1)
    • java.specification.version — JRE specification version.

    The above is not a comprehensive list, but it can give some ideas about what the system is like.

    It should be noted that not all properties that are available through the System.getProperties can be read, as for some properties, the security manager will cause an AccessControlException. When I tried to read the java.home property, an exception was thrown.

    To obtain those properties which cause a AccessControlException by default, one would probably would have to be steps taken to give permissions to the applet to perform some of those information. (Here is a link to the Security Restrictions section of the Lesson: Applets from The Java Tutorials.)

    The Runtime class can provide information such as:

    • Number of processors (or cores, or logical threads, presumably) available to the JVM by the Runtime.availableProcessors method.
    • Java virtual machine’s memory information, such as freeMemory, maxMemory, and totalMemory.

    Beyond the information provided by the default System and Runtime classes would probably require making calls to the operating system, which would be platform-dependent.

    Edit

    The Getting System Properties page from Lesson: Applets of The Java Tutorials provides a list of properties which can be read, and a list of properties that cannot be read by applets.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 209k
  • Answers 209k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I ended up adding 20px to the view's frame height.… May 12, 2026 at 9:51 pm
  • Editorial Team
    Editorial Team added an answer You must return a Collection of javax.faces.model.SelectItem List list =… May 12, 2026 at 9:51 pm
  • Editorial Team
    Editorial Team added an answer I usually start with Module::Starter. It comes with a pretty… May 12, 2026 at 9:51 pm

Related Questions

I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
In order to apply a triggered animation to all ToolTip s in my app,
I have a French site that I want to parse, but am running into
I have text I am displaying in SIlverlight that is coming from a CMS

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.