From what I've seen Oracle and Openjdk are the best ones. People say Openjdk is the best one I keep seeing hate on Oracle. I don't know if I'm looking at the right thing rn thats why I'm asking. I'm on openjdk.org and it looks like a scam/virus. The site is so poorly built it can't possibly be better than Oracle. Should I get openjdk? How do I get it? Also, side note. Which IDE should I get? I heard eclipse and intellij are the best ones but idk which one to get.
#Which JDK should I get?
1 messages · Page 1 of 1 (latest)
<@&987246527741304832> please have a look, thanks.
While you are waiting for getting help, here are some tips to improve your experience:
If nobody is calling back, that usually means that your question was not well asked and hence nobody feels confident enough answering. Try to use your time to elaborate, provide details, context, more code, examples and maybe some screenshots. With enough info, someone knows the answer for sure.
Don't forget to close your thread using the command </help-thread close:1027500463647621170> when your question has been answered, thanks.
Here is an AI assisted attempt to answer your question 🤖. Maybe it helps! In any case, a human is on the way 👍. To continue talking to the AI, you can use </chatgpt:1108714622413963314>.
t could be confusing to choose between Oracle JDK and OpenJDK, as both are popular choices for Java Development Kits (JDKs). Here are some factors to consider:
-
Oracle JDK: Historically, Oracle JDK was the most commonly used JDK for Java development. It provides long-term support (LTS) versions with regular updates and bug fixes. However, starting from Java 11, Oracle changed its licensing model, and commercial support is now available only through a paid subscription.
-
OpenJDK: OpenJDK is an open-source implementation of the Java Development Kit. It is free to use and provides regular updates and bug fixes similar to Oracle JDK. Many developers prefer OpenJDK due to its open-source nature and community-driven development process.
When deciding which one to choose, consider the following:
-
Licensing: If you require commercial support or are developing software for commercial purposes, you may need to consider Oracle JDK's licensing terms. For most general-purpose applications or open-source projects, OpenJDK should suffice.
-
Compatibility: Both Oracle JDK and OpenJDK aim for compatibility with the Java SE specifications. However, some minor differences might exist due to separate development processes.
-
Community Support: OpenJDK benefits from a large community of contributors who actively maintain and improve it. This can result in faster bug fixes and enhancements compared to Oracle JDK.
In summary, if you are looking for a free and open-source option with good community support, OpenJDK is a suitable choice. However, if you require specific features or commercial support from Oracle, you might consider using their JDK version.
It's always recommended to check the official documentation and consult with your team or project requirements before making a final decision on which JDK to use.
From what I've seen Oracle and Openjdk are the best ones.
Just use OpenJDK https://adoptium.net/
I keep seeing hate on Oracle
...you know that java is made by oracle right?
I'm on openjdk.org and it looks like a scam/virus. The site is so poorly built
yes that's normal, it's because it is for openjdk development, not clients aka us
And use adoptium, it's where you should get it
it can't possibly be better than Oracle
Do you know the difference? It's licensing and additionnal services, that's all, it doesn't matter where you get it
Also, side note. Which IDE should I get? I heard eclipse and intellij are the best ones but idk which one to get.
IntelliJ, period
on that link do i click Latest LTS Release? then its just gonna download?
also why is intellij better than eclipse? Does it have something eclipse doesnt
It's the default download, you can click on Other platform and versions if you want more control
It's better in pretty much every aspect except performances I would say, it's also way more used
Ah, and IntelliJ also has a paid version but isn't required
can you send me the link where i download intellij? Ive looked for it but i cant find it anywhere
first result on google https://www.jetbrains.com/idea/download/?section=windows
alright that helps
thanks a lot
appreciate it
im doing the jdk rn. do i just keep clicking next to download it the way it does it default or is there anythign else i need to do?
there are two X's next to set java home variables and javasoft registry keys
by default on windows, it gives you an msi
idk what that means
i just clicked the big button
to download
the Latest LTS Release
and then it opened the setup wizard
i'm just going along with it but there are two red X's which usually isnt good
the first page
after i click next in the home screen thing of the setup wizard
wdym are you talking about the window where you have to check what you want ? what's the problem ?
it says "Set JAVA_HOME variables" and "JavaSoft (Oracle) registry keys" and theres two red x's
can i send a picture?
it says Select the way you want features to be installed
It's the Custom Setup
It says Set Java Home variable and javasoft registry keys wont be available
the red x means the feature wont be available
ye better if you do that
i had problems in the past with python and PATH and variables and stuff so i just wanna make sure im doing things properly with Java
what do they do
and why arent they on by default
for the bottom one it says
"Overwrites the reg keys HKLM\software...\javapath' does not work. You need to reinstall it to recreate these registry keys"
what doesnt work?
and whats an environment variable
basically when you run java command anywhere, the system knows what it means.
so its good? Why wasnt that on by default?
Add to path is on by default ?, i haven't used this installer so im not familiar that much.
oh no
not that one
on the pic i sent
the 2 bottom ones arent on by default
what are those ones
some software may use registry keys
it's not important, you don't need to check it if you don't want
what does that mean?
JAVA_HOME is just a variable that holds address of your jdk installation folder
am i going to need it?
probably not
do i need that?
so do i just keep it the way it is default?
the two bottom ones unchecked?
or do i check the java home variables
also whats Eclipse Temurin? Is it the name of the software im installing or the IDE?
windows use registry to store some config, it's annoying to use or modify
check home yes
it's the name of the vendor of the JDK here
i dont have any
i did a factory reset a few days ago and didnt install anything other than chrome and discord and a few random stuff
oh
nope i dont have anything
right
only thing that shows up is the answers from the web
when installed
like it shows bing and stuff
in the cmd i type "java"?
also don't be too stressed out with setting up path (environment variables), you can change that anytime if you wish to later. But i get it's a bit tricky to set up early on.
where java
but for now do i check it or uncheck
do what alath suggested
could not find files for the given pattern(s)
alright
ok i got it now im gonna do intellij
for the Choose Install Location do i just keep it at default?
and for the Installation Options theres a bunch of stuff
yes
for the most part defaults are good, unless you are limited on space or something.
I would check everything excpt associations
first 3 meaning create desktop shortcut, update PATH, and update context menu
alright
what exactly is this PATH thing that shows up everywhere
just context for you to run commands basically, like i mentioned for java
- Create Desktop Shortcut is so you can open it from windows menu
- Update Context Menu is so you can open a folder with IntelliJ by right clicking
- Path is so you have access to the command, very important for java, since you need it to run java, not really important for intellij, since you won't open it often like this, but still usefull
And you can select the associations if you want
what are associations?
when you double click a file
sorry if im asking a bunch of questions haha im paranoid bc of what happened with python i had to delete python and reset everything
anytime you launch files with these extentions, intellij will be used as default program.
ohhh i see
its like those default things on your computer that you set like to open chrome default for x type of file
what happened with python ?
i installed it but i set it up wrong and my code wouldnt run properly and i had to delete it and lose the code and re do the installation
yes, when you select open with by default, that's the file association
it was my first experience with coding so not very fun
what's Choose Start Menu Folder
"Select the start menu folder in which you would like to create the program's shortcuts. You can also enter a name to create a new folder"
show a screenshot please
ohhh i get it haha
self explanatory
it just asks me to select one of the folders i have on my pc to create the shortcuts
by default it made it so that it created a folder called JetBrains to create any shortcuts
i just left it at that
or else it would create shortcuts and put it in random folders i have
which would just be unecessarily disorganized
ok i downloaded it
is there anything i need to do now?
to link the jdk to the ide or something
idk
what does that do?
print the content of JAVA_HOME
that gives me a path to jdk-21.0.1.12-hotspot\
its the same path as the one to java.exe except after it goes hotspot\bin\java.exe
now try to create a project with intellij
also note that you actually don't need to install java to use intellij
it already comes with a few versions of java
oh
haha
well
now i have the newest one
and the other development tools like the debugger and stuff which i dont think it comes with
but whatever
im creating a project rn
whats Git repository
wdym
nothing you need to worry about atm, could ignore for now.
the debugger is something your IDE has
oh
something very important you will learn later
it already has a JDK yes
you could have simply just installed intellij
but if you did that
you wouldn't be able to use java outside of intellij
ohhh i see
i created a project
im on it right now
now what
do i run it and its gonna work?
try yes
show the icons
they're both play buttons
Shift F10 one is green on top of my screen
and the Alt 4 one is in the left corner
alright
I think the green one only runs the Main class and the other one runs the whole thing
where is the right one ?
bottom left corner
show a screenshot of the whole thing please
there are 3 run buttons here
the two at the left
which will specifically run the main class/method
yeah
the top right which will guess what you want to run (actually will just run the main class/last thing you ran)
and also, at the right of the run button, there is a button looking like a bug
it's the debug button
yeah
i dont know how to use a debugger
i never used one
i used to use print statements
I advise you to use it instead of the run button when possible
what does it do?
i just did it and it didnt do anything
if i run something and thers an error its gonan say "syntax error" or something and the line
so what does the debugger do different
by clicking on the line number, you can set a breakpoint, and when java reaches it, it will pause, allowing you check the content of the variables, and allowing you to run it line by line
also, does it work, do you have an hello world ?
right
and the for loop works too
note that once a breakpoint is reached, and you want to advance line by line, you can use a button at the bottem left
how is that useful tho?
like i can make the program pause at a certain line
what does that help with
it helps you to understand what is happening
it's not always easy to just look at the code and completly understand what it does
even less when there is a bug and you have no idea where it is, then what do you do ? do you put prints everywhere, or do you use the debugger ?
what if there isn't any error ?
and what if the error is too vague to help you ?
debugger probably helps
it's not probably
pretty sure you will love using it in the first assignment you will have
and in all the following assignments
i see
hold up
i have one random question that i dont really get
i used to use vscode for python
people say its bad for java
indeed
i headr somewhere that its a text editor
not an ide
what exactly is vscode
like it runs coe
code
is that not what an ide does
i hated extensions
theyre so complicated
i only ever used the ones made by microsoft because they all worked the same way
Java IDEs like intellij are so much powerful, that even VSCode with extensions is nowhere close
and if you don't use extensions at the first place
using vscode is probably the worst idea
my friend who got me into programming only uses vscode thats why its the first one i tried
vscode is good because it works with pretty much everything
yeah but like
vscode is good with everything, but is best for nothing
Integrated Development Environment
depends of how many extensions you add
with 0 extensions
It probably won't even have auto completion then
nope
which is like, bare minimum
also note that java has a repl
it's the command jshell
python does too right
yes
its like where you write code or commands while running the program
it's where you can dynamically execute whatever you enter
try running jshell command
then enter 2+2
how do i open the shell
ohh on my computer not intellij
take a screenshot
hold up
i type jshell
it says
| Welcome to JShell -- Version 21.0.1
| For an introduction type: /help intro
then i say 2+2
right
and it says
so you launched jshell
$1 ==> 4
yeah
you can enter System.out.println("hello")
i thought id have to type in java code
like regular java
it's java
you can just literally write 2+2
no need to print
Also note that this uses jshell too https://dev.java/playground/
so if you just want to enter some code online
i have openjdk
does every jdk have the same java
like is java one thing
and then each jdk has like other stuff included
or is the java slightly different in each jdk
it's the same
like I said earlier
only difference is license and additional services
and different license
This is the source code of java btw https://github.com/openjdk/jdk
GitHub
JDK main-line development https://openjdk.org/projects/jdk - GitHub - openjdk/jdk: JDK main-line development https://openjdk.org/projects/jdk
every vendor just build it from here, stick a license they like and distribute it
whats a lisence
branding?
like i can just take that put my name on it and distribute it?
It's basically a permit to use something, under certain terms
ohhh
it depends of what their license allows
i see
like openjdk might let me create something and sell it but oracle might not
stuff like that
yea
both OracleJDK & OpenJDK are maintained by Oracle, and since Java 17, both allow personal & commercial use for free under NFTC
here's a link to the current license for OracleJDK: https://www.oracle.com/downloads/licenses/no-fee-license.html
here's a link to the FAQ, which mentions that NFTC is free for both personal & commercial: https://www.oracle.com/java/technologies/javase/jdk-faqs.html (go to "What is the Oracle NFTC license")
it permits free use for all users – even commercial and production use