/r/learnjava
Resources for learning Java
Resources for learning Java
Format + Copy
, and paste the code in your post (remember to leave an empty line above the code!).Free Tutorials
Where should I download Java?
With the introduction of the new release cadence, many have asked where they should download Java, and if it is still free. To be clear, YES — Java is still free.
If you would like to download Java for free, you can get OpenJDK builds from the following vendors, among others:
Some vendors will be supporting releases for longer than six months. If you have any questions, please do not hesitate to ask them!
Software downloads
Official Resources
Resources
Programming ideas & Challenges
Related Subreddits
/r/learnjava
I'm currently learning about Java Servlets, and I'm finding it challenging to visualize how they work. I'm comfortable with the coding aspect, but creating a mental image of how everything fits together is proving difficult. Does anyone have any tips or resources that focus on teaching through visuals?
Is it better to just use an interface class or just define methods and put functionality in them in a class with a constructor for example?
I’m currently learning about Java Servlets and was setting up files to create a simple feedback form when I encountered the error: "The default superclass, 'javax.servlet.http.HttpServlet', according to the project's Dynamic Web Module facet version (2.3), was not found on the Java build path."
I’m using Eclipse IDE and have tried changing the Dynamic Web Module version (from 2.3 to 6.1) and the Java version (from 1.8 to 22), under project facets, multiple times, but they always revert to their default settings.
This issue has been occurring since I switched to using a Maven project instead of a standard Dynamic Web Project.
I'm trying to help out with a java app on Github. Most of the developers don't have Macs so the current implementation on a Mac requires running a script from the command line. Not very user friendly.
I'm not a java developer, but I was able to get jpackage to work great and I have an app that runs great (after giving it permission since it is unsigned). The problem is that I can not get it to log anywhere. The app is using slf4j.Logger. I've edited the logback.xml file so I can use a separate file to specify where the log should be. When launching from the script on the command line (essentially just executing the .jar) it works fine. I can log alongside the .jar, or in my Library/Application Support/... Once it's all packaged into an app bundle there's nothing. I've given the app Full Disk Access and it still doesn't work. What is needed for it to be able to write to a log?
I did find that if I run it from the command line inside the bundle (./MyApp.app/Contents/MacOS/MyApp) the log is created. If I just double-click the app, it's not.
I am trying to use jnativehook for getting my keylogs, but even after I add the jnativehook-2.2.2.jar into File → Project Structure → Modules . It doesn't work. My terminal inside the intellij gives an error "java: package org.jnativehook does not exist" while every method and every import is colored red. I am absolutely new and im not understading what to do, i searched online, watched videos on youtube, tried to get help with chatgpt. still stuck!
Hi all, Working as Support Executive from last 6 months(joined as freshee) Now wants to switch to Development specially in Java development What should I follow to crack interviews and what should be my approach? Please do share usefull tips
hi bros i am new here and learning java , i want a help , any body knows best visualizer for viewing the java code in the visualizer ?
Edit: Its over
https://x.com/luv2codetv/status/1885675739141349795
(I'm not affiliated or related with this channel)
I'm currently learning java and having a hard time. I'm currently learning METHODS, CONSTRUCTOR, AND MULTI DIMENTIONAL ARRAYS. any advice will be appreciated
I have experience with Java. But I want to have courses/certificates to have more credibility with companie
Hi guys,
I'm pretty experienced with python already, been learning it for quite some time and I want to start learning java now. What's the best resource, like course or video to follow for someone who already knows programming, but a different language?
I don't seem to find much resources on building web apps with websockets using spring boot while there are many free tutorials available for ws with node. Looking for resources and suggestions.
Hello Java Learners,
I'm encountering an issue with the MOOC Part04_23.CreatingANewFile exercise. I've been using VS Code without any issues until now, but this simple exercise is causing me some trouble.
Here's what happens: I can successfully create the file "file.txt" using VS Code (I can even see it located into the right folder when using Windows Explorer - the root folder containing the folder src
and the file pom.xml)
, write "Hello, world!" into it , and when I run the TMC tests, I get the following success message:
Points: 100.00%
However, when I try to submit the exercise to the server, I receive this message instead:
Points: 0.00%
Has anyone encountered a similar issue? Any advice on what might be going wrong would be greatly appreciated!
I don't have my source code, as it is at work. So, I'll try to mimic what I remember from it. I don't have lots of Java experience so please take it easy on me. I've added lines to make it easier to read.
1 char[] simpleArr = formattedTime.toCharArray();
2 timer.scheduleAtFixedRate(new TimerTask() {
3 @ Override
4 public void run () {
5 char[] simpleArr = formattedTime.toCharArray();
6 }
7 }, 5000, 10000);
8 while(true) {
9 if (Arrays.equals(simpleArr, anotherSimpleArr)) {
10 //do this command
11 }
This is essentially what I'm trying to do, but I'm getting an error that simpleArr can't be enclosed in the timer method. I've tried moving line 1 around as well as moving line 5 around and can't get it to work. If I'm making this too complicated, please let me know. My issue is that I don't know how else to go about constantly updating the simpleArr, but I have to keep it updating basically forever. Thanks to anyone that is willing to help!
Articles, books, sites.
i am trying to create a inner join query using Query annotation but i am keep getting this error where it says the query is not being generated what should i do?
I've been 4 months now in my programming course, mainly Java, and professor told us not to bother with them and that they are deprecated. Idk, at first glance they seem to be more optimal sintaxys-wise and all. What's the opinion of the veterans on this regard?
I recently finished a Java MOOC from the University of Helsinki followed by some projects like: checkers, FlappyBird, Todoapp made with JavaFX. I came across this course 6.005.1x Software Construction in Java from MIT and I wonder if it is worth it and relevant. Does anyone have some experience with this resource ? I was thinking about this course to deepen my Java knowledge.
I am an app developer, and I also write desktop apps. Most of the time, I use either Electron or Tauri, because I thought certain kinds of user interaction patterns are impossible in Swing, which I have use to build mostly monitoring UIs up until now. But recently, I was made aware of JxBrowser and... isn't this amazing? What exactly are drawbacks and what is keeping me from building a Swing application and then add, e.g., complex web mapping using OpenLayers?
EDIT Not limited to JxBrowser, any WebView embedding in Swing is intended.
Hi, I am passout of 2023 class with Electrical Engineering degree. I wanted to make a career in the tech. And started to learn Java, Spring Boot from 2024, after I didn't get qualified in gate ee. I am looking for opportunities and its been over a year. And still no one gives a positive reply for my 100s jobs applications every month.
Ps I can build java full stack applications using Spring Boot and React. I can dm my portfolio if you are interested in hiring or know someone.
Requirement
Alarm: alarms of events
Notification: what students will see in a mobile App
No control over the Alarm schema/database (must use Thingsboard’s REST API to fetch alarms).
I am thinking to create a notification table like
{
"notificationId": "UUID",
"studentId": "UUID", // Reference to the student
"alarmId": "UUID", // Reference to the alarm from Thingsboard
"message": "String", // Notification message
"isRead": "Boolean", // Whether the notification is read
"createdAt": "Timestamp"
}
Do you guys think that makes sense
I have this docker compose:
services:
api_service:
build: .
restart: always
ports:
- "8080:8080"
networks:
- springapimysql-net
environment:
SPRING_DATASOURCE_URL: jdbc:mysql://mysqldb:3307/banking
SPRING_DATASOURCE_USERNAME: Nazar
SPRING_DATASOURCE_PASSWORD: strong_password
depends_on:
mysqldb:
condition: service_healthy
volumes:
- .m2:/root/.m2
mysqldb:
image: "mysql:8.0"
restart: always
ports:
- "3307:3306"
networks:
- springapimysql-net
environment:
MYSQL_DATABASE: banking
MYSQL_USER: myUser
MYSQL_PASSWORD: strong_password
MYSQL_ROOT_PASSWORD: even_stronger_password
healthcheck:
test: [ "CMD", "mysqladmin", "ping", "-h", "localhost" ]
interval: 10s
retries: 5
networks:
springapimysql-net:
version: '3.8'
and this application.properties
spring.datasource.url=jdbc:mysql://localhost:3306/banking?useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=UTC
spring.datasource.username=myUser
spring.datasource.password=strong_password
spring.jpa.hibernate.ddl-auto=update
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQLDialect
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
When I try to run docker compose both my imagies running correctly, but then I open logs for the service and it could not connect to db, so nothing actually wwork, how fix that, help please
I have worked on projects that only focus on the backend, with no frontend development. should i mention that project in resume (spring boot) ? or build frontend also ? And how should i prepare for interview ? i am a fresher. please guide me .
I have a job and willing to learn Java backend, I don't know where to start and what to do. Have tried 1 or 2 times but after a week or starting failed to continue and then continue to work with help or someone. Please don't judge on this if anyone can help me learn Java I am ready to reward them good.
I have been working on creating a chat_module application with Reactive programming - spring boot 3.4.1, postgres-r2dbc, and mongo reactive.
I have tried to add every detail in the below gist.
https://gist.github.com/Together-Java-Bot/a05418d75e2f7cca670c9492d5942b1c
Could not see non-regex non exceptions solutions here.
I've been looking for some sites to learn and practice java at home, to help build some consistency in my work. I've used Coddy.tech and almost gone through the course but it costs money and you need an account, are there any free options that don't require an account? Or are at least free for now.
Hello everyone. I've been working with java for a year now. Mainly spring boot apis. I want to understand java better, project structures (large ones) I want to understand Jenkins. Is a piece of software I'll start using in some time and a very interesting one.
I cloned the repo, opened it up in inteliij and I could not understand how the project was structured, how maven and pom works, how everything becomes a single .war and where to begin.
I can understand java code, but this has been really hard for me.
Any advice? How to understand something like this? where to begin? how to learn this big project structures?
So I'm start off saying I haven't touched programming in years after being told many times. I'm overqualified for etc jobs. I gave up after a while of searching. But I recently picked up the udemy java course by tim bulkchalka and web development by blue time studios and a few books. I'm trying to pace myself and basically make things that I enjoy while relearning the core basics. I wanna make games/mods in the long run and see where it takes me.
Hello everybody,
I am currently doing the mooc trying to learn java. In Part 2 the exercise AdvancedAstrology, espacially part 2 and 3 of the exercise, stunlocked me. I couldnt find a solution in my brain. So as I have a fulltime job, not related to coding, I decided to look on this reddit for some help. I tried to solve the exercise for around 3-5 hours I would say.
Is it okay to look stuff up if you hit a hard wall after trying for a while our would you say try it until you found the solution without any help? I would love some opinions to this from newbies & pros alike.
Thanks in Advance!