redhat-developer / redhat-developer/vscode-java

changing .classpath file reference

Open
#3,432 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
2.3k
Forks
546
Avg merge
20h 1m
Merged PRs (30d)
11

Description

I am working with a huge legacy application which was built using Ant + Eclipse. There exists a .classpath file already with references like this (which im guessing eclipses creates):

<classpathentry kind="var" path="LIB_ROOT/json/json.jar"/>
<classpathentry kind="var" path="LIB_ROOT/apache/commons-logging.jar"/>
<classpathentry kind="src" path="src/"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>

Out of the box this doesnt work in vscode as it has no idea wht LIB_ROOT is.

My thought then is since this is a giant ant project and would be quite an effort to convert to maven (cant do gradle as it's also a java 1.8 project), i could do one of the following:

  1. simply create an ant task to generate a new .classpath file, say .classpath_vscode
  2. or simply generate a line separated list for each libary, and possibly referecne this file as the list values for settings.json -> java.project.referencedLibraries

For #1, is it possible to tell the java extension to use a different .classpath file? (this way devs can move to vscode, but still also work in eclipse using the original .classpath file.

For #2 - would i be able to reference a separate file as the source for the list?

Thanks

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by examining the Java extension's handling of the .classpath file and settings.json, especially java.project.referencedLibraries. Compare the requested alternate .classpath and external library-list workflows; done means the supported configuration path is documented or one requested workflow is implemented and verified in VS Code.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, vscode
Domain
developer-experience, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.