Bug 21954

Summary: compile / debug VM mismatch
Product: [Eclipse Project] JDT Reporter: Genady Beryozkin <eclipse>
Component: CoreAssignee: Philipe Mulet <philippe_mulet>
Status: RESOLVED WORKSFORME QA Contact:
Severity: enhancement    
Priority: P3    
Version: 2.0   
Target Milestone: 2.1 M1   
Hardware: All   
OS: All   
Whiteboard:

Description Genady Beryozkin CLA 2002-07-26 10:27:50 EDT
I have few projects in the workspace, some require jdk 1.4.0

In order to compile the classes JDT uses the "default vm".
Suppose it is Sun's 1.4.0

In order to run some of the projects I have to use jdk1.3.1, so I create a
launch onfiguration
and define it to use 1.3.1. 
When launching the program I get a
NoSuchMethodException/AbstractMethodException, etc.

Why ? Because I use JDialog.setLocationRelativeTo() method. In JDK 1.3.1 it
is defined in JDialog. In JDK 1.4.0 it is defined in java.awt.Window.

The 1.4 compiler links the call to Window.setLocationRelativeTo(), but
java.awt.Window does not have such method in 1.3.1

What I'm trying to suggest is that a VM must be specified for each project
separately, and that there should be no such thing as "default vm".
(or it should be the default for new projects).
Comment 1 Philipe Mulet CLA 2002-07-26 13:03:06 EDT
Using classpath containers you can achieve this. Have a look at the build path 
wizard, under the library tab -> advanced button.
Comment 2 Genady Beryozkin CLA 2002-07-26 14:04:26 EDT
do I have to remove the default jre ?
Comment 3 Philipe Mulet CLA 2002-07-29 06:22:35 EDT
You actually would replace the JRE variable reference with a JRE container 
reference. Containers are slightly more evolved than single var reference, in 
so far as they can denote a set of JARs, and can have different a meaning on 
each project.
Comment 4 Philipe Mulet CLA 2002-07-29 06:25:46 EDT
Ok to close ?
Comment 5 Philipe Mulet CLA 2002-09-16 05:11:30 EDT
Closing.