What Is Best Laptop For Running Java On Mac

Posted By admin On 15.02.22
Active3 months ago

So I'm trying to move a 'close' button to the left side when the user is on Mac and the right side when the user is on PC. Now I'm doing it by examining the user agent, but it can be too easily spoofed for reliable OS detection. Is there a surefire way to detect whether the OS on which the browser is running is Mac OS X or Windows? If not, what's better than user agent sniffing?

The best laptops for programming help inject zest and power into coding. Top programming laptops need the integrated capacity to hold up the weight of running up to 3 Virtual Machines if you are a veteran programmer. 32-bit browsers do not support Java 7 and later versions on the Mac platform Note that Apple has removed NPAPI plugin support in its Safari browser version 12, and therefore Java Plugin cannot be enabled in Safari browser version 12 and above. Since JDK 1.6, Java developers are able to access network card detail via NetworkInterface class. In this example, we show you how to get the localhost MAC address in Java. Since you are looking at writing java code, make sure you downlod the JDK, not the JRE. The current version of java is 8. Be aware all modern versions of java require an Intel mac.

106k23 gold badges204 silver badges249 bronze badges
6,42714 gold badges68 silver badges106 bronze badges

4 Answers

What Is Best Laptop For Home Use

The window.navigator.platform property is not spoofed when the userAgent string is changed.I tested on my Mac if I change the userAgent to iPhone or Chrome Windows, navigator.platform remains MacIntel.

The property is also read-only

I could came up with the following table


Mac Computers

Mac68KMacintosh 68K system.
MacPPCMacintosh PowerPC system.
MacIntelMacintosh Intel system.

iOS Devices

iPodiPod Touch.

Modern macs returns navigator.platform 'MacIntel' but to give some 'future proof' don't use exact matching, hopefully they will change to something like MacARM or MacQuantum in future.

To include iOS that also use the 'left side'

Since most O.S. use the close button on the right, you can just move the close button to the left when the user is on a MacLike O.S., otherwise isn't a problem if you put it on the most common side, the right.

11.1k9 gold badges67 silver badges88 bronze badges

It's as simple as that:

You can do funny things then like:

Benny NeugebauerBenny Neugebauer
30.3k17 gold badges159 silver badges159 bronze badges

Is this what you are looking for? Otherwise, let me know and I will remove this post.

Try this jQuery plugin: http://archive.plugins.jquery.com/project/client-detect


This is based on quirksmode BrowserDetect a wrap for jQuery browser/os detection plugin.

For keen readers:

And more code around the plugin resides here: http://www.stoimen.com/jquery.client.plugin/jquery.client.js

Tot Zam
4,4734 gold badges35 silver badges56 bronze badges
31.5k8 gold badges60 silver badges70 bronze badges

Let me know if this works. Way to detect an Apple device (Mac computers, iPhones, etc.) with help from StackOverflow.com:
What is the list of possible values for navigator.platform as of today?

What Is Best Laptop For Students


What Is Best Laptop For The Money

Not the answer you're looking for? Browse other questions tagged javascriptjquery or ask your own question.