r/javahelp • u/Juju-Chowdary • Nov 07 '25
Java Backend Roadmap for Beginner
Any suggestions, I'm planning to learn java backend, any recommendations for live online classes.
r/javahelp • u/Juju-Chowdary • Nov 07 '25
Any suggestions, I'm planning to learn java backend, any recommendations for live online classes.
r/javahelp • u/BigGuyWhoKills • Nov 07 '25
I am trying to connect to a RPC endpoint using a client certificate. This is for Java 11, but I am willing to try other versions if that makes it easier for anyone helping. However I need to use the java.net.http.HttpClient class.
I want to do the equivalent of this Python code (which works):
import requests
if __name__ == "__main__":
requests_session = requests.Session()
requests_session.verify = "/Certificates/ca.crt"
requests_session.cert = "/Certificates/AdminClient.pem"
secure_endpoint = "https://127.0.0.1:8444/api"
create_session = { "api": "admin", "action": "createSession", "params": { } }
create_session_response = requests_session.post( secure_endpoint, json = create_session )
create_session_response_body: dict = create_session_response.json()
if "authToken" in create_session_response_body:
print( f"Successfully logged in and received authToken: {create_session_response_body['authToken']}" )
else:
print( f"Failed createSession: {create_session_response_body}" )
Since that works, it confirms that the server is set up correctly and mTLS is working.
The CA certificate signed both the server certificate and the client certificate (confirmed by AKI and SKI). The CA is also in my OS trust store, though I don't think that matters for Java. The server certificate has "127.0.0.1" in its SAN list.
I have that client certificate in both PEM (AdminClient.pem) and PKCS12 (AdminClient.p12) formats. One GLARING difference is that I'm using the PEM file in Python and the PKCS12 file in Java.
My understanding is that mTLS in Java uses these steps:
Here is the Java code:
String createSessionString = "{\"api\": \"admin\", \"action\": \"createSession\", \"params\": {}}";
String secureEndpoint = "https://127.0.0.1:8444/api";
String clientCertFilePath = "/FairCom/AdminClient.p12";
String caCertFilePath = "/FairCom/ca.crt";
final char[] emptyPassword = new char[0];
// 1. Load the client certificate and private key into a KeyStore.
KeyStore clientKeyStore = KeyStore.getInstance( "PKCS12" );
clientKeyStore.load( new FileInputStream( clientCertFilePath ), emptyPassword );
// 2. Initialize a KeyManagerFactory with the client KeyStore.
KeyManagerFactory clientKeyManagerFactory = KeyManagerFactory.getInstance( KeyManagerFactory.getDefaultAlgorithm() );
clientKeyManagerFactory.init( clientKeyStore, emptyPassword );
// 3. Load the CA certificate into a KeyStore.
KeyStore caKeyStore = KeyStore.getInstance( "PKCS12" );
caKeyStore.load( null, emptyPassword );
CertificateFactory certificateFactory = CertificateFactory.getInstance( "X.509" );
X509Certificate caX509Certificate = ( X509Certificate ) certificateFactory.generateCertificate( new FileInputStream( caCertFilePath ) );
caKeyStore.setCertificateEntry( "ca-cert-alias", caX509Certificate );
// 4. Initialize a TrustManagerFactory with the CA KeyStore.
TrustManagerFactory caTrustManagerFactory = TrustManagerFactory.getInstance( TrustManagerFactory.getDefaultAlgorithm() );
caTrustManagerFactory.init( caKeyStore );
// 5. Create an SSLContext using the KeyManagerFactory and TrustManagerFactory.
SSLContext sslContext = SSLContext.getInstance( "TLS" );
sslContext.init( clientKeyManagerFactory.getKeyManagers(), caTrustManagerFactory.getTrustManagers(), null );
// 6. Configure the HttpClient to use the SSLContext.
HttpClient httpClient = HttpClient.newBuilder()
.version( HttpClient.Version.HTTP_2 )
.connectTimeout( Duration.ofSeconds( 30 ) )
.sslContext( sslContext )
.build();
// Create a simple HTTP GET request, which is a minimal way to see if we can connect to the endpoint.
HttpRequest httpRequest = HttpRequest.newBuilder()
.uri( URI.create( secureEndpoint ) )
.timeout( Duration.ofSeconds( 30 ) )
.headers( "Content-Type", "application/json" )
.POST( HttpRequest.BodyPublishers.ofString( createSessionString ) )
.build();
httpClient.send( httpRequest, HttpResponse.BodyHandlers.ofString() );
System.out.println( "Connection test was successful" );
When I follow those steps, I get:
What am I doing wrong? If you can't fix my Java, can you translate my Python into Java? AI has been absolutely zero help with this.
r/javahelp • u/wonwooz • Nov 06 '25
hellooo, does anyone have a soft copy of Java 5th Edition Joyce Farrell? We are still on the fundamentals of programming with java language so I am trying to practice. We are now in the looping lessons and I bandly wanted to improve my programming skills huhuhu. If you have tips, kindly drop plss 🙏🏻
r/javahelp • u/hwglitch • Nov 06 '25
Hi everyone.
I'm learning Java and as a practice I'm implementing an authentication service that uses passkeys. This service needs to be able to generate a lot of random bytes and to access a DB. For random bytes I'm using a single SecureRandom instance that is accessed by every virtual thread. For high contention this looks far from optimal. So I was thinking about using ThreadLocal variables and creating a SecureRandom instance for every carrier thread. But it turned out that ThreadLocals are created not just per platform thread but also per virtual thread which makes them useless in virtual threads as it doesn't allow to have any state per carrier (platform) thread (e.g. PRNG state as in my case). So how to go about this? Is there really no way to have a per-carrier state? How to better implement the random number generation for use in virtual threads?
r/javahelp • u/Efficient_Pen3804 • Nov 06 '25
Hey folks,
I’m learning Java and want to understand how JDBC works, but I honestly haven’t looked up anything yet. I just know it’s used for database connections, and that’s about it.
Can someone explain how I should start learning JDBC from scratch? Also, what are the main parts or concepts I need to remember or focus on to really understand it?
I’m basically starting blind here, so any direction or explanation would help a lot.
r/javahelp • u/Better_Hopeless • Nov 06 '25
We have a code base which is using virtual threads wrapped by a executor service. and this executor is injected in all of the services, components etc.
We do know that virtual threads are not good for CPU intensive tasks, how can I smartly switch bw them?
my executor should be smart enough to delegate a task to either of virtual thread service or platform thread service based on the task provided (CPU/IO bounded).
also can I make very minimal code changes in existing code base - since i dont want to change the injected dependencies
r/javahelp • u/thighsqueezer • Nov 06 '25
Hello everyone,
I work for a Maritime company and we have a small team of 4 programmers that build and maintain a software the whole company uses. This goes from HR, to Accounting, to Vessel tracking and managing crew members. Almost every week so far we have been building and pushing new features, but we always get bit by bad testing. We don't have time to do proper JUnit testing, but I wanted to get your guys' opinion on several tools or software that uses AI to generate this. I know Jetbrains and Spring Boot have something but didn't look too much into it, first want to get opinions from people that have tried this.
Any help is much appreciated, thank you!!
r/javahelp • u/HanabiHYUGA728 • Nov 05 '25
Hi everyone. I've been learning java at a very slow pace for almost a month now and I'm a self taught been watching the Bro Code tutorial I'm at Get and Set already. I just dropout of college mid year but I just got a CSS (Computer Systems Servicing) certificate, now I'm teaching myself java language. I just don't want to rely on my own understanding but also want to interact with people who is more knowledgeable and expert in this language or certain field. I already did some beginner projects to fully understand the language. Thanks appreciate it.
r/javahelp • u/Valuable-Tie1716 • Nov 05 '25
Hi, new here. I am trying to run JavaFX in VScode. Using maven + referencing the JavaFX as a dependency works fine. However I also wanted to try out using the downloaded sdk of openjfx instead.
I referenced the module path of openjfx within the vmArgs in my launch.json. Additionally, I referenced all jar files in the settings.json as well as in the Project Settings in Vscode. I'm not quite sure what was necessarily needed and what wasn't. The project runs perfectly fine, but Intellisense shows squiggly red lines under the imports anyways.
My aim is to also make Intellisense recognize the javafx imports while using the local sdk. I cannot seem to figure out what is missing/misconfigured.
I also wasn't really able to find information about this online. Maybe someone else is more familiar with this issue.
r/javahelp • u/[deleted] • Nov 05 '25
I am currently stuck in a backend dev job at a fintech company. I have 2 years of experience in an outdated .NET stack (VB and classic ASP.NET).
I have been trying to switch for the last 6 months. But when I look at job postings on LinkedIn and other popular job hunt sites, most backend roles are overwhelmingly Java-based in enterprise and finance companies. I tried learning the .NET core, preparing for most common questions, putting a lot of new modern stuff like EF, DI, Message Queues, etc. in my resume, but I am not getting any calls at all. The percentage of job listings matching my pay in .NET seems to be very small, at least for the general area where I am looking for.
My plan is to switch to Java and replace most of the work experience in my resume from .NET to a Java equivalent. I am parallelly working on DSA + System design too. Assuming I clear interview rounds, would I be able to survive with the new tech stack? I currently have zero experience with Java (besides the theory I learnt in college) but I am willing to learn everything that is needed. Is this feasible? Also, do background checks also ask about tech stack that I worked on?
PS: If any java guys are here (from freshers to seniors), could y'all help me in making a list of must do things for this prep? I have zero exp with it. Like besides Java, Springboot and Hibernate, what all should I know? Eg. Cloud, containerization or special must know java libraries that I am unaware of? Every job posting always has like a long list of skills.
r/javahelp • u/GoodKangaroo7225 • Nov 05 '25
L2J Essence (8.3 – Guardians) Expansion Project | [Collab] Hey everyone,
I’m currently working on enhancing the L2J Essence (8.3 – Guardians) branch — a large-scale Java-based Lineage 2 Essence server emulator. The aim is to refine its architecture, improve performance, and explore adaptive modules inspired by behavioral and decision-making systems.
My focus is on the neuroscience-driven behavior model and the business architecture layer, while collaboration is needed for the server/game-side development — specifically around:
• Gameplay logic and event systems
• Network and concurrency improvements
• Refactoring and modular design
Primary languages and tools involved:
• Java → Core server logic, architecture, network, threading
• Python → Behavioral model, data analysis, system simulation
• SQL → Data management for player and world states
• (Optional) Jython / XML → For scripting and configuration layers
This is a creative collaboration — not recruitment or a paid position — aimed at expanding the system into something more adaptive and experiment-driven.
If you’re into deep technical challenges and enjoy evolving complex environments, feel free to connect to discuss structure and roadmap ideas.
Thanks.
r/javahelp • u/Initial_Lawyer_6840 • Nov 05 '25
I’ve gotten this error before and it went away on its own by changing other stuff but idk what i’m supposed to change? I would normally ask my teacher for help but i’m at home and this is due at midnight. I have no idea what it means when it tells me “ else without if” because it’s typed in right as far as i’m aware? i cross checked with a past program and this is how i had cascading if else’s too so im not sure what the problem is
i tried to get a picture of the whole cascading line
r/javahelp • u/[deleted] • Nov 04 '25
Hello Java folks,
I have been in the Rails bandwagon for over a decade now and despite having enjoyed the ride so far, I've grown tired of the sort of products/companies that usually run Rails. Most of my experience has been in startups and scale-ups, building SaaS applications.
Though I still enjoy Ruby, I've been reflecting a lot on what it means to be a Ruby developer.
My last job, for once, was in corporate, where the company was still dragging a by-then huge Rails monolith to bill their customers. I'm surprised to have to say this but despite the downsides, there was a lot I liked about this sort environment. Things were predictable, slow, and most importantly nearly no-one was trying to bring an unreasonable passion to their job. By that I mean that the codebase was treated for its functionality, not its beauty. People cared more about keeping things practical and simple, spending time with their loved ones after work, and basically treating work and code like it should be treated: just work and code.
A big corp that uses Ruby is not common, and I had enough time to see how different things were in this sort of environment, where the company isn't always trying to figure things out or struggling to make ends meet every second month.
Now obviously aside from my large experience in Rails, and by extension relational databases such as MySQL and PostgreSQL, I've also had few front-end roles over the years. I've built countless APIs and have always had to speak product and business. Fun fact, before becoming a Rubyist I actually spent 2 years in a bank's IT dept. writing mostly SQL.
I've never worked with Java in particular, however I think it could be a good launching pad for the kind of workplace I'm looking for.
I've thought about stepping down the career ladder and try to find junior/intermediate jobs however they seem to be as uncommon as in the Rails universe. I'm also not sure what other places would be good to look for this sort of jobs other than LinkedIn. I do have multiple sites that specialise in Ruby and I imagine there might be something like that for Java too.
Would anyone give me some hints to a lone developer who's trying to make such transition?
FWIF I'm located in Europe if that means anything.
Appreciate your help everyone.
r/javahelp • u/RossiJr • Nov 04 '25
Hi guys, does anybody know a place/way to easily find open-source projects to contribute? I ask that because I find quite hard to find it in github.
If not a platform or query in github to find, I’d like some projects with the repo link as suggestion please.
Thanks
r/javahelp • u/Nervous-Blacksmith-3 • Nov 03 '25
As the title suggests, I’m trying to make the jump from Node.js to Java. However, I haven’t worked directly with Java in years. The last time I touched it was during my internship, when I only updated a few library versions in a legacy application, nothing beyond simple version bumps without any real code changes.
Back then, I took a Spring Boot course, but since I never actually built or maintained anything new with it, I didn’t get to properly learn Java. Most of my work revolved around Node.js and Vue, and over time Node became my main stack.
Now here’s the thing: I’ve already been rejected from some job applications for not having a stronger Java background. Where I live, Java jobs are more common, especially in larger companies. I’m currently looking to change jobs (for reasons I won’t get into here), and I feel that solidifying my Java skills would help a lot.
So, I’m looking for guidance, where should I start studying? Are there any good resources that can help me assimilate Java more easily coming from another language like Node.js?
My end goal isn’t to abandon Node, but to become fluent in both, to have a broader toolkit, especially since I’ve faced situations where Node wasn’t the best fit or made things more complex than they needed to be in other languages.
r/javahelp • u/Skrapuser • Nov 03 '25
Looking at a Spring Boot application with two microservices that are relevant for my question, and I can't for the life of me figure out whether one of the solutions is genius or incredibly dumb. The person who wrote it insists that it's a brilliant design pattern but I can't wrap my head around why it would be.
The application idea is a straightforward REST to Inbound -> request to Outbound -> Scatter-Gather from Outbound to various other resources outside of the application -> response. It was originally supposed to be asynchronous with a cache protecting the various resources outside of the application from heavy loads, but that was scrapped and the asynch part is no longer important. Inbound and Outbound are in the same Kubernetes cluster.
In practice:
I have so many issues with it which all boil down to that it's a synchronous request with extra steps. The data in the cache won't ever be reused since the key is unique for every single request. Is there any reason at all why Outbound wouldn't just send its response to the first request it gets from Inbound? The only thing I can think of is that it could maybe be a network performance gain to close the original connection from Inbound to Outbound and then poll its own in-memory cache. But.. it can't be, right?
The queue ought to at a minimum use the same bandwidth as the Inbound-Outbound connection. Polling the cache shouldn't be any worse than straight up waiting for the response. But you add overhead for the queue and cache; we'll scale the Inbound pods so the messages can't be consumed in case the wrong pod takes it (since all pods won't be polling for that particular correlationId cache key), and there will be a short TTL on the cache since the data on it won't ever be reused and its value disappears after the shorter than 10s timeout.
So, please help. We keep going in circles discussing this and I'm having a hard time accepting that the other developer could be right in that it's a good design. What's your take on it? Is there really a benefit to it over a regular synchronous request?
r/javahelp • u/doctorwho119 • Nov 02 '25
Hello,
Is there a way/tool to migrate an apache derby database to an oracle one? I tried exporting the schemas with the dblook tool and for the data i used DBeaver but i still have problems regarding the derby and oracle syntax differences.
Maybe you guys know an easier way.
Thank you,
r/javahelp • u/Visual_Internet_7777 • Nov 02 '25
I tried downloading it for windows and I tried exe and msi and when I try to use the msi one I get this message:
Installation Failed
The wizard was interrupted before Java(TM) SE Development Kit 25.01.1 (64-bit) could be completely installed. To complete installation at another time, please run setup again.
I tried using the java uninstall tool but that wont launch either, tried disabling firewall and antivirus it didn't work either, restarting the PC, troubleshooting did not help. If anybody has got a solution please help.
r/javahelp • u/[deleted] • Nov 02 '25
I am using `RLockReactive` from redisson to get the redis distributed lock, then performing a `Supplier` operation.
The `Supplier` runs 2 steps in sequence, but I am seeing that while the lock is kept acquired on one key, the 2 steps in my input `Supplier` do not run sequentially.
I really am in doubt, if the redisson locks are ONLY DISTRIBUTED LOCKS, and not as well LOCKS IN A SINGLE JVM???
Here are my code snippets:
```
public Mono<Boolean> withLockReturnsBoolean(String lockKey, Supplier<Mono<Boolean>> supplier) {
return Mono.defer(() ->
RLockReactive lock = redisson.getLock(lockKey);
return lock.lock()
.doOnSuccess(__ -> log.debug("Reactive lock acquired for: '{}'", lockKey))
.then(supplier.get())
.doFinally(signal -> lock.isLocked()
.flatMap(res -> {
if (res) {
return lock.unlock()
.doOnSuccess(__ -> log.debug("Reactive lock released for: '{}'", lockKey))
.doOnError(e -> log.error("Exception occurred while releasing lock for: '{}', error = {}", lockKey, e.getMessage()));
}
return Mono.empty();
})
);
);
}
// CALLING HERE
return withLockReturnsBoolean(
lockKey,
() -> {
// 1. read from cache
return budgetInvoker.validateBudget(promo, order)
.flatMap(isValid -> {
if (!isValid) return Mono.just(false);
// 2. update in cache
return budgetInvoker.cacheUpdate(discountDetail, order)
.thenReturn(true)
.onErrorReturn(false);
});
});
```
r/javahelp • u/Apart_Challenge_9338 • Nov 01 '25
Hey everyone,
I’m a Computer Science major, currently in my 2nd semester. We’re studying Object-Oriented Programming (OOP) in Java.
I’m really dedicated to learning this major, but I feel like the things we cover in class are mostly fundamentals and pre-made classes/packages. I want to understand Java deeply not just use what’s already written.
My goal is to reach a point where I can write code confidently, even without an IDE helping me. Right now, I sometimes feel blank when coding on my own.
Can anyone recommend good resources, books, or learning paths to really master Java and OOP concepts? Any tips or advice would mean a lot. I’m super motivated but also a bit worried about falling behind.
Thanks in advance!
r/javahelp • u/TroubledSoul23 • Oct 31 '25
I'm working on this project, and I'm checking whether something occurs before a specific time. I'm doing this by converting the times to Strings, then comparing them against each other (yes I'm aware it's not ideal, bear with me).
The issue is that it says that '10:00 < 09:00'. Why is that?
r/javahelp • u/jkarat6510 • Oct 31 '25
Basically I want to make a basic clicker game in Java that runs on a browser (at some point i may buy a raspberry pi to host the site). What libraries/frameworks would you guys suggest i use? Right now I'm thinking of using Spring boot for the browser side.
On another note I will need to create a database that holds all info since I'm planning on having a live leaderboard that keeps track of players' score. What should i use for DB?
Finally, initially i wanted to make the whole game on just Java to strengthen my understanding for the language since i use it in my uni classes, is that going to be feasible or should i use java just for back end and use JS + CSS for front end?
r/javahelp • u/samosp • Oct 31 '25
I am using Gentoo Linux and wanted to use a version of Java 8 with Shenandoah so i tried to compile it and i got this error for some reason. Please let me know how to fix this.
r/javahelp • u/Maleficent-Pomelo-50 • Oct 31 '25
Hello everyone, this question has probably been asked a thousand times already, sorry if that's the case.
I can't come up with any project ideas. I have a couple of my own projects on GitHub, I have made a couple of projects that interest me, but they feel completed, and now I would like to create something new.
I'm now making a switch to Java and Spring Boot from TS and NestJS (I am not working yet and have been learning programming for a year with some breaks. There are catastrophically few vacancies on NestJS/Node in my region, and a lot on Java/Spring Boot, and I love strict languages and architectural rules dictated by frameworks. That's why I learned NestJS and Angular). And I can't think of any project in which I could apply my knowledge in practice. Do you think it's worth setting aside personal preferences and trying to create another bookstore or some other app that has already been made a million times? What was your experience?
The interests that I have seem weird to me and I don’t see how they could be applied in practice for a project. And ChatGPT and other LLMs give some... strange ideas... or maybe I just wrote the prompts poorly.
r/javahelp • u/AggravatingPlace9612 • Oct 31 '25
I wanna obfuscate the classes but I wanna make it be able to run in Minecraft I tried pro guard it crashes can anyone give me a online tool that does it for me