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

Questions and answers regarding the use of eclipse environment as seen in Servoy Developer

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

Postby antonio » Wed Jun 16, 2010 4:28 am

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
Code: Select all
~$ 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
Code: Select all
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
Code: Select all
   <key>Eclipse</key>
      <array>
         <!-- to use a specific Java version (instead of the platform's default) uncomment one of the following options:
            <string>-vm</string><string>/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Commands/java</string>
            <string>-vm</string><string>/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Commands/java</string>
         -->
         <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>
         <!-- WARNING:
            If you try to add a single VM argument (-vmargs) here,
            *all* vmargs specified in eclipse.ini will be ignored.
            We recommend to add all arguments in eclipse.ini
          -->
      </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.
Tony
Servoy 8 - 2022.03 LTS
antonio
 
Posts: 638
Joined: Sun Apr 02, 2006 2:14 am
Location: Australia

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

Postby rgansevles » Wed Jun 16, 2010 9:27 am

antonio wrote: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
Rob Gansevles
Servoy
User avatar
rgansevles
 
Posts: 1927
Joined: Wed Nov 15, 2006 6:17 pm
Location: Amersfoort, NL

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

Postby ROCLASI » Wed Jun 16, 2010 10:39 am

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 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

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

Postby rgansevles » Wed Jun 16, 2010 10:51 am

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
Rob Gansevles
Servoy
User avatar
rgansevles
 
Posts: 1927
Joined: Wed Nov 15, 2006 6:17 pm
Location: Amersfoort, NL

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

Postby ROCLASI » Wed Jun 16, 2010 11:01 am

rgansevles wrote: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 wrote: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!
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

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

Postby antonio » Wed Jun 16, 2010 2:54 pm

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?
Tony
Servoy 8 - 2022.03 LTS
antonio
 
Posts: 638
Joined: Sun Apr 02, 2006 2:14 am
Location: Australia

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

Postby ROCLASI » Wed Jun 16, 2010 3:01 pm

antonio wrote: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.
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

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

Postby antonio » Wed Jun 16, 2010 9:48 pm

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
Tony
Servoy 8 - 2022.03 LTS
antonio
 
Posts: 638
Joined: Sun Apr 02, 2006 2:14 am
Location: Australia

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

Postby rgansevles » Fri Jun 18, 2010 5:03 pm

antonio wrote: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
Rob Gansevles
Servoy
User avatar
rgansevles
 
Posts: 1927
Joined: Wed Nov 15, 2006 6:17 pm
Location: Amersfoort, NL

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

Postby antonio » Fri Jun 18, 2010 5:40 pm

Thanks Rob, there's quite a lot of info there :lol:
Tony
Servoy 8 - 2022.03 LTS
antonio
 
Posts: 638
Joined: Sun Apr 02, 2006 2:14 am
Location: Australia


Return to Eclipse Environment

Who is online

Users browsing this forum: No registered users and 9 guests

cron