Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Rootfiles and OSX

Had problems with the p2 update mechanism under Windows when going the root files route with the javaagent jar, because p2 tried to delete the agent jar while it was already being used. Deleting currently used files under windows is not possible.

Ended up packaging the byte-buddy-agent-1.3.19.jar in a separate plugin with a fixed version (without .qualifier) and with Eclipse-BundleShape: dir set in the MANIFEST.MF to unpack the plugin jar. Then set different vm args for different execution environments: -javaagent:../Eclipse/plugins/net.bytebuddy.byte-buddy-agent_1.3.19/lib/byte-buddy-agent-1.3.19.jar for OSX and -javaagent:plugins/net.bytebuddy.byte-buddy-agent_1.3.19/lib/byte-buddy-agent-1.3.19.jar for the others. The only downside is that when executing from within the IDE, the javaagent flag has to be removed because the path is only valid when the project has been built.

Felix B <felix.barnsteiner@xxxxxxxxx> schrieb am Do., 12. Mai 2016 um 09:19 Uhr:
One of the problems is that the plugins have a timestamp appended to their path and that the path is different for differen execution environments and tycho versions:
-startup ../../../plugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar
-startup ../Eclipse/plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar

So the question is how to reference this dynamic path within 

<launcherArgs>
    <vmArgs>
    </vmArgs>
</launcherArgs>


Felix B <felix.barnsteiner@xxxxxxxxx> schrieb am Do., 12. Mai 2016 um 09:11 Uhr:
In fact the workspace is usually not in the .app folder at all
Newer versions of Tycho include everything in the .app directory, including the workspace. I don't know how to change that.

Probably a reasonable way to do it, though you might want to consider putting it in the plugins directory along with all the other jars. See how the eclipse.ini refers to the launcher jar, which is in the plugins directory as well. 

This sounds way more robust and like the way to go! Do you know how I can do that (I'm a RCP noob, sry)?

Alex Blewitt <alex.blewitt@xxxxxxxxx> schrieb am Mi., 11. Mai 2016 um 18:41 Uhr:


On 11 May 2016, at 16:45, Felix B <felix.barnsteiner@xxxxxxxxx> wrote:

But on OSX the root is X.app/Eclipse and the workspace is not in X.app/Eclipse/workspace but X.app/MacOS/workspace. 

In fact the workspace is usually not in the .app folder at all: if it were, then when the user drags the app to the trash to delete it they would lose all their work. Not sure why you are defaulting to that location?

I could solve my javaagent problem by specifying a custom .ini for OSX containing -javaagent:../Eclipse/byte-buddy-agent-1.3.19.jar.

Probably a reasonable way to do it, though you might want to consider putting it in the plugins directory along with all the other jars. See how the eclipse.ini refers to the launcher jar, which is in the plugins directory as well. 
The -data is never likely to be set to inside the eclipse folder for the reasons I outlined above. I think the EPP and SDK use @user.home@/workspace somewhere but it's been a while since I needed to change that. 

How should we proceed now? Create an issue? 

It's not clear to me what it is that you are trying to do. If you want to find the plugins/ folder, for example, so that you can add a flag in the product properties then there may be a better way than assuming a particular file layout. But it's worth asking by a bug when get platform location should be the directory that contains the executable or the directory that contains eclipse.ini and friends because these are different places in OS X. 

Alex
_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/tycho-user

Back to the top