Can I make SV 5.2 Developer run a different version of Java?

I’m developing on SV 5.2, MAC OSX 10.6 (64-bit) with Java 1.6 20
I need to test some components that require Java 1.5 (32-bit).
I used to be able to do this in 3.x by editing info.plist JVMVersion property to 1.5*

I’ve tried changing Java Prefs to run Java 5 32-bit, and confirmed it in terminal

~$ java -version
java version "1.5.0_19"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_19-b02-304)
Java HotSpot(TM) Client VM (build 1.5.0_19-137, mixed mode, sharing)

However when I start Eclipse and run this

application.output( "\nJava Version: " + plugins.it2be_tools.client().javaVersion)

I get Java Version: 1.6.0_20

I’ve edited this section of the Servoy developer info.plist to read

	<key>Eclipse</key>
		<array>
			
			<string>-vm</string><string>/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Commands/java</string>
			<string>-keyring</string><string>~/.eclipse_keyring</string>
			<string>-showlocation</string>
			
		</array>

and confirmed that Versions/1.5.0 is actually Java 5 (and not a symlink to Java 6, which is the default when Apple updates Java on Mac 10.6)

Should I be editing something in servoy/application_server to get SC and WC to run java 5 in Developer?

Thanks in advance.

antonio:
Should I be editing something in servoy/application_server to get SC and WC to run java 5 in Developer?

Tony,

Servoy Developer runs everything in 1 jvm, so when you run Developer with java 1.5, SC and WC will also run in that.

Rob

Also note that Developer will only run in the Java version you used when you installed Servoy. The Eclipse environment is then setup to use that version only.
Lets say you had Java 6 (64bit) as your default JVM when you installed Servoy then Developer will never run in Java 6 (32-bit) or Java 5 (32/64).

So when you install Servoy (on Mac) then make sure you have setup your default JVM (/Applications/Utilities/Java Preferences.app) to the one you want to use Developer in.

Robert,

This is not completely true.

At install-time, Servoy installs different eclipse plugins depending on the architecture (32/64 bit), but it is independent of the jvm version.
So if you were using Java 6 in the installer, you can still run Developer with java 5.

I also expect that if you installed using a 32-bit jvm you can run with a 64-bit jvm, but not the other way around.

Note that for Servoy Server there is no dependency at all on which jvm/architecture is used at install-time.

Rob

rgansevles:
Robert,

This is not completely true.

At install-time, Servoy installs different eclipse plugins depending on the architecture (32/64 bit), but it is independent of the jvm version.
So if you were using Java 6 in the installer, you can still run Developer with java 5.

I also expect that if you installed using a 32-bit jvm you can run with a 64-bit jvm, but not the other way around.

Ahh, that was what I was seeing. I have it under Java 6 64 bits installed and can’t run it under 32 bits.
So installing under 32 bits will allow me to run it onder 32 and 64 bits ?

rgansevles:
Note that for Servoy Server there is no dependency at all on which jvm/architecture is used at install-time.

Correct. I was only talking about Developer.

In any case I stand corrected!

Thanks for the great explanation, I now understand why the 32 bit component was throwing an error no matter what I did.
So I should

  • switch to a 32 bit jvm
  • install Developer into a new folder, reinstall SVN, etc
  • point that to the old workspace

Will that bring over everything, or is migration more complicated?

antonio:
Will that bring over everything, or is migration more complicated?

I would also copy the servoy.properties over before you launch Developer. Saves you redefining all your connections.
But that should all be it.

Thanks for the tips, happy to report after a reinstall in 32-bits it’s behaving well as a 32 bit environment, regardless of the Java and bitness at launch.
Could I suggest that you put a line on the Servoy Developer splash screen indicating what architecture it’s using?
Tony

antonio:
Could I suggest that you put a line on the Servoy Developer splash screen indicating what architecture it’s using?

Tony,

You can also check this via Help->About Servoy Developer → Installation Details → Configuration

Rob

Thanks Rob, there’s quite a lot of info there :lol: