question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Make javaconfig.json optional and try to read other config files

See original GitHub issue

Eclipse generates a .project for a java project. The presence of this file could also indicate the root of a Java project. Along with it, Eclipse generates a .classpath, which is an XML file like this:

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
    <classpathentry kind="src" path="src"/>
    <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
    <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
    <classpathentry kind="output" path="bin"/>
</classpath>

It contains both the sourcePath setting (<classpathentry kind="src"/>), the outputDirectory (<classpathentry kind="output"/>) and the actual class paths (<classpathentry kind="con">). Eclipse does not have a feature to automatically export these into a text file this extension understands, support for this file would make it super easy to contribute to projects that use Eclipse.

Similarly, maybe we can take the presence of a pom.xml as the indication of a java project root aswell and get classpaths for Maven projects directly from the extension without someone having to add this configuration to their pom.xml?

Would do a PR 😃

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:13 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
georgewfrasercommented, Aug 26, 2016

pom.xml is now read automatically: https://github.com/georgewfraser/vscode-javac/commit/ea0a36887374ee22e06a2009a602bcd5a479591a

@felixfbecker @xastor reading eclipse .project would be similar, PR welcome

1reaction
georgewfrasercommented, May 27, 2016

I would suggest starting simple: a separate source file. If we make some good progress, it can be spun off as a separate module later.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Is @Configuration optional for JavaConfig classes?
I am writing a REST server with Spring. I am able to refer to my configuration class through web.xml and the class is...
Read more >
Feature Flags with Spring - Baeldung
Learn how feature flags can help you to enable or disable different functionality in your Spring Boot application without recompiling or ...
Read more >
17. Web MVC framework - Spring
The Spring Web model-view-controller (MVC) framework is designed around a DispatcherServlet that dispatches requests to handlers, with configurable handler ...
Read more >
The Deployment Descriptor: web.xml - Java 8 - Google Cloud
xml file. The servlet can access its initialization parameters by getting its servlet configuration using its own getServletConfig() method, then calling the ...
Read more >
Spring Boot Hello World RESTful Web Services Tutorial
This is the minimal configuration for a Spring Boot web application. From the JAR files downloaded by Maven, you can see Spring framework ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found