views:

111

answers:

6

For a generic project its possible to add a JRE_CONTAINER to classpath, is something like this possible for the Web Container Server Runtime?

<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
A: 

Yes, I believe so. I'm running Eclipse Galileo and I can change the JRE by:

  • Right clicking the project
  • Selecting Properties
  • Selecting Java Build Path
  • Selecting the Libraries tab

Alternatively, you could also manually change the .classpath file. Finally, you could use a build manager such as Maven to manage the versions/libraries used.

Pran
I want a Standard Servlet Container, just as the defined `Execution Enviroments` (can be found under `Java > Installed JREs > Execution Enviroment`), this doesn't fit my question. Thank you anyway.
codedevour
A: 

I'm not sure exactly what you're trying to do but you can add the jars of your configured server via Java Build Path > Libraries > Add Library > Server Runtime.

Daniel
A: 

For projects dealing with WTP (Web Tool Platform) you do see those kind of entries:

<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/j2sdk1.6.0_12"/>

or here:

<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>

They can come with a definition:

<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>

Found also in relation with JRE warnings.

VonC
I need something like the StandardVMType `J2SE-1.5` for the Standard Servlet Container which supports the default `servlet-api` etc.
codedevour
A: 

AS far as i can understand your question, you want to change the jvm version. This you can do by going to preferences> java. there you can change the jvm version.This will take affect on the whole workspace. As far as i know , you cant have different java versions for different projects.

tak
Yes we can ! :) On the "preferences > java" you can select the "enable projects specific settings" and select a different jvm for a specific project...
Vinze
A: 

Not sure what you want but you can declare a Library to you're runtime "Build Path > Libraries > Add Library" or you can declare your own variable "Build Path > Libraries > Add Variable" which can contain the jars you want...

Vinze
A: 

I think there is no solution for my approach. Thank you all.

codedevour