Using jZMQ binding with Java SDK 6 instead of 7 - osx-mountain-lion

I'm trying to get ZeroMQ http://www.zeromq.org/ running with the following configuration / requirements:
OS X 10.8 with built in Java SDK 7
Java binding for ZMQ
Need to use SDK 6
Apparently jzmq was compiled with the header files of Java SDK 7, but I really need to have them compiled with the header files of SDK 6. That's because I want to use http://jmonkeyengine.org/ which currently supports only SDK 6.
So my general question is, how to get this working or maybe just a hint where to obtain the SDK 6 header files and how to compile jzmq with them.

I'm one the maintainers of the JZMQ ZeroMQ binding.
I would post an issue here: https://github.com/zeromq/jzmq/issues?state=open and I'll be sure to cut a new release soon that is built with Java6.

Related

Trouble installing Cytoscape : App store not reachable

I have troubles installing Cytoscape.
All started from the common "The JVM could not be started" error. Hence, I downloaded the debugging "Windows.bat" script that yielded the following results :
Cytoscape System Requirements Checker for Windows
Target Cytoscape version: 3.7.2
Your Windows version is:
Microsoft Windows [version 10.0.18362.720]
Java is installed
Your system is 64 bit
Your JAVA_HOME is set to C:\Program Files\Java\jdk-14
Your Java version is at least version 8 as required
Your Java version is no higher than version 8 as required
Your Java is 64 bit as recommended
Problem: The "app" store at apps.cytoscape.org is not reachable with a timeout of 30000ms
Summary
Your system has some issues.
Please fix those and re-run this script again:
- App store at apps.cytoscape.org is not reachable
Then, it tries to determine the itinerary but stops around the 17-18 step.
Thanks a lot for your time !
Actually, you have a different problem... Cytoscape 3.7.2 is only supported on Java 8, and you have Java 14 installed. Cytoscape 3.8 (release is imminent) will support Java 11, but not Java 14. Getting the correct Java installed should allow you to run Cytoscape. The app store problem might be transitory. I would suggest trying Cytoscape 3.8 before going too far out of your way to try to debug this. We intend to release Cytoscape 3.8 today or tomorrow...
-- scooter

Can Java 7 use Apple Java Extensions?

In order to help Java apps look more like native apps when run on Mac OS X, Apple created the Apple Java Extensions in order to make Java apps behave more like Mac OS X. These allow for things like handling the behavior of the "About" menu and supporting drag and drop onto the application icon.
However, I can't find anything indicating whether or not these extensions are included with Java 7 or even usable with Java 7. It is my understanding that Apple merged their OS X implementation into OpenJDK, but I'm not sure whether these extensions went with it. I do see that the goal for the Mac OS X port of OpenJDK aims to "Include a complete, native Cocoa-based UI Toolkit", but I can't find much about what this entails. Searching the web has not proved very fruitful and I have no idea about if they are compatible with Java 7 or are even included.
So I guess I have three questions:
Will a Mac running Java 7 be able to use the Apple Java Extensions?
Are they included in Java 7, and if not, can I download them to bundle into my app?
Are there any alternatives to these extensions that are Java 7 compatible?
Will a Mac running Java 7 be able to use the Apple Java Extensions?
Yes. They are included both in the Oracle distribution and in OpenJDK. See the second answer here below.
I can't vouch for the complete API as I only need a subset to support drag-drop behaviour on the app icon and on the app frame. I can confirm though this works as expected with OpenJDK 7. No problems on the distribution side either, as the app is on sale on the Mac App Store.
Are they included in Java 7, and if not, can I download them to bundle into my app?
They are included in OpenJDK 7, you can find the sources in /src/macosx/classes/com/apple and supported by Oracle as hinted by the messages and bug fixes readable on the macosx-port-dev mailing list.
They are also included in the Oracle distribution, unjar rt.jar to see them.
You don't have to download anything, just start using them in your editor:
Are there any alternatives to these extensions that are Java 7 compatible?
Not that I know of, but I doubt you need an alternative.

precaution to be taken to support Xcode 4 framework/library on 10.3.9

I have requirement to create cocoa framework/Libarary in Xcode 4 and support it on 10.3.9.I know it was 10 years older mac.But It is the requirement.
I have gone through the apple's sdk compatibility guide,document was saying that if we set the deployment target to 10.4,unconditionally it will work on 10.3.9 version.I did not understand what is "unconditionally" refers here.
If I need to be supported on 10.3.9,What precautions I need to be taken.Any help would be appreciated.
If your version of Xcode doesn't have a 10.3 SDK, then it will be very hard for you to avoid accidentally using APIs and features which aren't available on 10.3.9. Setting the deployment target makes it so that your program may load on 10.3.9 – the executable won't use dynamic loader commands which are unknown to the loader on 10.3.9 and any references to symbols that aren't available on 10.3.9 will be weak references – but it doesn't mean it will run.
In order to run without crashing, you have to avoid actually dereferencing any of those weak-linked symbols or calling any unavailable methods. The only reliable way to avoid that is to get the compiler's help, but that's only possible if you have the appropriate SDK, which isn't available in Xcode 4. (Honestly, I don't know when a 10.3 SDK was last available.)
Finally, it is folly to try to support a deployment target if you can't test on that platform. You need a machine running 10.3.9. If you have that, then you can use the version of Xcode native to that version of the OS. You can have a code base that can be built in either environment using conditional compilation, although the Xcode project files themselves aren't compatible.

Java 7 installer for Mac/Windows

I am programming software in Java 7. The users of the software are not all up to date (especially the Mac users). Therefore I need an installer (Windows/OSX) that can be easily integrated with the software installation. There is a normal installer for Windows 7 so I am especially focused on finding one for the Mac. Bonus points if it can check for XCode and other requirements too).
I am thinking another option would be to just use some of the libraries from Java 7 (for example the file-system library). However, I think this might not be possible due to the version number in the compiled classes? I couldn't use a Java 6 compiler to compile these libraries either (because they are Java 7 code).
I don't think I am the only one with this problem. There must be a solution somewhere, but I haven't found it.
Any help would be appreciated.
For the best user experience I would recommend using PackageMaker to create a .pkg file which you can then give to your Mac users. That allows them to do a single click-to-install of your app.
Within the package you would bundle your app archive (JAR file), any necessary resources and two scripts, one to check for the existence of Java 7 on the target system, and the other to install it if not found. I would recommend bundling the latest version of OpenJDK7 with your pkg, at least until an official Java 7 SDK is released for the Mac.
JAva 7 is not yet officially supported on Mac OS X, if you are looking for a JAva 7 installer for mac Os X take a look at openjdk-osx-build project on Google Code.
Update: You shouldn't need Java 7 for what your doing.
A better solution is to use Java 6 + Third party JNI libraries (i.e: JNotify,JavaXT...)
Directory listener in Java using JNotify
as for Last Accessed Date you might need to write tiny bit of Objective-C and pass it back via JNI
JNI Development on Mac OS X
Mac OS X already comes with Java runtime on Snow Leopard (JRE6)
On Lion it will automatically download JRE6 if application needs it's
You can of course download preview release of JDK7 from Oracle, but remember this is preview software there are some parts still not working yet (for example: Java Web Start)
Oracle JDK7u4 Mac OS X Port Developer Preview Release
Edit: Oracle JDK 1.7 Preview Release only supports Mac OS X Lion

Does Apple support Java 6 yet?

A while back I released an application in Java. While I targetted it for Java 6, I realized that there was a significant Macintosh user base. At the time, Apple had not gotten around to creating a JRE 6 for their users, so I had to make the application compatible with both Java 5 and 6.
Now I've returned to that project and realize that I can't support those users any more; Sun won't let me download the JDK 5 anymore because it's end of life. So I'm caught at a crossroads; as far as I can tell, PPC Mac users still don't have a JRE 6 to use.
So I ask this question: How do I resolve this predicament? I still want to support those users, but I simply don't have a JDK with which to build. Has Apple released a JRE 6 for their PPC users? Is there an alternate way to get JDK 5 (other than becoming a business member of Sun)? Is there some alternative recommendation to supporting these users?
Regards,
-- Shirik
EDIT: Some additional info, if Apple has released Java 6 for PPC, how easy is it to get? I ask this because I'm still constantly seeing logs from my users which indicate PPC architecture with a Java 5 VM.
You could use -target 1.5 -source 1.5 with your Java 6 JDK, to generate 1.5-compatible class files.
You can download Java 5 from Sun. You just have to look in the right place.
http://java.sun.com/javase/downloads/previous.jsp - J2SE 5.0, 1.4.2, 1.3.1
http://java.sun.com/products/archive/ - all releases going back to JDK 1.1
Note that these are all existing public releases. The material you got from Sun would have said there would be no new public releases of Java 5.0. They were pointing out that if you needed patches for recently discovered security issues and other bug fixes for Java 5.0 etc, you would have to pay for them.
Obviously, JDKs for Apple platforms are not available from Sun, but this is nothing to do with the fact that Sun have "end-of-lifed" Java 5.0. The fact is that they have never been available from Sun ...
Having said that, in the long term you need to be able to migrate your application to Java 6.0, 7.0 (due out later this year) and so on. At some point you are going to have to draw the line and say "sorry ... no more updates" for the shrinking number of users with old PPC and 32-bit Intel Macs.
As far as I know, Apple has only released Java 6 for x86-64, and I'd be willing to bet my hat that they will never release Java 6 for either PPC or for plain old 32-bit x86 (note that every Mac released after about mid-2007 or so is x86-64).
Soylatte might work (I have not tried it myself).
If you want to support older platforms, including PowerPC macs, it is a good idea to write code that can run on older Java releases. These days Java 5 is a relatively safe bet, but you may want to go even further and e.g. use retroweaver to generate Java 1.4.
You can download a version of the OpenJDK 1.7 from intricatesoftware.com
it is, unfortunately, a headless build of the JDK; i.e., can't open a display, and hence can't use to run IntelliJ, but Eclipse runs on it just fine.
I'm running it on 10.5.8, on a PPC ("cheese grater",) with Eclipse 4.3.2 / Kepler, and it all seems to work fine. :-)
(though, in honesty, a new configuration on the box, so we'll see how it goes over time)

Resources