Java Community | Help. Code. Learn.

JCH

Java Community | Help. Code. Learn.

We are a Community full of Java developers. You can come here to connect other devs, get help, help others and do many more things!

Join

java-help

❓︱qotw-answers

make github actions build artifact public

https://github.com/asdru22/Game2D/actions/runs/12453995171 i have a jar that is built that i can download. however, only i can download it. how can i change it so that anyone can download it?...

build javaFX jar from github via maven

maven.yml: ```yml This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven ...

How would I hide a specific Character in a ListArray

Basically, i'm making a simple terminal file editor, which has basic syntax highlighting. I'm facing an issue where the character used for the 'cursor' (which is controlled by arrow keys) is fucking up the syntax highlighting. I use 2 variables which store its location (currentLine, and currentColumn), so how would I hide it or something off the syntax highlighting function? Code: ```java...

Help with interfaces/ inheritance

Hello im building a game where I'll have a board and GamePiece's that will be placed on the board, I have tokens, these can be placed on the board after some validation and they can't be moved once placed for the rest of the game I have totems, these will be automatically be placed in the center at the start of the game and they can be moved afterwards ...

How to set UUID as a primary key, and make an entry?

```java @Table("restaurant_group") public class RestaurantGroup extends Base { @Id...

Pig Latin Project Java

Hi, I've been working on my piglatin project but there seems to be an error with one of the conditions. I'm a beginner coder so I'm not really sure where I went wrong. I have a PigLatin and PigLatinRunner classes, the runner calls a translate method in PigLatin. Along with my translate method, I have boolean methods that check for punctuation. However, my output has a problem with counting punctuation. For example in a word string of money!" it only counts the quote on the right, but disregards...
No description

Modular Spring app can't find persistence provider

Hi, I'm trying to run my JPMS app through the command line instead of IntelliJ. I set up maven to copy all dependencies to a specified folder, so that they can be added to the module path. I use the following command to start the app: ``` java --module-path "infodb-app-1.0-SNAPSHOT.jar;modules" --add-reads ovh.eukon05.infodb.app=ALL-UNNAMED -m ovh.eukon05.infodb.app/ovh.eukon05.infodb.app.Main -Dinfodb.sources.articlelimit=5 -Dinfodb.hibernate.db.user=sa -Dinfodb.hibernate.db.pass= -Dinfodb.hibernate.db.url="jdbc:h2:mem:db1;DB_CLOSE_DELAY=-1"...

Kotlin Branch Test coverage question

I have this line of code:
if (neighborhood.street.house?.family?.contains("Steve") == true) {
if (neighborhood.street.house?.family?.contains("Steve") == true) {
Test coverage is saying 1 out of 8 branches missed. But how in the world are there eight branches here??? IMO there are only 4 branches:...

Sequence allocation size question

Hi, I have a question on what my allocation size should be for my call to batch insert records into a table. I'm using sequence generator and I have a batch process that has to insert or update 50,000 records. I'm noticing the performance for this process isn't great and I read online I might need to adjust allocation size (currently have it as 1). So if I'm batch inserting in batches of 500 records, does that mean my allocation size should be 500?

I'm trying to get back to Java

Hello, I've been studying Java for a prolonged period of time, however, due to personal reasons & issues, I had to stop for a period of 5 months. Right now, my memory is really vague regarding several topics, what would you suggest to do? Is it better to start from the basics and build up again, or just hop into it & re-learn on the way?...

Help on an old Notch game (Herp Fortress)

Hello! Around a decade ago, Markus Persson (Notch), the creator of Minecraft, began working on a demake of Team Fortress 2 called Herp Fortress. He developed it as a personal Java project and even live-streamed the process on his Twitch account. The streams were later archived. After a few months, Notch canceled the project but shared the source code on Twitter....
No description

run in docker container error

I can run my project localhost without any issues, but it compile error when I run it in a Docker container. Could someone help me figure out why this might be happening
No description

Looking for assistance getting a string to display on the frontend in an Angular project

Hello, I've been working on a project for my course and I've spent a ridiculously long time trying to get this string to display. I'm honestly confused because I have a string array that displays just fine. Basically, I'm trying to get a handful of time zones to go from my controller, to app.component.ts, to app.component.html. I'll include the relevant code below. Any assistance you can provide would be great, as I'm not sure if this is too far outside the realm of Java for the server. And please don't worry about immediate urgency, I won't be able to check this post for a few hours, though I may have a couple of follow-up questions. timeConv.java (Excluding imports) ```java @RestController...
No description

java calendar

the first week displays weirdly. pls help: ```java package lab4; import java.util.Scanner; import java.time.Month;...

java.util.LocalDate cannot be resolved

why is this giving me an error. pls help ```java package lab4; import java.util.LocalDate;...

In Project Annotation Proccessor

very short: Some classes are required by my annotation proccessor which when run first compiles the whole project to run which fails because of the classes that its generating missing in some other classes because they are loaded at the same time causing a chikcen egg problem. Running in different sub projects causes either a dependency loop or missing dependencies for some classes with dependencies. full explenation: I recently stumbled across annotation Proccessing and wrote one that works for my purposes as long as its in a different gradle project. However If I want to add something that utilises Classes from my main Code I need to change the location to that other class including that classes dependencies which is quite annoying. However I cant put it in the same project since parts of my code are generated using that annotation Proccessor. That means that the compilation which is needed before the processing fails since the imports to those auto generated classes fail since they are deleted on regeneration. meaning a chicken and egg problem. However the classes that use that generated code are not required by my processor. Meaning I basically would have to only compile the annotation processor first and then the classes as it needs them. After that the rest can be compiled. Question is how could I do that? any other way is also fine by me....