Java 7 and 6 on Mac OS X 10.8.2?

Questions and Answers on installation, deployment, management, locking, tranasactions of Servoy Application Server

Java 7 and 6 on Mac OS X 10.8.2?

Postby tgs » Thu Jan 17, 2013 11:41 am

Hi,

on my Mac with OS X 10.8.2 was installed Java 1.6.0_37.
Today I have installed the jdk-7u11-macosx-x64.dmg from the Oracle downloads site without an uninstall of the Java 6 version.
If I check now the Java version by Terminal with the command "java -version" I get the output:
Code: Select all
java version "1.7.0_11"
Java(TM) SE Runtime Environment (build 1.7.0_11-b21)
Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode)

But the Servoy Server Status of servoy-admin shows:
Code: Select all
JVM Information
java.vm.name=Java HotSpot(TM) 64-Bit Server VM
java.version=1.6.0_37
java.vm.info=mixed mode
java.vm.vendor=Apple Inc.

I don't understand this issue. Is it possible to switch between the Java versions or do I have to uninstall the Java Version I don't want to use?

Regards
Thomas Schnaus
SAN Developer
yomotec GmbH
User avatar
tgs
 
Posts: 886
Joined: Wed Oct 04, 2006 12:05 pm
Location: Germany

Re: Java 7 and 6 on Mac OS X 10.8.2?

Postby tgs » Mon Feb 04, 2013 10:54 am

Could it be that the Servoy 6.1.3 developer is automatically and exclusive running with Java 6??

Because if only Java 7 is installed on a Mac OS X 10.8.2, I get the error that the servoy.app will run only with Java SE 6 runtime!?

Regards
Thomas Schnaus
SAN Developer
yomotec GmbH
User avatar
tgs
 
Posts: 886
Joined: Wed Oct 04, 2006 12:05 pm
Location: Germany

Re: Java 7 and 6 on Mac OS X 10.8.2?

Postby david » Mon Feb 04, 2013 4:20 pm

Check out the "requiredJavaVersion=1.6" from the servoy.ini file:

Code: Select all
-clean
-startup
../../../plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
--launcher.library
../../../plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64_1.1.101.v20120109-1504
--launcher.XXMaxPermSize
256m
-vmargs
-Dnativeswing.interface.inprocess.useExternalSWTDisplay=true
-Dnativeswing.dependencies.checkVersions=false
-Dsun.awt.disableMixing=true
-Dosgi.requiredJavaVersion=1.6
-Xms80m
-Xmx1024m
-XX:MaxPermSize=512M
-XstartOnFirstThread
-Dorg.eclipse.swt.internal.carbon.smallFonts


Right-click the Servoy developer app icon and choose "show package contents". You'll find this file in "Contents/MacOS/servoy.ini".

It's just a settings file so it's ok to monkey with the contents. We haven't tried Java 7 out yet ourselves so would be interested in what it takes to get working if you figure it out.
David Workman, Kabootit

Image
Everything you need to build great apps with Servoy
User avatar
david
 
Posts: 1727
Joined: Thu Apr 24, 2003 4:18 pm
Location: Washington, D.C.

Re: Java 7 and 6 on Mac OS X 10.8.2?

Postby rioba » Tue Feb 05, 2013 10:59 am

The servoy.ini file installed in my Mac OS X 10.8.2 doesn't have the "requiredJavaVersion=1.6" line. This is it
-startup
../../../plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
--launcher.library
../../../plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64_1.1.101.v20120109-1504
--launcher.XXMaxPermSize
256m
-vmargs
-Xms40m
-Xmx1024m
-XX:MaxPermSize=256M
-XstartOnFirstThread
-Dorg.eclipse.swt.internal.carbon.smallFonts

I however added the requiredJavaVersion=1.7 line but Servoy Developer still refuses to run if no Java 6 is installed
rioba
 
Posts: 242
Joined: Mon Aug 08, 2005 4:26 pm

Re: Java 7 and 6 on Mac OS X 10.8.2?

Postby tgs » Tue Feb 05, 2013 11:34 am

@David thank you, but the same for me like @rioba has posted.

At this moment, I don't think Servoy is running multiplatform as well.
I have so many trouble to get the customers solutions running on their Macs, but I believe the Servoy guys do their best and Apple causes the problems, or?

Regards
Thomas Schnaus
SAN Developer
yomotec GmbH
User avatar
tgs
 
Posts: 886
Joined: Wed Oct 04, 2006 12:05 pm
Location: Germany

Re: Java 7 and 6 on Mac OS X 10.8.2?

Postby troy » Tue Feb 05, 2013 8:05 pm

Theoretically this servoy.ini file should work (with the line following vm pointing to the path for your JDK):

Code: Select all
-startup
../../../plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
--launcher.library
../../../plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64_1.1.101.v20120109-1504
--launcher.XXMaxPermSize
256m
-vm
/Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home/bin/java
-vmargs
-Dosgi.requiredJavaVersion=1.7
-Xms40m
-Xmx1024m
-XX:MaxPermSize=256M
-XstartOnFirstThread
-Dorg.eclipse.swt.internal.carbon.smallFonts

See http://wiki.eclipse.org/Eclipse.ini for more details.

However, there is a bug with Eclipse where specifying the vm doesn't work on Macs. For the record, it seems more like a by design decision to me. Either way you cut it, specifying the vm in this way will not work on Mac OS X.

About a year ago, I played around with getting Servoy Developer to use the JDK from Oracle and this answer helped:
http://stackoverflow.com/questions/10352715

One thing to remember if you go this route is that neither servoy.ini or Info.plist are used with this setup. So you'll need to add the missing java-related lines from both.

Here is the servoy.sh file that worked for me:
Code: Select all
#!/bin/sh
#

export JAVA_HOME=/Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home
LAUNCHER_JAR=../../../plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
LAUNCHER_LIB=../../../plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64_1.1.101.v20120109-1504

java \
-showversion \
-XX:MaxPermSize=256m \
-Xms40m \
-Xmx512m \
-Xdock:icon=../Resources/servoy.icns \
-XX:+UseParallelGC \
-XstartOnFirstThread \
-Dorg.eclipse.swt.internal.carbon.smallFonts \
-Dnativeswing.interface.inprocess.useExternalSWTDisplay=true \
-Dnativeswing.dependencies.checkVersions=false \
-Dsun.awt.disableMixing=true \
-Dosgi.requiredJavaVersion=1.6 \
-jar $LAUNCHER_JAR \
--launcher.library $LAUNCHER_LIB


Although I met with some success at the time, I didn't wind up actively using it because Eclipse 3.6 (the version used in Servoy 6) was pretty unstable with Java 1.7 on the Mac. I'm trying to get it to start up now and I can't; probably I updated the JDK since then or something. In any event, I'd be interested to know if you're able to get this working.
Troy Elliott, Data Mosaic

Image
Everything you need to build great apps with Servoy
U.S. demo server
Blog: Coding Nomad
User avatar
troy
 
Posts: 27
Joined: Fri Oct 24, 2003 8:49 pm
Location: Washington, DC

Re: Java 7 and 6 on Mac OS X 10.8.2?

Postby tgs » Wed Feb 06, 2013 12:02 pm

Thank you Troy for your detailed post!

If I have a bit more time I will play with this and try to get this working. But new versions of Servoy and Java require changing the settings, or?

Normally it would be the best for me to stay on Java 6 without major problems and make the change to Java 7 if all Servoy stuff is unrestricted running with it.

In Servoy and Oracle we trust 8)
Thomas Schnaus
SAN Developer
yomotec GmbH
User avatar
tgs
 
Posts: 886
Joined: Wed Oct 04, 2006 12:05 pm
Location: Germany

Re: Java 7 and 6 on Mac OS X 10.8.2?

Postby david » Wed Feb 06, 2013 2:25 pm

tgs wrote:At this moment, I don't think Servoy is running multiplatform as well.
I have so many trouble to get the customers solutions running on their Macs, but I believe the Servoy guys do their best and Apple causes the problems, or?


tgs wrote:Normally it would be the best for me to stay on Java 6 without major problems and make the change to Java 7 if all Servoy stuff is unrestricted running with it.


A developer running Servoy developer and customers running Smart Client are two different issues. As you say, for a developer just don't move to Java 7. I'm still on OS 10.6.8 for that matter. I'm due for a new machine this year though and every time I get one -- making sure everything works is a process that I don't look forward to.

As I've mentioned in other threads before all the recent Java issues, targeting customers with Smart Client is a dead end in my opinion. It's either get on the browser bandwagon as fast as you can or call it quits.

From this perspective, I believe Servoy is still very much multiplatform.
David Workman, Kabootit

Image
Everything you need to build great apps with Servoy
User avatar
david
 
Posts: 1727
Joined: Thu Apr 24, 2003 4:18 pm
Location: Washington, D.C.

Re: Java 7 and 6 on Mac OS X 10.8.2?

Postby tgs » Fri Feb 08, 2013 1:00 pm

Now I have checked out (tried) a bit more on my main developing iMac with Mac OS X 10.8.2, Java 1.6.0_37 and 1.7.0_13.

Servoy 6.1.3 developer opens and runs with Java 6, also the debug client. I have no need to run the Servoy dev. with Java 7 if it is working well with Java 6 and both installed Java versions could be managed without occurring problems on my Mac. So this should be totally ok for me.

If I open a Smart Client from an Application Server, the Java 7 JRE is starting automatically and the solution is working fine.

On other Computers my Servoy 5 and 6 solutions are working with Java 7 without problems on Win XP -> 7 and Mac OS X 10.6.8 -> 10.8.2.
I'm very happy with this. :D
Thomas Schnaus
SAN Developer
yomotec GmbH
User avatar
tgs
 
Posts: 886
Joined: Wed Oct 04, 2006 12:05 pm
Location: Germany

Re: Java 7 and 6 on Mac OS X 10.8.2?

Postby Jim.Nanireko » Thu Nov 06, 2014 10:29 pm

Java vs. Mac story - (URL removed by moderator)
Jim.Nanireko
 
Posts: 1
Joined: Thu Nov 06, 2014 10:28 pm

Re: Java 7 and 6 on Mac OS X 10.8.2?

Postby ROCLASI » Fri Nov 07, 2014 8:09 am

Excuse me ? A story on how to Uninstall Java posted in a forum of a Java based tool?
Sounds like click-bait to me. Not at least because this has been your first post even.
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium


Return to Servoy Server

Who is online

Users browsing this forum: No registered users and 11 guests