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

Bug 343630

Summary: "Path for IClasspathEntry must be absolute" when launching Ant
Product: [Eclipse Project] Platform Reporter: Isaac Shabtay <isaac>
Component: AntAssignee: Platform-Ant-Inbox <platform-ant-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3    
Version: 3.6.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard: stalebug

Description Isaac Shabtay CLA 2011-04-21 22:03:29 EDT
Build Identifier: 20110218-0911

An extremely simple Ant launch configuration fails with "Path for IClasspathEntry must be absolute" when the Ant configuration is set to launch on a separate JRE.

Reproducible: Always

Steps to Reproduce:
1.Set a system environment variable named "JAVA_HOME", pointing to your local JDK installation (we launch our Eclipse with a JRE).

2.Create a brand new workspace.

3.Edit the workspace's preferences: workspace -> preferences -> Ant -> runtime -> global entries, add the following:

${env_var:JAVA_HOME}/lib/tools.jar

4.Create a new general project.

5.Create a new "build.xml" file. It may be just a skeleton file - an empty target would suffice.

6.Create a launch configuration for the Ant script, ensure that it is set to launch under a separate JRE.

7.Launch. You should get:

An internal error occurred during: "Launching <project-name> build.xml".
Path for IClasspathEntry must be absolute: ${env_var:JAVA_HOME}/lib/tools.jar


This will *not* happen if the launch configuration is set to run in the same JRE as the workspace.
Comment 1 Lars Vogel CLA 2019-11-14 02:18:19 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

If the bug is still relevant, please remove the "stalebug" whiteboard tag.