r/javahelp • u/KhazadDumBridge • May 25 '21
i program in JAVA and decided to switch to visual studio code, some very noob questions
i get totally frustrated from the confusing terms used in Java, i program at the university and find myself angry on simple questions that seems like everyone know except for me.
1 - what is JDK ?in a website like this: https://www.infoworld.com/article/3296360/what-is-the-jdk-introduction-to-the-java-development-kit.htm
'' Developers new to Java often confuse the Java Development Kit and the Java Runtime Environment. The distinction is that the JDK is a package of tools for developing Java-based software, whereas the JRE is a package of tools for running Java code. ''
JDK is meant for developing tools for java?
so why do i need intelliji or visual studio code ? and why do i need to download special extension for visual studio code in order to code Java ? after all, JDK will tend to it, right ?
2 - in visual studio it says
'' Java 11 or more recent is required to run the Java extension. ''
but what is ''java'' ? JVM ? JRE ? JDK ? something else ?
3 - lets continue reading this website:https://www.infoworld.com/article/3296360/what-is-the-jdk-introduction-to-the-java-development-kit.htm
'' Getting Java setup in your development environment is as easy as downloading a JDK and adding it to your classpath ''
and what does that mean ? what is a classpath ?
do i need to install JDK ? because i got JDK from redhat and it didn't had any installer file there.
Summary:i really don't understand why programs like visual studio code or intelliji are making it so damn hard to even start programming java.
here is an alternative reality: when i download visual studio code, it already download JDK (mind blowing, i know) , put it in correct place in the files, and set the ''classpath'' by itself. why do i need to tend to all of this stuff ?
25
u/Kraizee_ May 26 '21 edited May 26 '21
The JDK is what you need to develop anything with java. Most importantly it contains the java compiler and the JVM. The compiler will take your java code and turn it into bytecode (this is the .class file you might have seen) and the JVM is what runs your java application (it executes the bytecode).
So why do you need vscode or intellij? Well technically you don't. Aside from a text editor for you to write your java code, everything you need to develop java applications is contained within the JDK, it just isn't a great development experience to not use and ide like intellij or vscode (with its extensions). I suppose a useful comparison would be to say, do I need a hammer to build a house? Well no, you could use a block of wood to hammer in all of your nails, but a hammer is a tool designed for that problem and will make your life a thousand times easier. Except this particular hammer also has a bunch of extra features that make your now easy life even easier.
Why does vscode need extensions? Because vscode doesn't know about java on its own. The extension tells vscode where it can look for the compiler and other tools to help improve your development experience.
What is java 11? You can use java 11 and JDK 11 interchangeably if you want. Googling java 11 will get you the download you need.
Do you need to install java? Not in the traditional sense. There isn't usually a one click installer like there are for other applications. But installing java in this case means downloading the JDK and setting up the PATH environment variable and JAVA_HOME environment variable to include your JDK download. This is so that programs like vscode know where to look for the version of java you downloaded.
Lastly, your rather sarcastic take on vscode at the end is actually already a thing. https://code.visualstudio.com/docs/languages/java see the section about the "coding pack for java" it is a special build of vscode that includes everything you need for java development
-9
u/KhazadDumBridge May 26 '21
thank you for your replay, but this is still not enough.
right now, both in intelliji, and in VScode, there is no simple strightforward thinking about installing JDK.
first of all, i have downloaded JDK from redhat, it's a bunch of meaningless files i have no clue what to do with.
second, they way i configure my PATH is not clear, i wish it was simple like a big nice button of ''configure PATH''and than i simply copy-paste there the location i have saved the JDK files from redhat, but there is no such thing.
this is why i always feel i miss something. your explanation is very good, but it doesn't reflect the reality of the IDE that makes it 100X more complex when it's not...
so you say 1 thing, but the IDE in his complexity says another thing. so who is right and who is wrong ?
10
u/AreTheseMyFeet May 26 '21
first of all, i have downloaded JDK from redhat, it's a bunch of meaningless files i have no clue what to do with.
Did you try reading the installation instructions on the page you downloaded from...?
so who is right and who is wrong ?
They are right, you are wrong. Your own confusion and frustration doesn't mean these are bad tools only that you don't yet know how to use them.
-15
u/KhazadDumBridge May 26 '21
i see, so if you make a beautiful software, and your users are getting ''confusion and frustration '' , you will say to them, and i quote:''. Your own confusion and frustration doesn't mean these are bad tools only that you don't yet know how to use them.''
good luck with this attitude, trying to sell software products to people...
i am sorry if it turns out aggresive, but it had to be said.
epdate: i didn't find any instructions in the JDK in redhat. instead i had to find it in medium website:https://medium.com/@tariqul.islam.rony/learning-java-and-spring-boot-with-visual-studio-code-vscode-part-1-54073f2fa264
this has worked. and i still think the installation process is not acceptable. it should have been easier.
15
u/AreTheseMyFeet May 26 '21
i see, so if you make a beautiful software, and your users are getting ''confusion and frustration '' , you will say to them, and i quote:''. Your own confusion and frustration doesn't mean these are bad tools only that you don't yet know how to use them.''
If I make end-user products, no - I wouldn't. But if I'm making tools for professional developers then I'd expect them to have a higher level of understanding of what it is they're doing and what it is they need.
i am sorry if it turns out aggresive, but it had to be said.
Not aggressive. Entitled and petulant is how I read it. You are a very new developer who can't see the forest for the trees. At this stage of your education you just have to accept that things have usually been done in a certain way for good reason. If you want to explore what those reasons are you are of course welcome to go delving in to those topics but all you are doing here is complaining that it's "too hard" or "doesn't make sense". I hope for your own sake you can get beyond that attitude before you get a lot farther in to your education because blaming anybody other than yourself is usually a fruitless endeavour. In development, when something doesn't work, 99.99999999% of time it's the developers fault - not the tools.
Edit: If you feel you can create better, easier to use tools then by all means go ahead.
You wouldn't be the first though: https://sdkman.io/-8
u/KhazadDumBridge May 26 '21
you know, in IBM they had the same mindset of treating the end users the same way - you don't understand ? that's too bad, and your fault, here is a 1000 page book for you to understand.
in my view, the programmer job is to program, to deal with the busy work of setting up his IDE.
we can expend your logic and say the developer must configure the CPU directly, because he is a developer and he is expected to know and do everything related to his code.as you said, IDE are made for a reason - to make the text editing of the developer easier.
does it mean that the developer who uses IDE is ''Entitled and petulant'' ?7
u/Stack_Canary May 26 '21
"the programmer job is to program, (not?) to deal with the busy work of setting up his IDE"
You are going to get the shock of your life when/if you get over your attitude and land a job lol
-7
8
May 26 '21 edited May 26 '21
in my view, the programmer job is to program, to deal with the busy work of setting up his IDE.
So you expect that you get a job as a programmer. The company will call every single specialist to:
buy a computer for you
set up the environment for you: OS, IDE, etc.
connect all services for you
so you can just sit and "write" your programs.
Or and if there is a problem with the compiler, the company will call another specialist to sort it out so you can continue "writing the programs".
Yeah, good luck with that.
3
u/TheLuckyLion May 26 '21
i didn't find any instructions in the JDK in redhat. instead i had to find it in medium website:https://medium.com/@tariqul.islam.rony/learning-java-and-spring-boot-with-visual-studio-code-vscode-part-1-54073f2fa264
This is what professional software development looks like. You are never going to know everything you need to in order to build software, but chances are somebody already dealt with what you are dealing with and have posted about it online. A major part of my day as a software engineer is googling things. Especially when you are dealing with errors and debugging. So don’t get frustrated and throw your arms up, take a deep breath and google it.
1
u/nebneb432 May 26 '21
VS Code is not designed to only program in Java. It is designed to allow the user to program in any number of programming languages, each of which has to be set up separately to work with VS Code.
Similarly, the JDK is designed to be used in many different editors (or none at all) and so the setup differs between editors.
I do appreciate that this makes it complicated and confusing.
2
u/Kraizee_ May 26 '21
Installing the JDK just isn't that complicated. I don't know whether you just haven't properly read a guide or what. But follow these instructions.
Windows
Download the build from here https://jdk.java.net/16/
Extract it to
C:/Program Files/Java/java16or whatever location you wantGo to your environment variables (In windows search type "Environment Variables" -> Click "Edit the system environment variables" -> click "environment variables")
Find the
PATHvariable for the userAdd
C:/Program Files/Java/java16/binto the path variable(optional) Add
JAVA_HOMEvariable(optional) Add
C:/Program Files/Java/java16to java_home variable (without /bin)Save
Restart cmd window and/or applications that would use java
Linux
See https://dzone.com/articles/installing-openjdk-11-on-ubuntu-1804-for-real
Change the version numbers and download urls to whichever version you wish to take from https://jdk.java.net/16/
1
u/KhazadDumBridge May 26 '21
hi that is actually super clear, thanks.
but it still doesn't explain how VScode or intelliji will be aware of the actions i did (of settings the PATH) , how do i inform them that i have added a PATH ?
also, i have installed JDK in VScode on this instructions (windows 10):
and i went to environment variables and didn't find any PATH for the JDK i have downloaded for VScode.
and my java is now working ok in VScode, so how is that possible ?
2
u/Kraizee_ May 26 '21
Vscode looks at your PATH variable to find the java directory that you add to it as I explained in my installation instructions. Environment variables exist for applications like vscode to be able to find installations of particular software.
-1
u/KhazadDumBridge May 26 '21
lets say i have added 3 PATH variables, how VScode knows which one to pick ?
2
u/Kraizee_ May 26 '21
You shouldn't put multiple versions in there, but if you do the first one in the list will be the one that is used.
-2
u/KhazadDumBridge May 26 '21 edited May 26 '21
i have just now deleted all the PATH variables from the list of environmental variables to test, it's now completely empty (the user variable list is empty, not the system vatiables list).
and java in VScode still works. gives me ''hello world'' without a problem
i think they have design a new way for VScode to interact with the JDK, as i said, you can see it in:
5
u/Kraizee_ May 26 '21
Well yeah, if you tell the vscode java extension to use a specific java path with the "java.home" vscode setting then it will use that. This is documented behaviour. See https://github.com/redhat-developer/vscode-java#java-tooling-jdk
Using environment variables is the common way of telling a piece of software where to find some information. Use whatever you like.
1
12
u/MattRighetti May 26 '21
There are already some good answers above, I just wanted to suggest to use IntelliJ for Java programming, it will make your life easier
-4
u/KhazadDumBridge May 26 '21
thanks !
Intellij is very confusing, i am sure it has many good plugins and tools to help the programmer, but it has the amount of buttons like a jetfighter pilot seat. too much. and without any logic of arranging the UI of it..5
u/wildjokers May 26 '21
IntelliJ is organized very well. VSCode on the other hand is both a visual and organization nightmare. I don't see how you could possible believe VSCode is more organized than IntelliJ. Have you seen the settings page of VSCode? Just one long list of thousands of settings vomitted onto a single page.
-3
u/KhazadDumBridge May 26 '21
yeah, but at least it's not entered into a sub-sub-sub-sub category which will never be found in intellij...
1
u/wildjokers May 26 '21
IntelliJ settings dialog has a search function which will take you straight to the appropriate setting.
IntelliJ, like all IDEs, are large applications that have a lot of features. They are going to have a learning curve. Also, IntelliJ is written for developers so it assumes a certain level of knowledge of the Java ecosystem. There is obviously a learning curve for any ecosystem new to you.
1
u/Pay08 May 27 '21
IntelliJ settings dialog has a search function which will take you straight to the appropriate setting.
I'm pretty sure VSCode has that too.
3
u/MattRighetti May 26 '21
Naaa don’t worry about that, you just need the play button to start the program as a beginner 😁
-6
8
u/1-12TH May 26 '21 edited May 26 '21
If you want to just download an application and write some Java code, get the bundled version of jGrasp. It is a simple tool, with very few features but it installs the JDK and everything for you.
I teach Java to school kids and that is what they use.
You also need to relax, coding is just problem solving, and if this small inconvenience causes you to have a tantrum maybe coding is not for you. I know it's frustrating when things don't work but when the most popular code editor on the planet is not working for you, maybe step back and think ok maybe it's something I'm doing wrong.
-4
u/KhazadDumBridge May 26 '21 edited May 26 '21
look, you have probably has set so many IDE in your life you can do it without thinking, even if i will wake you up from sleep you will be able to do it. of course you will feel my questions are strange.
but to be honest, let's imagine a reality where the user needs to set more than the JDK to start coding Java, but also set his CPU , his BIOS , his GPU, his RAM, and understand deeply how the logic of his electric circuit works. imagine you are a teacher for java that knows to do all this stuff, of course even than you will feel like you can do all that in your sleep without a problem.it still doesn't mean that nothing is wrong... get my point ?
if i want to code, i want to open up a computer and code the same way i write.i don't need to set the JDK for my pen, i just lift the pen and write.
you are like the priest at the 14th century that says ''of course you need to know the bible if you want to write with your pen, there is no way around it, don't throw tantrums on this, after all, everybody thinks the same like me"
(no offense, just making a point :) )7
u/Murder_Badger May 26 '21
Dude your attitude is not in line with reality. I started learning to code in java about a year and a half ago, and now I'm a Java developer. Noone seems to have as many problems setting up projects as I do. So you can't tell me I don't know what it's like to be a beginner, I am a beginner.
I don't know what you want people to tell you. You want to hear from experienced devs and teachers, and your response is "well you are too experienced".
Your ego is standing in your way, it is making excuses for your frustration when like this whole process is just problem solving and managing frustration.
And frankly, if you want a language you can just pick up and write, Java probably isn't for you. Java is a lot of set up, a lot of persistence, reliability, ceremony, stability. I love Java but it is an enterprise language.
0
u/KhazadDumBridge May 26 '21 edited May 26 '21
as i said, we could have an alternative reality where we need to set not only JDK, but also the motherboard and the fans of the computer, and you would have still told me the same thing: writing java is about problem solving. and not complain
but where does it end ? where do you put a limit to it and say this is too much to handle for settings up a language to code at ? from your words it seems you will be totally fine no matter how absurd the UI will look like, because for you it's just another challange.
i personally don't think it's a good way to approach software
3
u/Murder_Badger May 26 '21
I get frustrated with this as well. But this is not the alternative reality. Other people have answered you re: intellij, that all of the set up is there because the uses of this tool are exceptionally granular.
Going back to your example of writing, what if you were writing a letter to your grandma, vs filling out a form for a loan, vs writing an essay for school. The amount of stuff that you are taking for granted, because you don't know what you don't know, is skewing your perspective of this problem.
We as developers don't often have our choice of tools. Fighting through the frustration will be good practice, but first get out of your own way. Sit your ass down and deal with the problem. Take breaks, get sleep, drink water and learn to deal with this frustration. Because it is going to be an intrinsic part of your journey, and if you can't handle it then you aren't cut out for this. So handle it.
0
u/KhazadDumBridge May 26 '21
if you can answer my last final question, it would be great:
https://www.reddit.com/r/javahelp/comments/nlu6q9/make_a_bunch_of_files_have_meaning_some_very_noob/
13
May 26 '21
Visual studio mixed with java screams rookie programmer very loud. Don't waste your time and go with intellij (it was made for java)
-1
u/Kraizee_ May 26 '21
Yeah, being a senior developer for 5+ years now and using vscode for java for almost 4 years means I'm a rookie. This kind of attitude towards an entirely subjective matter is incredibly toxic. Regardless of the struggle's of this peticular OP, individuals can use and choose whichever IDE/Editor they like. As long as you are comfortable and happy with your choice it has no bearing on your level of skill and any attempt to suggest otherwise is absurd.
10
May 26 '21
There may be some exceptions, but finding a developer that complicates himself with visual studio code and java is a red flag for me
-3
u/Kraizee_ May 26 '21
What do you believe is complicated about vscode with java? Personally I'd say a red flag comes from a developer that cares more about the editor/ide someone uses than the quality of their output.
0
u/roberp81 May 27 '21
maybe they say that because you don't want to use the best tools, you can use a notepad in your home but not at work.
I'm senior developer + 14 years, I have Sun certification lol.
-1
u/Kraizee_ May 27 '21
Best is purely subjective. I am using the best tool for me and my workflow. I, like any other developer, should be able to use whatever tool I like, unless a workplace has developed and uses their own specific IDE plugins to aid development.
1
u/roberp81 May 27 '21
best is not subjective. you need to start learning from people who know more than you. because of experience and years of fights. when you are prepared you can use whatever you want.
I'm learning English here.
0
u/Kraizee_ May 27 '21
best is not subjective.
What's the best car? What's the best country? What's the best food? What's the best movie? What's the best book? What's the best language? What's the best social media platform? What's the best IDE? What's the best editor?
Sorry, but best is entirely subjective. Beginners can learn with whatever software they like, be it eclipse, intellij, vscode, netbeans, vim, etc. Developers need to stop gatekeeping beginners.
0
u/roberp81 May 27 '21
What's the best car?
Ferrari F50.
What's the best country?
New Zealand.
What's the best food?
Milanesas napolitanas con papas fritas.
What's the best movie?
Pacific Rim
What's the best book?
Ender's game.
What's the best language?
Java
What's the best social media platform?
What's the best IDE?
Eclipse
What's the best editor?
Word.
You're Welcome.
PD. beginners need to follow tutorials, they can't choose about things they don't know.
1
u/KhazadDumBridge May 26 '21
if you can answer my last final question, it would be great:
https://www.reddit.com/r/javahelp/comments/nlu6q9/make_a_bunch_of_files_have_meaning_some_very_noob/0
May 26 '21
[deleted]
-1
May 26 '21
[removed] — view removed comment
0
May 26 '21
[deleted]
3
u/NautiHooker Software Engineer May 26 '21
Keep arguments civil guys.
If you have different opinions then discuss them, dont just call each other stupid...
Your comments have been removed.
0
u/Kraizee_ May 26 '21
See you can't even tell me why you think it is bad or amateurish. Like I said originally, IDE/editor usage is entirely subjective. You can't attack someone for making a choice that fundamentally only matters to themselves. If an IDE/editor fits the workflow of an individual, then that one is the best for that individual.
-2
u/KhazadDumBridge May 26 '21 edited May 26 '21
Intellij is very confusing, i am sure it has many good plugins and tools to help the programmer, but it has the amount of buttons like a jetfighter pilot seat. too much. and without any logic of arranging the UI of it..
2
u/dhanushan75 May 26 '21
Intellij and vs code are simply tools to help you code faster. Say you declare a String,now you need to include the package for the Strong class which is usually this -
Import java.util.String;
By using ide you don't need to type the above import statement you can just press a hotkey which will import the package for you.
The thing with vs code is it wasn't developed with java in mind so you need plugins for it to work. This plugin could be for auto importing necessary packages like the above import statement. Hence it is usually advised to use an ide that is meant for java. If you don't like intellij then don't worry you can go with other ide like eclipse. I personally use eclipse and even though people keep saying intellij is better I prefer eclipse over it. Not just me, a lot of developers in my company prefer it over intellij. But at the same time some prefer intellij.
What I'm trying to say is intellij, vs code, eclipse they are meant to make it easier for you. If you feel like intellij is confusing then pick either the one that best suits you
2
u/roberp81 May 27 '21
+10 for eclipse
i prefer eclipse, then netbeans, then intellij, then vim, then emacs, then vscode
0
0
u/KhazadDumBridge May 26 '21
if you can answer my last final question, it would be great:
https://www.reddit.com/r/javahelp/comments/nlu6q9/make_a_bunch_of_files_have_meaning_some_very_noob/1
1
0
May 26 '21
[deleted]
-1
u/KhazadDumBridge May 26 '21
it's just not intuative, if i want to replace JDK, there is no clear button to go to in order to set it up.
there is no button to set plugins clearly, as i said - a pilot seat, with lots and lots of buttons with categories and sub categories which are unclear.
sure, i can learn them, and get used to it, but if i would be frank - why would i ? it's like being a bureaucrat, a bureaucrat knows the ins and outs of the complicated system he lives in, but if the system is to simplified, than this bureaucrat is useless.
intellij is the same idea: if we have a senior developer who is very experienced at intellij because he saves time by using buttons and settings there.and on the other hand we have a beginner who uses a much better cleaner, understandable software.than they finally become equals, in a way. and this is bad.
seniority in coding should be expressed at the quality of your code and your experience at using code, not by your experience of ''who knows this shitty UI of this IDE''
11
u/nutrecht Lead Software Engineer / EU / 20+ YXP May 26 '21
If you want to be a developer you have some serious attitude issues to fix first. If you already get stuck on the trivial stuff (like installing a JDK and an IDE) you're going to run into a lot of frustration when you get to the hard parts.
-3
u/KhazadDumBridge May 26 '21
i have coded a 3000 lines of code projects in java so far, i had to deal with a lot of challenges, and yet this thing still bothered me a lot. so it's not about me being lazy, in my opinion
5
u/General_C May 26 '21
So there are a lot of good answers here which already answer your questions, but I wanted to touch on something I haven't seen the others remark on, which is why there are distinctions like this, and why it's important to know about them.
Setting up an environment is not an easy task. In the tech industry, every project you job will set up their environment differently, because there are many ways to do it and the most efficient method will depend on what they need the environment to do. Some projects use java 11, but there are still many out there that use java 8, or even lower versions, but any number of different reasons.
So, it's not always an option to just download some ide and start coding right out of the box. And when you experience that, you will be glad to understand the different options and some basics in how to set up your environment yourself. It's something I wish my university had spent more time on.
Personally I consider there to be multiple parts of the software development process. The first is setting up the environment and the configurations of the technologies you're using. I hate this step because there are always so many things that need to be configured and there is always room for something to go wrong. Trust me, learn this stuff early, and understand the how's and why's, so you can save yourself a lot of pain later on.
-1
u/KhazadDumBridge May 26 '21 edited May 26 '21
do you think it's going to change in the future ?i mean, i understand the IDE want to give the developers a choice about how they are going to use and install their program.
but why is it, that programmer, the population who is so super smart at giving sophisticated tools like google, facebook, windows, android in such a clear way, are doing such a terrible job at giving IDE which are: confusing, clumsy UI, unclear installs, and so on ?
lets put it like this: if the IDE developers knew they are going to lose money for making bad UI, they would have made better UI. they make a bad job because they don't have incentives to make it better.
2
u/Steelersrawk1 May 26 '21
I think a big step you are missing is that in cases like this, where the JDK isn't installed FOR you and such, you are looking for everything to be done for you.
Sometimes that is not a good idea. An example is like this: Let's say I am a developer for an application that was written in JDK 8, but I am also developing a new application for that company in JDK 11. It would not make sense to block me / inhibit my ability to use two JDKs on one machine, so instead they rely on the idea that I can google how to do those things if I need to (Or in Oracle's case, they have documentation on how to do every single part you are having trouble with: https://docs.oracle.com/en/java/javase/16/install/installation-jdk-microsoft-windows-platforms.html#GUID-96EB3876-8C7A-4A25-9F3A-A2983FEC016A )
They do not want to give you a hand holding experience so you can be flexible with how you install them.
I do see a lot of people here recommending IntelliJ, but honestly based on how you have been against it, I would say go with Eclipse. Eclipse is what most colleges/schools introduce as your first IDE as it is a bit easier to set up. Eclipse will do a lot of the work for you, since it is made primarily for Java.
-1
u/KhazadDumBridge May 26 '21
if you can answer my last final question, it would be great:
https://www.reddit.com/r/javahelp/comments/nlu6q9/make_a_bunch_of_files_have_meaning_some_very_noob/0
5
u/Ariakkas10 May 26 '21
When you learn the tools, they aren't hard anymore.
Learning them is the hard part. They're a dream to use after you've learned them
8
u/HansVader May 26 '21
Reading all those comments from OP makes me think of a troll. VSCode for Java lol
0
May 26 '21
[deleted]
4
u/nekokattt Extreme Brewer May 26 '21
Reading those too, I feel like this kinda relates to https://xkcd.com/927/ conceptually at this point
0
u/KhazadDumBridge May 26 '21
i clearly explained why it's not straight forward. if you don't understand by now, don't bother commenting. it's not going to help me or you
0
May 26 '21
[deleted]
0
u/KhazadDumBridge May 26 '21
no problem:
right now i have a file with about 10 .java files, and i want to run them in intellij.
how do i do that ? so i try to guess and click at upper bar ''file'' and than ''open'' and than i find all the .java classes, mark them and activate them. and it doesn't do anything. and i have no clue how to continue, maybe put all the files in the directory where normally all the running code of intellij is nomrally located ? nope, doesn't work either.so the process of opening java files is not intuitive. how to make this bundle of files work and become a living code in my intellij ? i don't know.
2. i had to add some plugin that monitor my grammer at java and inform me if it doesn't follow university protocol, so i go to upper bar, which hold names like ''code'' ''reactor'' ''navigate'' - too general names that can be applied to any scenario, but ok, i go to ''tools'' than i click ''XML tools'' (what is XML ? maybe XLL ? or XBX ? i mean, why confuse people ?) and than (after i hope i placed my plugin in the correct location, another un-intuative issue) i click the plugin, and hope it doesn't give me error for some unclear reason. later on i discovered i had to go to some sub-sub-sub-sub-sub (not kidding you) category, check some box there, and than the plugin will finally work.
if i weren't at the uni with 100s of people around me struggling with the same problems, i could have kissed this problem goodbye. this is not good indicator.
3. no nice plugin store for intellij, with popular plugins for common problems, like for example the google chrome store.
4. there was a lot more, this were kind of problems where i was requeired to add something a bit more complicated than a simple code line, for example a new library for graphicly showing something, and i had to go to strange sub categories and check boxes, and now i totally forgot how to do it again, so if i need to do it again i will be stuck unless i had wrote it down somewhere.
no easy why to add stuff into the system, or extract it out, that's how i would summaries it.
0
May 26 '21
[deleted]
0
u/KhazadDumBridge May 26 '21
sigh, look, if you wanna mock, than mock. if it makes you feel good, who am i to argue in front of the mighty HyenaBrilliant
0
May 26 '21
[deleted]
0
u/KhazadDumBridge May 26 '21
i gave you detailed examples as much as i could, i think i have presented my case ok.
maybe i could have made my case better, if i understood better intellij, unfortunately, i don't. and i didn't saved detailed documentation about the problems i had.
also, if you wanted to keep the conversation civil, i would advice against referring me to 11 years olds, that's not adding anything. wanna call me stupid ? than go right ahead.
7
u/ignotos May 26 '21 edited May 26 '21
1 - what is JDK
The JDK is basically the Java compiler and various smaller tools. You need it to develop anything with Java.
The JRE is what users need to have installed to run Java programs.
The JDK basically also includes the JRE, so if you have the JDK installed you don't also need the JRE.
so why do i need intelliji or visual studio code ?
The JDK doesn't include a fancy text editor or anything like that - only command-line tools for compiling and running Java programs. If you want an actually nice editor with fancy features, that's separate.
2 - in visual studio it says
"Java 11 or more recent is required to run the Java extension."
You should just need the JDK installed.
and what does that mean ? what is a classpath ?
The article is wrong here. Classpath is a different concept, and your JDK doesn't need to be on the classpath.
do i need to install JDK ? because i got JDK from redhat and it didn't had any installer file there.
You generally just unzip the JDK somewhere, and then point your tools to that location.
here is an alternative reality: when i download visual studio code, it already download JDK (mind blowing, i know) , put it in correct place in the files, and set the ''classpath'' by itself. why do i need to tend to all of this stuff ?
Visual Studio Code isn't primarily a Java development tool. You can make it work with plugins etc, but it's not specifically designed for use with Java.
It looks like there is a bundle you can get though whcih includes everything you need. Plus there are instructions here for setting up Java for an existing VS Code install: https://code.visualstudio.com/docs/java/java-tutorial
-6
u/KhazadDumBridge May 26 '21
You generally just unzip the JDK somewhere, and then point your tools to that location.
if it were that easy, i wouldn't be here asking questions, in VScode and also in intellij, there are no simple steps for ''point your tools to that location''
5
u/AreTheseMyFeet May 26 '21
there are no simple steps for ''point your tools to that location''
No?
https://docs.oracle.com/cd/E19215-01/820-2215/system-prep-2/index.html-1
u/KhazadDumBridge May 26 '21
it start with this scetense:
The JAVA_HOME and PATH environment variable must be set on Solaris systems in order for the Sun Management Center 4.0 installation wizards, the setup wizards and the Java console to function properly. Similarly, the Microsoft Windows %PATH% must be modified to include the path to the JDK software for the Sun Management Center Java console to work properly on Microsoft Windows.
If the environment variables and path are not set properly, installation and setup of Sun Management Center 4.0 can fail.
Solaris systems ? Sun Management ? wizards ? is that a si-fi book, ?
later on it talks about Solaris Platform, windows 2000, and windows xp, we are a bit ahead of this OS...
although, i have entered the Environment Variables window in windows 10, yet it doesn't show any path for my VScode java, and my VScode java is working good after this instructions:
https://medium.com/@tariqul.islam.rony/learning-java-and-spring-boot-with-visual-studio-code-vscode-part-1-54073f2fa264
so i am not sure why the PATH isn't there3
u/ignotos May 26 '21
I didn't say it was obvious or intuitive. But you don't need to really run an installer in the traditional way was my point. You unzip the JDK somewhere, and point the tools to it.
IntelliJ: https://www.jetbrains.com/help/idea/sdk.html#manage_sdks
VS Code: https://code.visualstudio.com/docs/java/java-project#_configure-jdk
0
u/KhazadDumBridge May 26 '21
You unzip the JDK somewhere, and point the tools to it.
that sounds easy enough.
but then I read Jetbrains:
i see there is a global SDK, a module SDK and a project SDK.so for example if i want to add a global SDK, i need to go this path:
File | Project Structure | Platform Settings | SDKs
those that sound intuitive to you ? i mean, were you always sure from the day you were born that if you want to change SDK, than of course you are going to FILE, and than PROJECT STRUCTURE, and than PLATFORM SETTINGS ?
why not make it nicer, for example a special button for SDK only, because, you know, it's like the most important button for beginners ?they have put it inside a sub-sub-sub settings, like it's the most unimportant thing in the world.
also about JDK:
it says this:
In IntelliJ IDEA, you can download a JDK package right from the IDE, or you can manually download the necessary JDK distribution and define it in the IDE.
but also this:
Set up the project JDK
1 - From the main menu, select File | Project Structure | Project Settings | Project.
2- If the necessary JDK is already defined in IntelliJ IDEA, select it from the Project SDK list.
why not set it by auto after i downloaded it ?
OR: if we have an area in the settings of intellij for downloading the JDK, than it's logical to put in the same area the method to choose which JDK to use.
but oh no, you need to go to place in the settings for that, because we don't make normal UI...
about VScode:
think for a sec you are a beginner, ok ? you are just saying to yourself: "ok, you got this, just download X, than tell the VScode to refer to this X in file location, easy peasy''
and than you enter the VScode and see this:
VS Code will detect the runtime required for your project and choose the appropriate configuration from java.configuration.runtimes
emmm, wut ?
JDK for source only
what is source ?
Library configuration
wait, but JDK IS library of a sort, so why do i need to configure libraries in a different way ?
so as you can see, i wish you were correct, but it's not as stright-forward as you are telling.
4
u/ignotos May 26 '21
I didn't say it was straightforward or intuitive. I just attempted to answer your questions and point you at some step-by-step guides. I agree that it's not always presented in a user-friendly way, and IntelliJ's settings menus in particular are a bit of a mess.
To some extent there are reasons for this. Often people are working on several projects at once which need to use different JDK versions for technical reasons. That's why there are separate global, project, and module JDK settings, and that's why the JDK isn't set automatically when you download it.
The instructions I linked do take you to a place where you can both download and select the JDK: https://www.jetbrains.com/help/idea/sdk.html#change-project-sdk
It is annoying, and it can take a couple of hours to set up your development environment. But that's just the way it is, and you have to push through it. There are beginner-focused tools which bundle things together and give you a more basic IDE out of the box, but IntelliJ isn't one of those.
1
1
u/KhazadDumBridge May 26 '21
if you can answer my last question, it would be great:
https://www.reddit.com/r/javahelp/comments/nlu6q9/make_a_bunch_of_files_have_meaning_some_very_noob/1
u/dncnexus May 27 '21
Documentation exist for a reason. It tells you exactly what you need to do for what you are looking for. You already mentioned too many buttons in IntelliJ, why would there be another butotn called "Special button for SDK Only"? It would be rather useless in 99% of the use case.
You also can install a JDK straight in the IDE. There is a button right above the select JDK that says Download JDK. This installs and sets it up for you.
It does not auto set it because there are various JDK versions and you might wanna pick 8 or 11 or whatever other version and not have the JDK pick the wrong one.
There is an area for downloading the JDK and also it is the same area you select what JDK to use.
What would be a normal UI for you? You seem to say that this is bad UI, but what would be better? Are you saying that a more beginner friendly UI would be a better design choice?
These tools are built for both beginners and senior programmers. Although you might say it is bad UI, it is one of the highest rated Java IDE. They give the ability of choice because it is necessary in development, rather there is no specific standard. I would also implore you to learn how to google and research things. You made a comment above about not knowing what "Solaris" was, you could simply google what it is. What is a source? You can look it up. IntelliJ and all other IDE are not created for the beginner to have an easy time, nor do they really care about that. They are offering robust systems that allow people to do the most in their programming.
0
1
u/roberp81 May 27 '21
in eclipse or IntelliJ just need to press the browse button in preferences.
vscode makes things complicated with that shitty config and doesn't give any advantages over true Ides.
3
u/Marshall_Robit May 26 '21
JDK lets you write Java code. Think of ink in a pen. Your IDE/Editor is your pen and JDK is your ink.
JDK 11 should include what you need.
If I were you, I'd use a full fledged IDE like IntelliJ/Eclipse instead of VSCode for Java programming. As far as why JDK isn't included in IDE installation... Because what if you already have it installed? What versions would they include? There are so many different versions and they would have to bundle it into their own applications. In other words- It's much better to give the ingredients for someone to make their meal since everybody has different taste than to give everyone the same meal which they might not even be able to eat.
TLDR: Ask for help on getting setup at your uni. Understanding everything now isn't as crucial. It'll click eventually but what seems so complicated and segmented is for a reason.
-3
u/KhazadDumBridge May 26 '21
to be honest, no one in the uni knows the answers to my questions.
sure, they can quote what is JDK , but no one knows why the installation process for java is so strange and not clear and understandable.1
3
u/anotherthrowaway469 May 26 '21
In addition to everyone else's answers, IntelliJ at least has the ability to download and locate JDKs by itself, which is useful when updating or working with multiple versions. I wouldn't be surprised if VSCode or at least Eclipse have something similar.
Java 11 refers to the language version, i.e. what syntax and stdlib are you using. This is generally the same as your JDK version, but you can use newer JDKs to compile older versions of Java.
1
u/KhazadDumBridge May 26 '21
if you can answer my last question, it would be great:
https://www.reddit.com/r/javahelp/comments/nlu6q9/make_a_bunch_of_files_have_meaning_some_very_noob/0
u/KhazadDumBridge May 26 '21
thanks, you can see my replay about the intellij above, his jdk installs are not straight forward.
3
u/wildjokers May 26 '21 edited May 26 '21
You have gotten some good answers but I will point out a couple of things others haven't mentioned. The article you quoted easy as downloading a JDK and adding it to your classpath is leading you astray. That isn't accurate at all. You don't need to add the JDK to your classpath and in fact that statement doesn't make the slightest bit of sense. You might possibly need to add the java executable to your PATH env variable and maybe set a JAVA_HOME env variable. But that is only required if you are going to run it from the command-line. With an IDE you probably don't need to worry about that. (although some GUI tools will configure themselves from the JAVA_HOME env variable so might be handy to set that either way).
As of Java 11 there is no longer a distinction between a Java Development Kit (JDK) and Java Runtime Environment (JRE). The JRE was a something users could install on their machines so they could run java apps. The JRE also included the tools needed to run Java Applets in browsers as well as to start applications via Java Web Start. It no longer exists and the go-forward solution is to bundle a runtime in your application. Confusingly JDK vendors like Azul and AdoptJDK are a providing a download they are calling "jre" that leaves out some dev tools (like javac) but it is not the JRE of old and I wish they weren't doing that. It confuses people.
The reason an IDE doesn't come with a JDK is because an IDE doesn't know what version of the JDK your code needs until you tell it. IntelliJ will download an appropriate JDK for you once you tell it what version you want, see the docs: https://www.jetbrains.com/help/idea/sdk.html#manage_sdks
When someone says you need "java 11" to run something what they really mean is you need a version of the Java Virtual Machine (JVM) that knows how to run java 11 bytecode. When you download a JDK it comes with a JVM (the java executable) and Java is backward compatible so to run code compiled with Java 11 you need to install a JDK of version 11 or greater (current version is 16).
Also note that JDKs don't actually have to be installed in the traditional sense. They are just zip files. Just unzip them to your favorite location and point your IDE to the resulting top-level directory.
As a final comment I know it is easy to get frustrated and learning curves can be steep. But you are going to need to adjust both your attitude and temperament if you want to make it as a software developer. Because the learning curve and resulting frustration never stops. You will be 20 years into a career and still hitting docs because a new requirement came up that results in you needing to learn something you have never used, and in some cases never heard of, before.
0
9
u/fluffytme Java dev May 26 '21
ITT: A complete beginner telling seasoned developers how things should be done...
0
8
May 26 '21
If nothing else, this whole thread is extremely funny to read! :D. Let me get some popcorn.
1
u/Murder_Badger May 26 '21
I had a lot of problems with setting up my environments the first time. This book was really helpful to me as a beginner:
http://samples.leanpub.com/javaForTesters-sample.pdf
Chapter 2 should give you some simple plain language instructions for getting set up.
1
u/KhazadDumBridge May 26 '21
if you can answer my last question, it would be great:
https://www.reddit.com/r/javahelp/comments/nlu6q9/make_a_bunch_of_files_have_meaning_some_very_noob/
1
u/Murder_Badger May 27 '21
Pertaining to Java, you use frameworks like 1. spring boot, and 2. dependency managers like 3. maven and 4. Gradle. Each one of those things is like a huge topic unto itself, but you don't have to know everything about them to build a program.
As for your very last question, the answer is 5. GitHub and 6. Continuous integration or 7. Devops.
I would recommend researching these 7 topics, and returning with specific questions if you have them. Also look into 8. Test driven development, and 9. agile.
0
3
u/dionthorn this.isAPro=false; this.helping=true; May 26 '21
OpenJDK is open source found here:
If you don't like the way something works feel free to fork the repo and fix it yourself.
For the IDE portion you can code Java entirely in a text editor with the command prompt only. So if you don't like an IDE do it old school, or better yet. Code your own IDE.
1
u/a-lint May 26 '21 edited May 27 '21
Your job as a developer is to make things easy for people to accomplish with software. It’s your job to do the hard part for them, so they don’t have to.
Some basic computing skills will be required. The more you understand about all of computing, the better a time you will have as a developer. Without an understanding of networking, operating system internals, database internals, etc. It would not matter how prolific a programmer I was. I could still write some terribly non-performant software.
So, my suggestion for you is to first understand the basics. Pick up an exam prep book for the LPI Linux Essentials, this will help build a solid foundation which to build on.
Keep at it, you’ll figure it out. If you saw my first post… well it’s been a shitty day dealing with Gradle and Jenkins….
1
u/asvignesh Jun 13 '21
If IntelliJ is too confusing, start with vi or vim for editing and Javac for compiling
-14
u/doctersaiyan May 26 '21
Type into Google/YouTube your questions. You will probably learn better then what anyone explains here
•
u/AutoModerator May 25 '21
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://imgur.com/a/fgoFFis) 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.