Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 09:50
    testforstephen commented #2183
  • 09:39
    testforstephen synchronize #2183
  • 09:25
    testforstephen synchronize #2183
  • 05:52
    jdneo edited #2244
  • 05:51
    jdneo opened #2244
  • 04:53
    jdneo opened #2243
  • 01:17
    testforstephen labeled #2242
  • 01:17
    testforstephen labeled #2242
  • 01:16
    testforstephen commented #2242
  • Dec 04 16:44
    snjeza unlabeled #880
  • Dec 04 16:44
    snjeza unlabeled #880
  • Dec 04 16:44
    snjeza commented #880
  • Dec 04 16:41
    snjeza review_requested #880
  • Dec 04 16:41
    snjeza review_requested #880
  • Dec 04 16:40
    snjeza edited #880
  • Dec 04 16:39
    openshift-ci[bot] unlabeled #880
  • Dec 04 16:39
    snjeza edited #880
  • Dec 04 16:39
    snjeza synchronize #880
  • Dec 04 15:43
    xFaust1 opened #2242
  • Dec 03 14:28
    SKhaner closed #2241
Iwan Aucamp
@aucampia
Okay, cleaning out settings helped:
find . -iregex '^.*/[.]\(classpath\|project\|settings\)'  | xargs -t rm -vr
\rm -vr */bin/
odd
and a bit annoying
I actually expected ./gradlew eclipse to do that
Krishna Hrithik
@kh-2000
i have created a maven-archetype-quickstart project, how to connect mysql to it?
Ronak Gandhi
@ronakg
A question about importing large multiple Maven projects. What settings to use for java.jdt.ls.vmargs?
Brian Weller
@bmweller:matrix.org
[m]
Hello All. working with a client who does their own desktop deployment package of VSCode. The base installation is locked down under Program Files. When I use the refactoring or apply a 'fix' I get the following error 'running the contributed command: 'java.apply.workspaceEdit' failed. Attaching log and version details as images. Note that because the client's build is locked down I run code with the --extensions-dir option so that I can install this plugin. Thanks in advance.
Tomer Eliyahu
@tomereli

Hi, not sure if this is the right place to ask - but I'm trying to run a spring boot test in vscode which depends on pom.xml with the following:

     <dependency>
        <groupId>de.flapdoodle.embed</groupId>
        <artifactId>de.flapdoodle.embed.mongo</artifactId>
        <scope>test</scope>
     </dependency>

And it fails on downloading it, probably since I'm running behind a proxy:

2021-03-16 23:09:08.309  INFO 2925741 --- [           main] o.s.b.a.mongo.embedded.EmbeddedMongo     : Download 3.2.2:Linux:B64 : starting...

My proxy is set up correctly in ~/.m2/settings.xml and I can run mvn clean install which downloads all the non-test dependencies automatically during build from the command line (zsh).

I tried setting the following according to https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-maven:

"maven.executable.options": "-Dhttp.proxyHost=my-proxy.org.com -Dhttp.proxyPort=911",

Any ideas?

Tomer Eliyahu
@tomereli
OK so I'm pretty sure that the problem is that the language server JVM doesn't set the proxy system properties - how can I verify if this is indeed the case?
Asir Shahriar Roudra
@roudra323

I've set up my vs code for java. But while installing Language Support for Java(TM) by Red Hat extension it is giving an error. Here is the log message:

[2021-03-22 23:31:42.665] [renderer1] [error] An unknown error occurred. Please consult the log for more details.
[2021-03-23 00:06:53.635] [renderer1] [error] Corrupt ZIP: end of central directory record signature not found: validating: Corrupt ZIP: end of central directory record signature not found
    at G.downloadInstallableExtension (file:///F:/Programming/Softwares/Microsoft VS Code/resources/app/out/vs/code/electron-browser/sharedProcess/sharedProcessMain.js:47:212029)
    at async G.doInstallFromGallery (file:///F:/Programming/Softwares/Microsoft VS Code/resources/app/out/vs/code/electron-browser/sharedProcess/sharedProcessMain.js:47:209233)

Then I downloaded it manually and tried to install but error happend again. Here is the log:

[2021-03-23 00:31:32.133] [renderer1] [error] invalid comment length. expected: 3755. found: 0: Error: invalid comment length. expected: 3755. found: 0
    at S (file:///F:/Programming/Softwares/Microsoft VS Code/resources/app/out/vs/code/electron-browser/sharedProcess/sharedProcessMain.js:47:192087)
    at file:///F:/Programming/Softwares/Microsoft VS Code/resources/app/out/vs/code/electron-browser/sharedProcess/sharedProcessMain.js:47:193482
    at F:\Programming\Softwares\Microsoft VS Code\resources\app\node_modules.asar\yauzl\index.js:37:7
    at F:\Programming\Softwares\Microsoft VS Code\resources\app\node_modules.asar\yauzl\index.js:133:16
    at F:\Programming\Softwares\Microsoft VS Code\resources\app\node_modules.asar\yauzl\index.js:631:5
    at F:\Programming\Softwares\Microsoft VS Code\resources\app\node_modules.asar\fd-slicer\index.js:32:7
    at FSReqCallback.wrapper [as oncomplete] (fs.js:524:5)

how to solve this problem?

krismael
@krismael
Hello, I begin my first project of code editing solo. Please how can I check that I have installed correctly VScode-java version for first time with all the required components ?
Prashanth Nandavanam
@forwardmeasure
Hello all, the project I am the architect of uses Java (Spring Boot), NodeJS, and Python, among other technologies. My Java developers use Eclipse, IntelliJ, and VSCode. I enforce our formatting guidelines via an Eclipse formatter file, and that works well for Eclipse and IntelliJ. With VSCode, however, I am unable to get it to use the Eclipse formatter file. I have tried specifying the absolute location like this:
"java.format.settings.url": "/Users/pnandavanam/eclipse-codeformatter.xml", but VSCode simply does not use it. I've got the usual Java extensions installed, and not much else (The RedHat and Microsoft Java extensions). Any idea on how to get VSCode to use my Eclipse formatter? Thanks in advance!
Snjeza
@snjeza
@forwardmeasure could you create an issue at https://github.com/eclipse/eclipse.jdt.ls/issues/new/choose ?
shane99a
@shane99a
In a monorepo with multiple java projects, why does the extension try to build all of them? How do I get it to stop?
Fred Bricon
@fbricon
@forwardmeasure you're facing redhat-developer/vscode-java#1827. Please try a CI build to check it's fixed in 0.77.0 for you
1 reply
HVEVB
@HVEVB

I had a project which compiled completely fine on another computer, but when I cloned the repo on my current computer, I'm getting this error when trying to compile

Exception calling "DownloadFile" with "2" argument(s): "Ett undantag uppstod under en WebClient-begäran."
At line:1 char:282
+ ... pe]::Tls12; $webclient.DownloadFile('https://repo.maven.apache.org/ma ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : WebException

Fel: kunde inte hitta eller ladda huvudklassen org.apache.maven.wrapper.MavenWrapperMain
Orsakades av: java.lang.ClassNotFoundException: org.apache.maven.wrapper.MavenWrapperMain

Translated version

Exception calling "DownloadFile" with "2" argument(s): "An exception occurred during a WebClient request."
At line:1 char:282
+ ... pe]::Tls12; $webclient.DownloadFile('https://repo.maven.apache.org/ma ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : WebException

Error: could not find or load main class org.apache.maven.wrapper.MavenWrapperMain
Caused by: java.lang.ClassNotFoundException: org.apache.maven.wrapper.MavenWrapperMain
HVEVB
@HVEVB
I can't even create a new project
Catarina Gamboa
@CatarinaGamboa
Hello everyone, I would like to create a VSCode Java Extension to enhance the existing VSCode Java features with a new kind of verification/diagnostic (related to refinement types in Java). I saw that this should possible (https://github.com/redhat-developer/vscode-java/wiki/Contribute-a-Java-Extension) and I was wondering if you could point me to a project that implements this kind of extension. Thanks in advance!
Catarina Gamboa
@CatarinaGamboa
Thank you for the fast response @snjeza!
charkins
@charkins
Anyone know how to prevent language server from truncating stacktraces when logging an exception? I'm hitting an issue with an annotation processor but most of the stacktrace is truncated ("... 25 more") and cannot see the root cause.
charkins
@charkins
Nevermind, apparently org.eclipse.jdt.internal.compiler.problem.AbortCompilation is the root cause and doesn't provide any sort of message.
Tom--
@schittli
Good evening, does anyone knows if:

Does VSCode offer an intellij Keyboard mapping?

Sandared
@Sandared
Hi everyone. Since version 0.80.0 the build status always stucks at 46% for our project without any more information or error messages. Is there a way to make this more verbose to see what's happening? Version 0.79.2 with the same project works perfectly fine
fvclaus
@fvclaus

I am using prettier to format my Java code and have trouble getting the import order right. I want to use organizeImports on save to remove unused imports, but it seems that organizeImports runs after editor.formatOnSaveand messes up the order again. I have tried to replicate the order of prettier-java in my settings, but the way vscode-java sorts imports seems to be incompatible with prettier.
prettier-java will format

import lombok.experimental.UtilityClass;
import lombok.val;

and vscode-java ("java.completion.importOrder": [])

import lombok.val;
import lombok.experimental.UtilityClass;

This is just an example. It seems to affect all import statements that have a different package "depth".
Is there a setting to change the order in which formatOnSave and "java.saveActions.organizeImports": true run? I also tried

    "[java]": {
        "editor.codeActionsOnSave": {
            "source.organizeImports": true
        }
    }

this will switch the output between prettier-java and vscode-java everytime the file is saved. Alternatively, is there a way to configure the package order in vscode-java without listing all possible packages?

Jacob Williams
@singlow
I have my java projects configured to use JavaSE-1.8 from build.gradle. That seems to be recognized in the status bar when editing a java file. However it seems that it allows me to use methods/classes that are from newer versions of java without complaining. My gradle build rejects it but in vscode it is just fine with me using List.of and autocompletes it even though it is not available in java 1.8.
BuZZ-dEE
@buzz-dee:matrix.org
[m]
hi, i'm missing cdi support in vscode? is there something i need to install ?
BuZZ-dEE
@buzz-dee:matrix.org
[m]
:point_up: Edit: hi, i'm missing cdi support in vscode-java? is there something i need to install ?
Massinissa Bouziad
@massi4j_twitter
@buzz-dee:matrix.org I'm using spring boot extension to resolve my beans. It's the only extension as far as I know that is able to do that. Unfortunately this extension doesn't resolve CDI annotation only spring support
1 reply
Massinissa Bouziad
@massi4j_twitter
hi, I'm trying to know if there is a limitation with maven support in vscode, as the language server doesn't resolve an additionnal source path added with swagger-codegen-maven-plugin.
This plugin generate javaClasses starting from swagger definition.
                <groupId>io.swagger</groupId>
                <artifactId>swagger-codegen-maven-plugin</artifactId>
                <version>${swagger-codegen-maven-plugin.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                        <configuration>
                            <inputSpec>/sompath/to/swaggerdef.json</inputSpec>
                            <modelPackage>com.my.model</modelPackage>
                            <apiPackage>com.my.api</apiPackage>
                            <language>jaxrs-cxf-client</language>
                            <generateApiTests>false</generateApiTests>
                            <configOptions>
                                <dateLibrary>java8</dateLibrary>
                                <sourceFolder>myfolder</sourceFolder>
                            </configOptions>
                            <output>target/generated-sources</output>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
1 reply
Pola-Haw
@Pola-Haw
Sorry, but I'm totally green and don't get anything. I just start learning and figuring out how to set everything up and what resources to use to learn comfortably (to extend it is possible). I'm just looking for help in this regard.
I don't know even which openJDK download for my Win7 64bit...
1 reply
phoebej89
@phoebej89
hello
Thomas Oster
@t-oster
Hi, I do have a project which uses my own annotation processor (https://lazysql.thomas-oster.de/). I got it working with using the maven-apt plugin as described here (https://github.com/redhat-developer/vscode-java/wiki/Annotation-Processing-support-for-Maven-projects). The problem is if the annotation processor throws a compiler message or warning, it is not displayed in the IDE.
ninadpawar925
@ninadpawar925
how to run java frame program in vs code
dr3s
@dr3s
I want to confirm some behavior before opening a github issue. No matter what I change, my multi-module gradle project in VSCode creates classpath entries and compiles code to bin instead of build whether the default or set explicitly. Is there anything I can check that would be misconfigured? This seems like a clear bug that I can't work around because the setting isn't able to be changed for the JLS when gradle is used.
dr3s
@dr3s
https://docs.gradle.org/current/dsl/org.gradle.api.Project.html#org.gradle.api.Project:buildDir says the default is build. I have searched for the term build and bin in my source and I got nada. I tried setting buildDir in settings.gradle and nothing. I would be happy to provide my gradle properties, screenshots in vscode, and logs if you like.
image.png
dr3s
@dr3s
image.png
back to intellij I guess
charkins
@charkins
How can I tell what version of jdt.ls is being used by vscode-java? I appear to be getting hit by https://bugs.eclipse.org/bugs/show_bug.cgi?id=377850 which was fixed ~4.15
Snjeza
@snjeza
@charkins You can run Java: Open Java Language Server Log File and find a line like the following:
!MESSAGE Initializing Java Language Server 1.5.0.202110161628
charkins
@charkins

!MESSAGE Initializing Java Language Server 1.5.0.202110190407

So I assume the fix in bug #377850 is in. Must be a regression or being triggered another way.

Snjeza
@snjeza
@charkins you can create a new issue at https://github.com/redhat-developer/vscode-java/issues
charkins
@charkins
Pretty sure the issue is upstream in the language server, so i'll probably try up there first. Thanks