views:

505

answers:

2

I am developing a collection of plugins on Eclipse 3.4 (official) on both mac and a PC.

At present (I'm aware it is not the best practice) some of my common plugins export all of their packages.

The problem is this: many of the listed packages are empty because subpackages are not, for example: prefix.core may be empty while prefix.core.model may not be.

Even though I use the same manifest file, having the empty packages listed on one platform raises an error in the manifest file on the other platform. If I omit the packages in that platform, then when I come to the other platform I'm told that the plugin does not export everything.

Any idea what is going on? I have no idea why there would be differences between the PC and the Mac on a non-UI related issue. The only significant difference is that the mac is running Java 5 (still not Eclipse for Java 6) while the PC is running Java 6, but the manifests should have nothing to do with it.

+1  A: 

It's usually a good practice to use the same version of the JVM if you're developing plugins across multiple machines and platforms.

If you are going to build the plugins on a PC and expect them to run on the Mac, you should standardize on Java 5. You can easily install and add additional JREs to Eclipse by going to Window->Preferences->Installed JREs. You can even configure which JRE each project and launch configuration uses, if you don't want the rest of your PC Java coding to use 5.

I wouldn't be surprised if this fixes your manifest problem, as well.

wsorenson
The majority of my users use Java 6, forcing them to use versions compiled for Java 5 is cruel and unusual punishment and causes problems since Eclipse is compiled for 1.6Mac OS X has Java 6 (finally) but Eclipse does not yet support it because of SWT.Either way, the problem seems to be Eclipse.
Uri
A: 

The problem could be the error/warning levels set in the preferences for Plug-In development. It could be that you have different settings in both machines, and that creates the problem.

Under Preferences -> Plug-in Development -> Compilers there are several options regarding error and warning levels for different issues, such as references to non-existent resources. Is there any differences that you might see?

Mario Ortegón