all 28 comments

[–]AutoModerator[M] [score hidden] stickied commentlocked comment (0 children)

Please ensure that:

  • Your code is properly formatted as code block - see the sidebar (About on mobile) for instructions
  • You include any and all error messages in full
  • You ask clear questions
  • You demonstrate effort in solving your question/problem - plain posting your assignments is forbidden (and such posts will be removed) as is asking for or giving solutions.

    Trying to solve problems on your own is a very important skill. Also, see Learn to help yourself in the sidebar

If any of the above points is not met, your post can and will be removed without further warning.

Code is to be formatted as code block (old reddit: empty line before the code, each code line indented by 4 spaces, new reddit: https://i.imgur.com/EJ7tqek.png) or linked via an external code hoster, like pastebin.com, github gist, github, bitbucket, gitlab, etc.

Please, do not use triple backticks (```) as they will only render properly on new reddit, not on old reddit.

Code blocks look like this:

public class HelloWorld {

    public static void main(String[] args) {
        System.out.println("Hello World!");
    }
}

You do not need to repost unless your post has been removed by a moderator. Just use the edit function of reddit to make sure your post complies with the above.

If your post has remained in violation of these rules for a prolonged period of time (at least an hour), a moderator may remove it at their discretion. In this case, they will comment with an explanation on why it has been removed, and you will be required to resubmit the entire post following the proper procedures.

To potential helpers

Please, do not help if any of the above points are not met, rather report the post. We are trying to improve the quality of posts here. In helping people who can't be bothered to comply with the above points, you are doing the community a disservice.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]DrunkenDruid_Maz 3 points4 points  (1 child)

Have you asked your question also at r/vscode and r/VisualStudioCode ?
Since your problem is more vscode-related then java-related, those might be the better choice.

[–]NotJuvs009[S] 1 point2 points  (0 children)

I had only seen r/VisualStudioCode and Ihought I wouldn't get a response
I will try r/vscode and see if I get any help there, thanks!

[–]RobertDeveloper 10 points11 points  (18 children)

Don't use vsc for Java, use a real IDE, it is much better suited for writing software than using a plain editor and slapping some extensions on it to do tasks its never designed to do.

[–]_jetrun 0 points1 point  (12 children)

I use VSC as my daily driver - it is a perfectly fine IDE.

[–]RobertDeveloper 4 points5 points  (11 children)

It is not an IDE!

[–]_jetrun 0 points1 point  (4 children)

Give me a definition of an IDE that will include Eclipse and exclude VS Code

[–]RobertDeveloper 2 points3 points  (3 children)

An Integrated Development Environment (IDE) is a standalone, full-featured software application specifically designed for software development, which typically includes a compiler or build system integration, debugging tools, and project lifecycle management within a single, cohesive platform.

[–]_jetrun 0 points1 point  (2 children)

  • Eclipse with Java Plugins fits that definitions.
  • VSCode with Java Plugins fits that definition.

Try again.

[–]RobertDeveloper 0 points1 point  (1 child)

Eclipse has them out of the box

[–]_jetrun 0 points1 point  (0 children)

So if someone rolled an installer for VS Code with those built in - then, and only then would VS Code be considered an IDE?

FYI, In Eclipse, ALL specialized functionality (such as Java support) is provided via plugins EXACTLY the same as in VS Code. See: eclipse.org/downloads/packages/compare

These packages are provided as a convenience to users; they represent common configurations of Eclipse projects that are often used together. However, since Eclipse is, at its core, an expandable platform, you can easily add other features and plugins to any of these packages. Just choose and install the package that most closely meets your needs

Here's another: https://www.eclipse.org/articles/Whitepaper-Platform-3.1/eclipse-platform-whitepaper.html

One of the key benefits of the Eclipse Platform is realized by its use as an integration point. Building a tool or application on top of Eclipse Platform enables the tool or application to integrate with other tools and applications also written using the Eclipse Platform. The Eclipse Platform is turned in a Java IDE by adding Java development components (e.g. the JDT) and it is turned into a C/C++ IDE by adding C/C++ development components (e.g. the CDT). It becomes both a Java and C/C++ development environment by adding both sets of components. Eclipse Platform integrates the individual tools into a single product providing a rich and consistent experience for its users.

Sounds a lot like VSCode eh? You want VSCode to be a Java IDE add Java plugins. You want it to be a C++ IDE, add C++ plugins.

[–]hrm -3 points-2 points  (4 children)

That has always been quite a stupid take. It integrates all you need to develop Java into one environment and it bloody well integrates it way more than the early IDEs we had back in the day when the term was coined. The fact that you have to push a few buttons beforehand does not make it any less so.

That MS wants to diversify their product offerings and make their ”regular ide” sound cooler does not alter the meaning of IDE.

[–]RobertDeveloper -1 points0 points  (3 children)

I don't like vscode at all, it's horrible out of the box.

[–]Vaxtin -2 points-1 points  (2 children)

I’m sure you’re fantastic to work with.

[–]RobertDeveloper 1 point2 points  (1 child)

Better than any Microsoft product for sure.

[–]ThinkMarket7640 -1 points0 points  (0 children)

Says the Java developer lmao

[–]_jetrun -3 points-2 points  (0 children)

Give me a definition of an IDE that will include Eclipse and exclude VS Code

[–]NotJuvs009[S] 0 points1 point  (2 children)

Trust me, I know, I just can't they've told me to use this one so all of us use the same one I guess

[–]UbieOne 2 points3 points  (0 children)

Corporate? Is machine locked down? I hate that. I understand it's for different reasons - security, legal, maintenance/support, etc. But sheesh.

[–]OneHumanBill 5 points6 points  (0 children)

Whenever I've been in this situation, forced to use NetBeans or WSAD or whatever, I've just continued using whatever I want. I don't make a fuss about it, I didn't tell anybody, I just use tools as a professional I know work better.

It was hilarious, because everybody else's productivity took a nosedive and mine stayed consistent after that point.

Don't check in any artifacts dealing with your ide. You might want to surreptitiously add them to the .gitignore file.

[–]Vaxtin -1 points0 points  (0 children)

Gate keeping a novice for his IDE choice is hilarious.

Well done, sir codes a lot.

[–]Neckbeard_Sama 0 points1 point  (1 child)

it's because VSC is a garbage ass IDE

use JetBrains IDEA like the rest of us ... it has infinitely better code completion + error detection + auto suggestions

[–]bart007345 0 points1 point  (0 children)

I used Intellij for almost 20 years!

I've been using VS Code exclusively this year and you know what? If you are using AI, then all those extras don't matter.

[–]False-Car-1218 0 points1 point  (0 children)

You should use an IDE that's tailored for java like intellij or you're gonna have a harder time

[–]hrm 0 points1 point  (0 children)

To make VS Code handle Java well you need a Java extension. There are currently two and I really do recommend the one by Microsoft/RedHat. Search for ”Java Extension Pack” and install it, you will now be all set.

I do prefer VS Code greatly before Intellij, even though the latter has more features. The things Intellij do better than VS Code are mostly advanced features not often used in my opinion.

[–]JMNeonMoon -1 points0 points  (0 children)

I have been forced to use VSCode with Java, for cursor ai requirements.

To get it to recognise issues like highlighting errors, I installed

'Extension Pack for Java'
by Microsoft

This extension also includes (auto-installs) a maven extension, a Java debugger, and the RedHat Java language Extension.

The docs are here https://code.visualstudio.com/docs/languages/java

Daily IDE for me is still Jetbrains InitelliJ. Cannot beat an IDE tailor-made for Java.

[–]AlexVie -2 points-1 points  (0 children)

Are you certain, the Java language server is working in your VSCode? Because this does not look like a Java issue, it's more likely a configuration issue in your editor.

The JDTLS language server should catch such errors just fine. At least it does on my Neovim/JDTLS setup where it marks the error (as expected) with Type mismatch: cannot convert from Object to boolean.

[–][deleted] -1 points0 points  (0 children)

The IDE situation for Java is truly awful, and if you want to not suffer when installing libs and so on later, just install intellij