JCH
Java Community | Help. Code. Learn.
We are a Community full of Java developers. Connect with other devs, get help, help others and do much more!
JoinJCH
Java Community | Help. Code. Learn.
We are a Community full of Java developers. Connect with other devs, get help, help others and do much more!
Join[Kotlin] Design help needed, Class instance event subscriptions while splitting logic from data
This posts language and code is in Kotlin. Kotlin is based on java and pretty similar but there are some small differences. I am mainly seeking for a good way to execute this.
You can find the full Code I'm talking about here: https://github.com/HacktheTime/SkyHanni/tree/tutorials/src/main/java/de/hype/bingonet/shared/tutorials
Due to a set of factors I was told by someone else that I should split the logic from the data. So far so good....
Datapack for Worldgeneration
Hey, I need help for my Datapack for worldgeneration in the Minecraft Version 1.21.8. In my opinion its an easy fix, but I dont know where to find the fix. I created an Datapack for a Minecraft gamemode (Hungergames). The main thing here is that I have custom biomes and many of them have (or should have) red and brown mushrooms. But the problem now is that the mushrooms dont spawn like the way I want, they only spawn under trees (when there is no light), and I dont know how to fix it...
I broke my java software i think
So basically, I installed a game called Tachyons on itch.io which I needed to install a java Temurin for but I already had Oracle installed and now none of my .jar files will open at all and I'm kinda scared I broke everything and it tells me that theres some kind of error in one .jar file but A. its the primary game file and it worked once before. and B. I tried a fresh install of it and it didn't change anything and I don't know who to ask so I came here and asked you guys please help me 🙏
How to build and configure custom JRE for Java Spring web application in Docker Image/containers
I am building my Java API server into a Docker image.
I am making my own custom JRE using this:
```docker...
Help on a Java lab for school
Hello! I would like help on a Java lab for school, I'm really confused on it :((
Problem with own Scanner's methods
I need to realise simple version of scanner for much faster reading. I must use block reading available from Reader and its buffer. I can't get how to make hasNext methods (at least hasNext and hasNextInt) due to the problem, that if next appropriate answer is lay in some buffers and input is keyword I will lost intermediate buffers as i cant reread system input. also as i understand using linkedhashmap or String for intermediate buffers can cost a lot of memory if answer is lay in a few million buffers. can someone tell it is more sensible to realise these methods i have such realisation now(sorry if someone thinks that i have bad or cumbersome code, i m a newbie in java)
```
public class MyScanner {
private char[] buffer = new char[4096];
private Reader in;...
New Dev
I am creating a game using rpg maker MV, which runs javascripts and i would like to build my own scripts and i installed the jdk file and installed it, but i'm unsure on how i use it? can i write code in python, for java?
set JTextPane to max possible size
I'm writing an application using swing and I want to stretch out the JTextPane to take whole possible space.
For now, there is nothing in there except the JTextPane, but it takes only the space it needs, when due to aesthetics I want it to take whole possible space. Preferably I would like to do it with layouts, instead of using fixed size. Currently I use BorderLayout.
```java
public class FileView extends JPanel {...

Java class
What am i missing my code is not wrong but this in not what i want it to do.
This is what my professor wants me to do.
Finally, add a static void printResult method that takes userInt1, userInt2, result and systemOperator as arguments and prints out the result. Hint: copy down the System.printf line and comment it out in the main program. All this does is print the result out in a method.
IM MAKING AND CALCULATOR BTW....

Spring Cloyd
Is there anyone familiar with Spring Cloud? I’m having an issue with modifying the response body and would really appreciate some help or guidance
Find out if collections content changed, performant and efficient way
So this is more a question about a programming paradigm than java i guess, but given the following variable
which I recalculate every so often, I want to know whether they contain any updated definition...
HashSet<Whatever> mySet;
HashSet<Whatever> mySet;
Java Career
Dear People i am a college student with py subject but i want to make career in java so which course i should take in university for that
Is N-tier architecture frowned upon?
I have some java/spring projects under my belt, most of which are N-tier architecture-based and I've been wondering if this approach is too simple? I mean do companies prefer to use Hexagon/DDD/Microservices most of the time? I'd love to hear some advice
School Assignment
I have a school assignment due tomorrow and I have been stuck on the same damn test case for three days. Before anyone asks, I have gone to office hours and asked TAs however this is a new issue and now one is around. I am making an employee database and populating it based on a csv file which I cannot view. I have been able to do everything correctly so far and the file has no errors, however I cannot pass one of the test cases. The code has to find if an employee is apart of one or more depart...

Slot Machine 💵
Guys I know the code is very messy and messed up... But still can anyone tell me how I can actually make the important() method run ?

