According to the system requirements, even Java 7 requires Lion, but then I found this question: How to install java jdk 7 on Snow Leopard. Especially the answer stating that java 7 doesn't, in fact, require 10.7 and that this restriction can just be removed from the .pkg gives hope that it is possible to install even Java 8 on Snow Leopard. Any information on this?
The OS level requirements are "real" and shouldn't normally be circumvented. As to how real it is I cannot answer. Ultimately as system libraries are updated, and newer versions of JDK are compiled against them older systems won't be able to use parts of Java that use the newer functions in those libraries or even the libraries as a whole if the pointers/links have changed.
If you want to be absolutely sure Java will work on your system, you will need to compile it from source. But that is a massive pain on a Mac unfortunately. If you want to try anyway, check out the Mac Port Project over on OpenJDK.
Related
Apologies in advance. I know this is a basic question.
I am new to server administration. I am administering a server where the users do Java development.
They have a Java-based application and do development in Eclipse. Eclipse is 32-bit. The OS is 64-bit.
I recently updated the JDK and JRE on the server. I have both the 64-bit and 32-bit of each installed.
Eclipse ran into an error where it couldn't start after I had updated to the new JRE and JDK. So I took some advice online and updated the -vm path in the Eclipse .INI file to point to the new 32-bit JRE path. It now works.
I have two main questions:
Will updating the JRE and JDK EVER cause an issue with development, or as long as they can open up Eclipse and use at least one version of the JRE or JDK, they will be fine? I guess my fear is that they are going to develop in a certain version and the next version will cause issues down the line.
They develop in 32-bit Eclipse (not sure why they chose 32-bit) but their application runs with 64-bit Java (that is where the path points to for that installation). If something is developed in 32-bit Eclipse can it run with 64-bit Java? Side question: is there a certain advantage with developing with 32-bit Eclipse on a 64-bit system or is it personal choice?
Thanks a lot and cheers!
I guess my fear is that they are going to develop in a certain version and the next version will cause issues down the line.
Java 6 and 7 are end of life; Java 8 code should still be run when Java 9+ rolls out. I've not been aware of any backwards compatibility issues in recent years, it's only forward compatibility that doesn't work (running Java 8 compiled libraries with JRE 7).
They develop in 32-bit Eclipse (not sure why they chose 32-bit) but their application runs with 64-bit Java
The IDE and code run in separate processes. There's no harm in using the 64bit JDK with 32bit editor.
Eclipse 32 bits running on 64 bits JVM
Should I use Eclipse 32bits or 64bits on my new machine?
Will updating the JRE and JDK EVER cause an issue with development...
I believe it technically could render what you developed "obsolete" if you're initially using one JDK with some specs and change for another one with specs that are not "compatible" with what you built so far. By specs, I mean the libraries, tools, etc that the JDK contains. But I would say it would be unlikely that such problems occur. It personally never happened to me. I'd like to have someone with more knowledge give more details though and validate what I'm saying or correct me if I'm wrong.
If something is developed in 32-bit Eclipse can it run with 64-bit
Java?
To my knowledge, there are not related things. In my mind, Eclipse is just your IDE and it allows you to build/compile code using specific JDK (32 or 64 bits). As a matter of fact, you don't even need eclipse to build code but you definitely need a JDK: it's the JDK that give you the tools to compile code that "targets" a specific JRE/JVM and Eclipse is using the tools your JDK provide.
So yes, you can use eclipse 32 bits to build code for a 64 bits JRE.
I was trying to find a download for jdk 1.6 specifically for OS X. But Oracle doesn't seem to offer one. This made me wonder if the jdk 1.6 meant for Linux would work fine on OS X. I could try running it to see if it works. But I thought I'd check here to see if there are any subtle or not-so-subtle issues that I've missed.
I have an AMD-64 architecture on my mac system.
Java 6 for Mac is provided by Apple rather than Oracle, and can be downloaded from http://support.apple.com/downloads/#Java - look for the latest "Java for OSX", which at the time of writing is 2014-001.
I have just installed osx mavericks, and Java SE6 just disappeared from my system... anyway, I already have Java SE7 and I am happy with that, no need to reinstall Java SE6 since my NetBeans already works on Java7 and NetLogo too if I start it from terminal...
I am wondering how to tell the plist file of my NetLogo 5.0.4 to look for the JavaSE7 folder... any help much appreciated.
Best,
Simone
Answer
You might think that changing "1.5" to "1.7" in these Info.plist lines:
<key>JVMVersion</key>
<string>1.5+</string>
would work, but it doesn't. That's because Java 6 is from Apple but Java 7 is from Oracle, and "Apple java applications and Oracle's aren't executable compatible" (source).
Unless you want to mess with making a new NetLogo app bundle using Oracle's AppBundler tool, the simplest way to get the app running under Java 7 is to download the Linux version of NetLogo and use the supplied netlogo.sh launch script.
More info
When running headless, NetLogo has been tested thoroughly on Java 7. For headless runs, I definitely recommend Java 7 because it's faster.
The NetLogo GUI, however, hasn't been tested with Java 7. Once you get it launched, it will probably mostly work, but you might have problems or incompatibilities. We'll probably switch eventually (it's issue 197), but the work on that hasn't been done yet. That ticket would be a good place to record any problems that you find.
If you decide to fall back to Java 6, you can get it from http://support.apple.com/kb/DL1572 . (link is current as of October 2013)
If you're using Java < 1.7 on OS X and you need to use JSObject for connecting an applet to JavaScript, you can find it in in $JAVA_HOME/jre/lib/plugin.jar.
The "plugin.jar" archive doesn't seem to exist on Java 1.7 for OS X (as packaged by Oracle). There is a jfxrt.jar that seems to contain JSObject, but that unfortunately means that you can't use the same plugin.jar that you can on almost any other JDK, including 7u5 for Linux, which still has plugin.jar built right in.
In particular, this gets irritating if you're trying to use it as a compilation dependency for a build tool such as Maven, which you could otherwise do with a JAVA_HOME-relative path.
Java 7 on Mac OS X doesn't support the Java plugin. So, plugin.jar is simply not there. If you manage to find the Java 7 installation guide for Mac OS X on Oracle's website (good luck with that) you'll see:
Note that for the 7u4 release, Java plugin and Java Web start applications are not supported.
And, yes, 7u5 is out, but its release notes say it's just a bug and security fix. I'm assuming Oracle just didn't bother to update their installation notes. It looks like the 7u6 developer preview does include the plugin, so at least it's on its way.
The jfxrt.jar file is for Java FX, which is included in the Oracle Java 7 Mac OS X release. Of course, Java FX is built on top of Java applets and is intended to run via the Java plugin, so don't ask me why it would be included in Oracle's Mac OS X Java 7 release while the Java plugin itself isn't. (I guess you can build Java FX apps, you just can't run them?)
The real answer appears to be "don't use Java 7 on Mac OS X quite yet." Which may be one of the reasons Oracle extended the Java 6 EOL until November.
Plugin.jar is available on Java 7u6 for OS X, now available.
I am trying to debug a j2ee application in tomcat using Intellij Idea in an OS X 10.6.4 system. I need it specifically to run over a 1.5 JVM and 1.5 JDK so that the jgroups-all component doesn't crash the application through this error:
class: java.lang.ClassNotFoundException: [Lorg.jgroups.Address;
at com.opensymphony.oscache.plugins.clustersupport.JavaGroupsBroadcastingListener.initialize(JavaGroupsBroadcastingListener.java:119)
Has anyone needed to install an older version of JVM or JDK in OS X before?
NOTE: I'm a Mac newbie.
Thanks, everyone.
Well, as far as I know you should be able to choose an older VM in the Java control panel, although I think Apple removes old JREs by default now.
Did you consider Apple's Java Deprecation before starting you project? It looks like you will be out of luck in the near future. If Apple doesn't even want to support some recent JRE anymore it is unlikely that they will offer old, unsupported ones, which even Oracle ended support for.
Even if Oracle will provide some JRE/JDK for Mac OSX it is highly unlikely that they will back-port some Java 5 to Mac OSX. Your best bet is to migrate your application to a version which is supported first, before doing any other steps.
Try the solution here.