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 - NeoOffice incompatible with latest Apple Java (dev) preview
NeoOffice incompatible with latest Apple Java (dev) preview
 
   NeoOffice Forum Index -> NeoOffice Releases
View previous topic :: View next topic  
Author Message
suzume
Agent


Joined: Nov 23, 2005
Posts: 19

PostPosted: Mon Aug 30, 2010 12:07 am    Post subject: NeoOffice incompatible with latest Apple Java (dev) preview

I'v installed the latest Java developer preview released by Apple a few days ago and since then NeoOffice has systematically refused to work.

It looks like JAVA_HOME has been changed (ant also refused to work) but even if I exported a new value of JAVA_HOME (and thus made ant work as usual) NeoOffice still refuses to work.

Now, I am trying to reinstall from scratch and the install package says that "The version of Java is too old..."

====================
suzume:~ suzume$ java -version
java version "1.6.0_21"
Java(TM) SE Runtime Environment (build 1.6.0_21-b07-288-10M3222)
Java HotSpot(TM) 64-Bit Server VM (build 17.0-b17-288, mixed mode)
suzume:~ suzume$
====================

It is weird and very inconvenient...

Jean-Christophe Helary
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Mon Aug 30, 2010 1:10 am    Post subject:

Unfortunately, since NeoOffice is not a generic Java application like Ant and we load Java in-process via the Java Invocation API, installing developer previews routinely causes problems so we only provide support for Apple's production Java releases. Should a bug appear in a production Java system update, we will support that. However, early developer previews are experimental and due to our limited donation funds, we do not begin testing new Java versions until they are very nearly in a production release.

While you may not have meant to change any system files, the fact is that the NeoOffice installer gives you the "Java is too old" error is an indication that the production Mac OS X Java files and softlinks have been changed significantly from the standard production files and softlinks that Apple has used in all production releases. The release notes for that developer preview say that the developer preview is installed in a new location and it is likely that the developer preview has rendered the previously installed production 1.6.0 Java files and softlinks unusable.

The bad news is that whatever changes were made to your system, they are not likely easily reversible as Apple' Java Invocation API is much more dependent on the layout of the Java files and softlinks than standalone Java applications like Ant are so for NeoOffice to work on your machine, you will need to reinstall Apple's current production Java version.

If you have a recent backup of your main volume and that backup has backups of the /System and /usr folders, restoring those two folders should be enough to properly restore Apple's production Java files and softlinks. However, if you have no such backup, you may need to reinstall Mac OS X and all system updates to fully restore Apple's current production version.

Patrick
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Mon Aug 30, 2010 1:43 am    Post subject:

While writing my last post, I created a backup copy of my Mac OS X 10.6.4 Snow Leopard volume and installed the Java developer preview that you installed and I have no problems running NeoOffice. I also tested both the NeoOffice 3.1.1 installer as well as the lastest Patch 2 installer and both did not complain about Java being too old.

With the Java developer preview, I did notice that quitting now results in a crash in Apple's Java code and hopefully Apple will fix that crash before they put the new Java version into production. However, since I can install and launch NeoOffice without any problem, I suspect that the Apple's Java files or softlinks have been modified in some non-standard way.

While this is something that you can safely do with Sun Microsystems' Windows or Linux versions of Java, Apple's Java installation are extremely dependent on its files and softlink being in specific locations and any change to those files or softlinks can make Java unrunnable.

So, my original conclusion still holds: you need reinstall Apple's production /System and /usr folders from a backup made prior to installation or reinstall Mac OS X in order to get Apple's Java back to its original working state.

Patrick
Back to top
suzume
Agent


Joined: Nov 23, 2005
Posts: 19

PostPosted: Mon Aug 30, 2010 1:47 am    Post subject: Thank you !

Ok, indeed the latest preview did move around a lot of things. I had installed Java 1.5 in // with 1.6 and your comment suggested me to check what had happened to it.

The preview had pushed it into a /disabled folder and so NeoOffice could not detect it there and though my latest available version was Java 1.3.2 that seems to exist in the Versions hierarchy.

I moved 1.5 back to its position and now NeoOffice works.

Except that to quit it, I need to use the File > Exit menu, otherwise, Cmd+Q (or the equivalent menu item) will quit it but them generate a crash report.

I'm attaching the report just for your information because it is very probably related to the hacked nature of my Java system (Java 1.6 does not work with a Java app I need for work, hence my reinstall of Java 1.5).

Thank you for your hard work.

Jean-Christophe Helary
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Mon Aug 30, 2010 1:58 am    Post subject: Re: Thank you !

suzume wrote:
Except that to quit it, I need to use the File > Exit menu, otherwise, Cmd+Q (or the equivalent menu item) will quit it but them generate a crash report.

I'm attaching the report just for your information because it is very probably related to the hacked nature of my Java system (Java 1.6 does not work with a Java app I need for work, hence my reinstall of Java 1.5).


Your crash is the same one that I am seeing. Apparently in this version Java, Java has decided that it controls shutdown and is bypassing our Java quit handler code.

I will have to investigate this new Java behavior further and see how we can ensure that this version of Java invokes our quit handler instead of its new default handler.

Patrick
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Mon Aug 30, 2010 10:43 am    Post subject:

I have more data on this issue. Apple has made some incompatible changes the latest Java developer preview and to use these incompatible changes we would have to compile NeoOffice on a Mac OS X 10.6.4 machine with the Java developer preview installed.

Since we compile on Mac OS X 10.4.11 so that we can support 10.4 and higher, handing these incompatible changes is a really nasty hassle. Fortunately, NeoOffice is a native application and Java is run in-process so I can rewrite our NeoOffice menu handlers to intercept and handle those events natively instead of letting them pass through to Java.

I will work on this over the next few days. When I have the replacement native code working, I will post a test patch for you to try.

Patrick
Back to top
suzume
Agent


Joined: Nov 23, 2005
Posts: 19

PostPosted: Mon Aug 30, 2010 4:58 pm    Post subject: Java ?

Basically, what is the relationship between Java and NeoOffice ? Why does a broken Java system keep NeoOffice from working properly ? I thought the dependencies to Java had been gone since the NeoOffice/J era.

In any case, thank you for your help. I seem to have a nasty preference on my user account that keeps OOo from working properly so NeoOffice has been my tool of use for a while now, especially since the shift to Oracle.

Jean-Christophe Helary
Back to top
djpimley
The Anomaly
(earlier version)


Joined: Jun 11, 2006
Posts: 481
Location: Great Britain

PostPosted: Mon Aug 30, 2010 5:31 pm    Post subject:

I think this wiki page answers your Java question.
Back to top
suzume
Agent


Joined: Nov 23, 2005
Posts: 19

PostPosted: Mon Aug 30, 2010 5:50 pm    Post subject: Java...

Ok, it is all clear now. Thank you all for your support.

Jean-Christophe Helary
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Mon Aug 30, 2010 7:06 pm    Post subject: Re: Java...

suzume wrote:
Ok, it is all clear now. Thank you all for your support.


Sometimes using Java has caused some pain (like the issue you found) but overall much of the Java code has worked well for us. Java gave us the ability to make rapid progress in making the OpenOffice.org stable on Mac OS X several years ago when OpenOffice.org did not have any native Mac version.

With Java, once we had something reasonably stable and we found a Java feature to be too slow or limited in functionality, we would use some of our donations to replace the broken or limited Java code with native code bit by bit.

By using this process over the last 7 years we have been able to replace Java code with native code for things like printing, text layout, copy and paste, drag and drop, gesture event support, services menu support while at the same time, improving NeoOffice speed and stability in these areas.

Patrick
Back to top
suzume
Agent


Joined: Nov 23, 2005
Posts: 19

PostPosted: Mon Aug 30, 2010 7:18 pm    Post subject: Maybe related ? Attachments/finder files not opened

I'm thinking that might be a related issue.

With the same setting that crashes NeoOffice on Cmd+Q, I can select an opening application for an attached file, or even a Finder icon, but trying to launch the file through the open menu or even by double-clicking on it in Finder does not work.

I have to open it from NeoOffice to open it.

Have I hacked my system too much or can you reproduce that ?

Jean-Christophe Helary
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Mon Aug 30, 2010 7:28 pm    Post subject: Re: Maybe related ? Attachments/finder files not opened

suzume wrote:
Have I hacked my system too much or can you reproduce that ?


I can reproduce it as well. It is caused by the same change that causes the Command-Q crashing. It also causes the NeoOffice :: About menu to use Java's default dialog and the NeoOffice :: Preferences menu to be hidden.

Patrick
Back to top
suzume
Agent


Joined: Nov 23, 2005
Posts: 19

PostPosted: Mon Aug 30, 2010 8:05 pm    Post subject: bug nest :)

I'm glad I have stepped on this bug nest. I suppose the fact that dropping the file on the Dock NeoOffice icon does not work is a side effect of all that too.

I promise an equivalent donation (50 euro) as soon as you have the patch out. It is just for accounting purposes that I delay the donation, not as any kind of silly "incentive". I need to justify that the company money I spend corresponds to something I actually "get".

Thank you _very much_ for your work.

Jean-Christophe Helary
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Tue Aug 31, 2010 8:19 am    Post subject:

I think that I have fixed the following functionality that has been broken by Apple's latest Java developer preview:

- Quitting by pressing Command-Q or selecting the NeoOffice :: Quit menu
- Opening or printing files in NeoOffice by double-clicking on NeoOffice files in the Finder or dragging such files onto the NeoOffice Dock icon

The NeoOffice :: About and NeoOffice :: Preferences menus are still broken and I will need a different approach to fix those two menu items, but the fixes for the above are now available for testing.

Can you install the following test patch and tell us the above functionality now works again with the latest Java developer preview?:

Intel:
http://joe.neooffice.org/test/NeoOffice-3.1.1-Patch-2-Test-12-Intel.dmg

PowerPC:
http://joe.neooffice.org/test/NeoOffice-3.1.1-Patch-2-Test-12-PowerPC.dmg

Patrick
Back to top
suzume
Agent


Joined: Nov 23, 2005
Posts: 19

PostPosted: Tue Aug 31, 2010 3:36 pm    Post subject: Fixed

Ok, all the problems I had identified seem to be fixed:

I can quit without NeoOffice crashing
I can click on a file to open it in NeoOffice
I can drop it on the dock icon
I can open it when it is attached to a mail

Thank you very much

Jean-Christophe Helary
Back to top
Display posts from previous:   
   NeoOffice Forum Index -> NeoOffice Releases All times are GMT - 7 Hours
Goto page 1, 2  Next
Page 1 of 2

 
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.