Java Community | Help. Code. Learn.

JCH

Java Community | Help. Code. Learn.

With more than 20,000 members, join one of the biggest and most active Java Communities on Discord! ☕

Join

java-help

❓︱qotw-answers

Paste functionality in Java

Can you use Java to trigger "ctrl+V" functionality? I have found couple questions asked, 0 answered properly or given no snippets of code. https://stackoverflow.com/questions/6631933/how-would-i-make-a-paste-from-java-using-the-system-clipboard http://www.javapractices.com/topic/TopicAction.do?Id=82 ...
No description

spring course

is chad darby's spring course/enough for backend development?

PROCESS FAILED:The system cannot find the file specified

I don't know how to do this or solve this problem

I've created 1 client server, but everytime I'm exiting the server I can't connect anymore

In order to fix this problem I need to change the port. But the problem is that I did it like 8 times, so 8 ports are broken now.. When I'm writing bye, the server shuts down, but it seems like the port is still taken, what to do and how to fix it? Thank you...
No description

ButtenImage not working well

why when i use this code, my whole ui is covered with the button? What is weird, is that the image has the size 100 x 100 but the button just covers the whole ui ```java try { BufferedImage img = ImageIO.read(new File("src/goldbarren.png")); ...

No endpoint mapping found for [SaajSoapMessage idcheck]

hi guys. im developing soap service in java spring and i keep getting No endpoint mapping found for [SaajSoapMessage idcheck] erro. can smb pls help me out? My java code: https://pastecode.io/s/antg289v xsd and wsdl: https://pastecode.io/s/7142nmnr request body: https://pastecode.io/s/ng61346m ...

i am a beginner and i need to create a a triangle out of rects with a for loop, im not quite sure

i need to create a trinangle shape with a bunch of rects using a for loop and im not quite sure how to go about it, just need some tips and a little help

Need help with connecting Azurite to Java Azure SDK .

Hi I am unable to add Azure SDK in java to azurite . I need to test some blobs in java environment so ,I can't use Storage Explorer . Do I really need ssl certificate even if it's a localhost connection ?...

Simple example showing Virtual vs Physical ("Platform"?) threads & Concurrent/Parallel programming?

Hi, I am looking for some simple code example that showcase the latest features of java (21 I believe?) in regards to threads and parallel/concurrent programming. A github repo or some article is fine as well, I just want to play around and see how these things work when I run it....

Java Expception after building project

Hello guys I am fairly new in Java programming so please excuse me if this is some beginner mistake. I have a console based game that I want to build into a executable jar. The project consists of an App (Main) class and many further (abstract) classes and interfaces. Im using IntelliJ Idea Ultimate as a coding enviorment because I get that provided for free from my school and have to use it when doing school tasks. I've gone through the building process and have a .jar file. When I try to execute the .jar, I get an error window. The title is: Java Virtual Machine Launcher and the message is: A Java Exception has occured. Can someone help me? Thanks in advance and i'm sorry for any spelling mistakes, english isn't my first language...

java variables need to have the same name like in SOAP request?

hi guys. i have soap service in java spring. i have this dto class: ```java @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "userid",...

Spring(Boot) Security preauthorize auth return 200 on "false" instead of 403

Hello! Hope this is the right section .I've a "problem" with spring boot and spring security. In controllers i've the classic @PreAuthorize("hasAnyAuthority(....)"). I would like to receive the error 403 (in order to redirect to the 403.ftlh in case of no authentication). Just now instead if i open the page that does not pass the @PreAuthorize, returns the page with status 200, but blank, for because any api in the controlled is executed (correctly). I tried to put in the security config an http.executionHandling() but it won't execute anyway....

soap request give me 400 bad request

hi guys. i have soap service in java spring. i have this dto class: ```java @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "userid",...

Creating an object of an entire class?

I'm trying to write a program that can save an inpatient or an outpatient, I have my service classes and im trying to write my application class, and I'm trying to create an object of one of the service classes, but it requires i put in the arguments of the sections inside the service class of the same name. any advice on what do to? im trying to make an object of the whole class, so i can then save user inputs to the variables inside the class? sorry if my question doesnt make sense, im learning java and clearly its not going too well😅...

ERROR 404 TOMCAT AND JAVA EE

Hello, I am currently working on a Java EE project using Tomcat. Today, when I executed my project and started the Tomcat server, I encountered an error. I would greatly appreciate any assistance or guidance on resolving this issue. Thank you for your help!...

500 Internal Error

The Students are updating but i am getting this error after clicking to update button . This are the both controller ``` @GetMapping("/edit") public String getUpdateStudent(@RequestParam Long roll_no, @RequestParam Long bookId, Model model) { log.info("Received roll_no: {}, bookId: {}", roll_no, bookId); StudentDetailUpdate studentDetailUpdate = new StudentDetailUpdate(); model.addAttribute("roll_no", roll_no);...
No description