Socket connection to localhost refused
I have a Java Spring Boot application that at the service level creates a Socket connection to localhost and accesses another application written in C++.
how to rectify this error when connecting me server to the database in VSC
Exception in thread “main” java.lang.ClassNotFoundException: com.mysql.cj.jdbc.Driver
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:421)
at java.base/java.lang.Class.forName(Class.java:412)
at ServerChallenge.main(ServerChallenge.java:12)
Java Swing Socket Programming Thread Management
I’m writing socket programming with Java. I have 2 different threads running on the server. When a user connects to the server, Login and Register threads are executed. I think there is a problem related to creating sInput and sOutput objects in the thread section. The system works correctly when only the register or login thread runs on the server. However, when I run both the login and register threads on the server, I get an error. The error is as follows:
Java Sockets UI Chat Elements
I am currently making a java chatroom using Java Sockets. I have the basic UI working with properly functioning text, but I am attempting to add elements to the text (bold font, italics, etc.) and cannot seem to get it working. I have attached the code that effects the text, if anyone could help me out it would be greatly appreciated. The main issue is that getDocument() is underlined in red, saying that it is undefined for the type JPanel.