Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 358124

Summary: Problem to specify the server-side java path of PTP
Product: [Tools] PTP Reporter: Rodrigo Fraxino Araujo <rfaraujo>
Component: Remote ToolsAssignee: Greg Watson <g.watson>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: cjashfor, g.watson, rfaraujo, wainersm
Version: unspecified   
Target Milestone: 6.0   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Rodrigo Fraxino Araujo CLA 2011-09-19 10:29:25 EDT
Build Identifier: I20110613-1736

We would like to specify the java version that will be used at the server-side of a connection.

There is an extension point at org.eclipse.ptp.remote.core.remoteServer, which makes possible to set the attribute launchCommand for specifying which java command/path should be used. 

The problem is that this extension point is already being used by org.eclipse.ptp.rdt.server.dstore/plugin.xml

As it is not possible to override an extension point, we cant specify our java location.


Reproducible: Always

Steps to Reproduce:
1. Create a Remote C/C++ project using Remote Tools.
Comment 1 Rodrigo Fraxino Araujo CLA 2011-10-13 16:17:47 EDT
Aiming to implement a solution for this issue,  what if another extension point were added in org.eclipse.ptp.remote.core? It would be similar to remoteServer, but the attributes responsible for specifying and verifying the java launch command would be excluded from remoteServer and added in this new extension.  

From what I could realize, the class org.eclipse.ptp.remote.core.server.RemoteServerManager is responsible from reading remoteServer extensions and dealing with the java execution line. Perhaps this class could have default values for the java attributes, and if an extension is present using this new extension point, the java values would be read from it.

Regards,
Rodrigo.
Comment 2 Greg Watson CLA 2011-10-14 10:54:35 EDT
Can you explain more about what you are trying to do? Do you just want to override the java version for the RDT dstore server, or are you launching your own server? Could you use the AbstractRemoteServerRunner#setVerifyLaunchPattern() instead?
Comment 3 Wainer dos Santos Moschetta CLA 2011-10-17 10:24:23 EDT
(In reply to comment #2)
> Can you explain more about what you are trying to do? Do you just want to
> override the java version for the RDT dstore server, or are you launching your
> own server? Could you use the
> AbstractRemoteServerRunner#setVerifyLaunchPattern() instead?

Hi Greg,

We are going to release our eclipse sdk in a pair of rpms: client (eclipse runtime) and server (compiled sdm + jvm).

Since path to java on remote (server) side is well-known, we want a way to tell the client eclipse runtime to use that version of java when launching RDT dstore server. So It won't need users to install a jvm or hack .bashrc/.bash_profile to export PATH correctly. It will always use RDT as the communication layer between server and client.
Comment 4 Greg Watson CLA 2011-10-17 16:29:37 EDT
I could add a new extension point called remoteServerOverride that allows you to override a remoteServer extension's attributes and commands. You would then need to provide your own plugin that would declare this new extension. Would this be sufficient? Note that this would only be available in 6.0 as it would involve an API change.
Comment 5 Rodrigo Fraxino Araujo CLA 2011-10-20 08:51:07 EDT
Hi Greg,

Yes, that would be sufficient for us. We could include our plugin using this new extension to modify the java path.
Comment 6 Greg Watson CLA 2011-10-20 15:46:12 EDT
Fixed in HEAD.

Should be available in tonight's build: http://download.eclipse.org/tools/ptp/builds/hudson/ptp-nightly