Welcome to NeoOffice developer notes and announcements
NeoOffice
Developer notes and announcements
 
 

This website is an archive and is no longer active
NeoOffice announcements have moved to the NeoOffice News website


Support
· Forums
· NeoOffice Support
· NeoWiki


Announcements
· Twitter @NeoOffice


Downloads
· Download NeoOffice


  
NeoOffice :: View topic - Forcing JVM version
Forcing JVM version
 
   NeoOffice Forum Index -> NeoOffice Development
View previous topic :: View next topic  
Author Message
toonetown
Keymaker


Joined: Apr 21, 2006
Posts: 95
Location: Utah, USA

PostPosted: Wed Jun 14, 2006 8:10 am    Post subject: Forcing JVM version

I know, I know, and I read it in the wiki about forcing NeoOffice to use java 1.5. It says it's "Not Supported" and "Will Crash".

HOWEVER -

I like things to crash - Smile

I want to force my installation to use java 1.5 (instead of 1.4.2) so I can start investigating what would be required in using the newer version. The OOo 2.0 code works with 1.5, doesn't it? NeoOffice shouldn't be too much harder... (I may be up in the night here)

So if anyone could let me know what I can do to force it, can you tell me? Wink

-Nathan
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Wed Jun 14, 2006 8:24 am    Post subject: Re: Forcing JVM version

toonetown wrote:
I want to force my installation to use java 1.5 (instead of 1.4.2) so I can start investigating what would be required in using the newer version. The OOo 2.0 code works with 1.5, doesn't it? NeoOffice shouldn't be too much harder... (I may be up in the night here)


OOo X11 only uses Java for Wizards logic and those have no Java AWT code. NeoOffice, in contrast, uses Java to implement much of the VCL APIs. In other words, OOo X11 makes very, very light use of Java whereas Neo makes heavy use of the most platform dependent portion of Java so this is unlikely to be trivial work. But if you get it work, be sure to try printing images.

toonetown wrote:
So if anyone could let me know what I can do to force it, can you tell me? Wink


Look in the jvmfwk module and focus on the files that I have already customized.

Patrick
Back to top
Samwise
Captain Naiobi


Joined: Apr 25, 2006
Posts: 2315
Location: Montpellier, France

PostPosted: Wed Jun 14, 2006 8:35 am    Post subject:

Well, OpenOffice.org X11 2.0.1 uses 1.4.2 and although you can add another JRE my attempts to add 1.5.0 or 1.3.1 failed, which makes me think that OOo also forces you to use 1.4.2 ...
Back to top
toonetown
Keymaker


Joined: Apr 21, 2006
Posts: 95
Location: Utah, USA

PostPosted: Thu Jun 15, 2006 7:48 am    Post subject:

I was actually able to add 1.5 by changing the file:

NeoOffice.app/Contents/share/config/javavendors.xml to have maxVersion be 1.5.999 instead of 1.4.999

And it all appeared to work! I don't know if that only changes the JVM used internally by NeoOffice (not for the interface) or what - but it worked for what I was looking into doing (I was trying to import an Uno package that required java 1.5 - and it was crashing until I made that change)

I dont' know about other stability issues that it might cause yet...
Back to top
jakeOSX
Ninja
Ninja


Joined: Aug 12, 2003
Posts: 1373

PostPosted: Thu Jun 15, 2006 9:39 am    Post subject:

when you say you want neo to use 1.5, do you mean as a JVM? or as it runs? i suspect that you have allowed neo to use the 1.5 JVM to run extras and that the 1.4.2 JVM is still used for the main program itself.
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Thu Jun 15, 2006 10:23 am    Post subject:

FYI. The contents of the ~/Library/Preferences/NeoOffice-2.x/user/config/javasettings_MacOSX_*.xml file will tell you which JVM NeoOffice is really using.

Patrick
Back to top
toonetown
Keymaker


Joined: Apr 21, 2006
Posts: 95
Location: Utah, USA

PostPosted: Mon Jul 03, 2006 7:51 pm    Post subject:

Do my eyes decieve me, or are you now able to select a 1.5 JVM from within neooffice itself now?

I just updated to alpha 4, and when I was messing around in the settings, noticed that two options now show up for my java version to use (instead of the previous one - 1.4)

The default is still 1.4, but I can choose 1.5 if I want...

Was this by design, or is my setup messed up?

(I hope it was by design...) Smile

-Nathan
Back to top
OPENSTEP
The One
The One


Joined: May 25, 2003
Posts: 4752
Location: Santa Barbara, CA

PostPosted: Mon Jul 03, 2006 7:57 pm    Post subject:

The embedded VM is decided by the flags from startup which are fixing it at 1.4. It is still not possible to run our code on 1.5+.

ed
Back to top
Samwise
Captain Naiobi


Joined: Apr 25, 2006
Posts: 2315
Location: Montpellier, France

PostPosted: Tue Jul 04, 2006 9:27 am    Post subject:

Nathan is referring to the NeoOffice - Java section of "Options". In OpenOffice, this is where you select which JRE to use for OOo's tiny amount of Java code (I think).

I just noticed that this Options section show up in NeoOffice 2.0 Alpha 4 PowerPC. It is not present in 1.2.2.
Back to top
OPENSTEP
The One
The One


Joined: May 25, 2003
Posts: 4752
Location: Santa Barbara, CA

PostPosted: Tue Jul 04, 2006 9:40 am    Post subject:

While I may be wrong, I believe there can only be embedded VM instance inside of an application and since we're embedding 1.4 at startup, it isn't possible to embed anything aside from that version.

ed
Back to top
Samwise
Captain Naiobi


Joined: Apr 25, 2006
Posts: 2315
Location: Montpellier, France

PostPosted: Tue Jul 04, 2006 10:03 am    Post subject:

I agree. But what I (and Nathan, I believe) am referring to is an OpenOffice.org option (as far as I know, OpenOffice doesn't need to embed Java so the JRE can be modified even after startup) which had apparently been removed from previous versions of NeoOffice (since to NeOoffice users it's useless).

I can't explain why it suddenly shows up in Neo like in other versions of OOo ...
Back to top
toonetown
Keymaker


Joined: Apr 21, 2006
Posts: 95
Location: Utah, USA

PostPosted: Tue Jul 04, 2006 11:42 am    Post subject:

I can actually verify that it is using java 1.5 for the VM within NeoOffice - not necessarily the VM that is used FOR NeoOffice...

That is, I am able to load UNO Packages that require version 1.5 when I select it from the preferences panel - I am unable to load those packages when using version 1.4

This is the setting that is modified by changing the config/javavendors.xml file. And it seems to work pretty well too (I haven't had any problems since changing it to 1.5...)

And the ~/Library/Preferences/NeoOffice-2.x/user/config/javasettings_MacOSX_*.xml file (as mentioned by Patrick previously) states that I am using 1.5.0_06 when I make that change.

I'm not complaining - I was just surprised when I saw the option show up in the last build (I was messing with it, and forced it to show up by manually editing the javavendors.xml file - and I was just wondering if my system was the one showing the difference or if all systems were reflecting the change)
Back to top
OPENSTEP
The One
The One


Joined: May 25, 2003
Posts: 4752
Location: Santa Barbara, CA

PostPosted: Tue Jul 04, 2006 12:08 pm    Post subject:

Hmm...odd...if it is loading the two within the same address space keep your eye open for any problems, particularly with windowing and the like. I'm not quite sure how component loading is addressing compatibility checks myself.

The reason we fix the VM is that we actually need to fix bugs in the VM itself from time to time and need to rely on our reverse engineering of the VM implementation to access private members and classes to allow us to get the underlying nswindow objects and other native objects. This has drastically changed in the past from 1.3 to 1.4, and it may still do so in the future since, really, people shouldn't be doing what we do Smile

ed
Back to top
ovvldc
Captain Naiobi


Joined: Sep 13, 2004
Posts: 2352
Location: Zürich, CH

PostPosted: Tue Jul 04, 2006 3:29 pm    Post subject:

Actually, I seem to remember that Patrick once tried to build Neo with JVM 1.5 and it built. IIRC, it even ran but I do not know how far or how well.

Of course, this would be an unsupported feature Smile. For myself I am quite content with JVM 1.4, as we are set on Panther compatibility..

Good luck,
Oscar

_________________
"What do you think of Western Civilization?"
"I think it would be a good idea!"
- Mohandas Karamchand Gandhi
Back to top
Samwise
Captain Naiobi


Joined: Apr 25, 2006
Posts: 2315
Location: Montpellier, France

PostPosted: Wed Jul 05, 2006 5:57 am    Post subject:

NeoOffice can build with Java 1.5, but it still uses the 1.4 JRE at runtime.

See bug #1427 in Bugzilla for more info.
Back to top
Display posts from previous:   
   NeoOffice Forum Index -> NeoOffice Development All times are GMT - 7 Hours
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Powered by phpBB © 2001, 2005 phpBB Group

All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest © Planamesa Inc.
NeoOffice is a registered trademark of Planamesa Inc. and may not be used without permission.
PHP-Nuke Copyright © 2005 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.