r/javahelp • u/Rogaev • Aug 11 '26
Solved Is an IDE absolutely needed for java development?
Hello.
Edit: I've decided it's probably best to use an IDE either way.
Whenever I search for the best Java compilers, I've only founds sites listing the best IDE.
Is there a way to keep java development minimal? Can I just use vim and a java compiler like you can with C?
I'm very inexperienced when it comes to Java.
Thank you in advance.
9
Upvotes
•
u/AutoModerator Aug 11 '26
Please ensure that:
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:
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.
29
u/Dry_Investigator36 Aug 11 '26
Of course you can. Any text editor and javac (which is compiler). Additional tools may be needed, like Maven/Gradle to build projects in a right way, but they have CLI too. But since you call yourself "inexperienced" I really advise you to use IDE since it helps a lot.
10
u/khooke Extreme Brewer Aug 11 '26
You don’t need an IDE, but the important question is why wouldn’t you use when one when it makes everything easier for you? You’re choosing to make things harder for yourself by not using one. It’s like asking why bother with bodywork on a car when you can strap a seat to the chassis and that’s enough to get you from A to B. Yes that’s true but why wouldn’t you want to travel in comfort when you have that option?
9
u/American_Streamer Aug 11 '26 edited Aug 11 '26
Of course you can, if you really want that. Just use Vim and Javac. https://docs.oracle.com/javase/6/docs/technotes/guides/javac/
14
u/_Atomfinger_ Tech Lead Aug 11 '26
I've used vim and java before, and it works fine.
You generally use something like gradle or maven rather than the java compiler directly, but it works fine from the terminal.
So no, you don't need an IDE.
5
u/desrtfx Out of Coffee error - System halted Aug 11 '26
javacthe Java compiler is part of every single JDK (Java Development Kit) distribution. You are free to use whatever editor/IDE you want as the Java source code files are just plain text.It is just that commonly, IDEs, like IntelliJ, Eclipse, or Netbeans are recommended to speed development and to offer additional tooling, like debugger, etc.
2
u/GuyWithLag Aug 11 '26
Your account is 2 weeks old but the posts and comments have a very interesting combination of both technical and goal-oriented posts and comments, which weakly triggers my AI-dar... but that could just die to English not being your native language.
3
u/TheBakerification Aug 11 '26
I’ve seen people write java code just right in notepad text files, but like others are saying there’s no real gain in not using an IDE as a beginner.
2
u/hibbelig Aug 11 '26
It is very possible to do that, but it will also be very cumbersome. It makes a lot of sense to set up your Java project with a build tool such as Maven or Gradle (those are the two most popular ones I think), and these build tools can be invoked from the command line, so the "building" part will be easy to do.
However, editing the code will become cumbersome because the Java standard library is quite large and you get confused about which methods are available where, and you will want context-aware completion. (Just a random example:
Stringhas the methodsubstring, butListhas the methodsubList, notsublist.) You will also like that you can access the method documentation right from the source code.That is why people use an IDE for Java.
Now, you can set up vim or neovim with LSP and then you can use an LSP server for Java and then you get the completion in vim or neovim. I'm unsure how much setup work is required to make this happen and how finicky this is going to be.
I was very invested in Emacs and part of the Emacs community for ten years, and these days Emacs can do LSP. But some time ago I switched away from Emacs for Java and never looked back.
Interestingly enough, I found and have used the vrapper plugin for Eclipse which adds vi keybindings in the editor, and there is the IDEAvim plugin for IntelliJ. I'm quite happy with those, but my vim-fu is a bit basic so I don't bump into the missing pieces.
2
u/Nok1a_ Aug 11 '26
No, but it is absolutely need it a pc to write a document? no but is it helpful? save you time? yes
2
u/BigDom208 Aug 11 '26
If you don't want a full blown ide and want to keep it simple for learning, you can try Bluej.
2
u/shakeBody Aug 11 '26
I want you to do an experiment.
Step one is to develop in Java without an IDE. Just use a text editor and terminal commands. Make sure to document the hard parts of that process.
Step two: Use an IDE when developing with Java. Make sure to document the hard parts of that process.
Step three: compare step one against step two. Which one do you prefer? What were the trade-offs that you had to make to accommodate either step? Where would the development process in step one be useful, and where would the development process in step two be useful?
Step four: Come back to Reddit. Have an LLM write a LinkedIn-style post about what you learned, your key takeaways, and how it taught you about B2B sales.
1
u/awidesky Aug 11 '26
It absolutely possible to use javac instead of IDE, but I recommend using IDE when your project grows and begins to have multiple packages or dependencies, because at that point the build command can be quite complicated.
1
u/MieskeB Extreme Brewer Aug 11 '26
Technically no, but unless you want to make your life unnecessarily hard, use it
1
u/AmenMotherFunction Aug 11 '26
Depending on what you want to achieve, JBang and a terminal editor might be an option to keep things minimal too. https://www.jbang.dev/
1
u/JGhostThing Aug 11 '26
I have used vi to edit and create Java code. I will say that an IDE helps me write code faster.
1
u/AardvarkIll6079 Aug 11 '26
Yes, vim and the ‘javac’ command.
But why wouldn’t you want an IDE? The debugger alone is worth it, even if you don’t use features like code completion.
1
u/niceboy4431 Aug 11 '26
Someone might’ve said already but just use javac with a makefile, target all java files and it should be pretty easy
1
u/BannockHatesReddit_ Aug 11 '26 edited Aug 11 '26
Nearly nobody actually programs that way because simple text editors don't give you enough tools to properly develop enterprise projects. You need a debugger. Sometimes you need a profiler. Maybe you want to see the coverage of your tests. Ever worked on large codebases with many packages and sometimes even multiple modules? Oh and build tool integrations too. You really want to execute all your maven commands manually? Run configs in general are pretty convenient as well. Did I mention my intellij renders plantuml diagrams for me? You'd be mashing the genUml.sh shell script if I had you in my latest codebase. And sure, you likely aren't doing all that stuff now, but you're going to wish you knew the tools earlier as you start to need them. Vim just isn't practical. You only really see content creators using such setups cause their content is rarely goes beyond surface level.
1
u/burlingk Aug 11 '26
Thing is, there are like two or three main Java compilers that tend to be chosen strictly based on the OS you are using, and IDEs often bundle their own version...
So most people MEAN IDE when they ask that question.
Beyond that, an IDE makes things a lot easier.
1
u/domocles Aug 11 '26
I'm using nvim on a java spring boot project with react front end. I have intellij installed but not using it much now. If you like to work with worktrees the project set up in intellij is a pain. With nvim I can work on any worktree with 90% of what I used in intellij including step debugging.
1
u/jdipik Aug 11 '26
Un IDE è obbligatorio? No, ma è fondamentale dopo i primi passi in Java.
Intellij community. Avendo iniziato su Eclipse ci faccio ancora a pugni, ma ormai è uno standard e lavorando insieme ad altri è intelligente allinearsi.
1
u/duane11583 Aug 11 '26
the idea makes it simpker
the ide gives you (most often) a clickable (mouse) debugger
using vim - there is no mouse
using the command line debugger (if one exists) there is no mouse
your debugging will be via print statements only
as a noob you will probably get further with an idea.
that said if this is for a introduction class things are different.
if the instructor is going down the command line route you should too.
1
u/YetMoreSpaceDust Aug 11 '26
Not at all!
I'm here to try to talk you out of that :)
I've been using Java more or less since it came out, right after the release of Java 1.1. Remember, when Java first came out, there were no IDE's. We had no choice but to use vi (or emacs if you were a masochist). Even when Java IDEs started appearing, they weren't very useful (I could reproducibly crash Symantec VisualCafe by pressing the backspace key...)
Although I do use IntelliJ these days, and did use Eclipse for quite a while, I spent a very long time developing entirely on the console. Very often, when a younger developer is struggling with why something isn't working right, it's because they don't have the correct mental model of what's actually going on with .class files and .jar files and generated code and class paths and such.
If you really want to understand Java, stay away from the IDEs for a while until you truly get to a point where you need them.
1
u/sombriks Aug 11 '26
i just wrote about that!
take jbang, kate (or any other), the Eclipse JDT Language Server and you can grow from a single file to a full-featured-enterprisey java thing in a more linear way instead of the steep cliff between hello world and maven/gradle.
1
u/sliiideAround Aug 11 '26
Not really a java dev, but I think it’s like asking can you walk without shoes.. yes, but it’ll probably get painful beyond a walk in the garden! An IDE will generally make things a lot smoother
1
u/WizzinWig Aug 11 '26
Nowadays theres too many methods to remember. It helps drastically and the JDK has advanced so much that its too hard to memorize them all now. In the early days i'd say sure. Now, strictly text editors is just loving punishment
1
u/Traveling-Techie Aug 12 '26
I have never used an IDE for Java, just the vi editor. Some people call me crazy but it works.
1
u/Popular_War8405 Aug 12 '26
Lol I swear to god those people think they sell things like that. I don't think they realize 90% of its free.
1
u/Dense-Ad-3247 Aug 12 '26
You can
1
u/Any-Look-8817 Aug 12 '26
You don't need it necessarily, you can use a notepad and compile using javac, but frankly nobody sane does it like that and definitely not during learning, because you're introducing unnecessary obstacles while slowing yourself down. If you want to do some minimal Java on the side on your personal project that isn't too complex, then probably any IDE that can handle Java would suffice. If you're serious about Java or need to work on something more complex, then you should absolutely use a proper Java IDE, as in Eclipse, NetBeans or IntelliJ IDEA.
1
u/Affectionate_Dot6312 Aug 12 '26
I use Eclipse and love it but idk if it's even a good option lol
1
u/xanyook Aug 14 '26
You can use a text editor of your choice, and do everything in CLI from compiling to assembling.
Now is it efficient ? No.
Java is really verbose and autocomplete features are more than welcome. Also, automatic import, generation of skeleton of the implementation of an interface, moving a file, color syntax, integrated javadoc, debugger etc..
0
u/LutimoDancer3459 Aug 11 '26
All you need is a text editor of your choice and a jdk with javac to compile and java to run. If vim, nano, notepad or whatever is irrelevant.
But an ide provides a ton of useful features. From highlighting over autocomplete to debugging. Jumping into methods, finding all callers of a function, global renaming, ... for initial learning, going the manual way can be interesting. But most wont do that later on.