java

  1. Hilton D

    Java Differences in visual capabilities between Java applets and applications

    Is there anything a Java program can achieve that an applet cannot in terms of graphic capabilities? I'm talking about java libraries (such as Swing), not native ones. I need to design a graph visualization user interface, most likely utilizing the spring embedder technique. I saw this oracle...
  2. S

    Chess coding

    I have created a game of double chess that has been developed into an online game play.synergy chess.net I have noticed that chess.com is written in Java, JavaScript and PHP. Synergy Chess is written in ReactJS, NodeJS, Xitrium, Scala and Java. This makes it very hard to find qualified...
  3. datdatyul

    Java Spring Boot Microservices - How can I reach out another service method from another service in Junit Test.

    Hi, I have a problem about reaching out one url defnied in AuthController of auth service from any method of OrderControllerTest in order service. As I cannot reach out it, I still get 404 Not Found exception. How can I reach out it? I hope anyone can help me. Here is the link ...
  4. datdatyul

    Java Spring Boot Microservices - Spring Security Issue in one service throwing throwing java.lang.StackOverflowError in JUnit

    I have a problem in running any test method in service test and controller test in one of the spring boot microservices (order service). After I completed service and controller , I tried to write their test methods but I have a problem in there. How can I fix it? Here is the security config...
  5. SHjiwani

    Java How do I add exponents and parentheses to my code?

    This is the pastebin for my code: pastebin.com/gV01kTje Basically I have an assignment where I need to create a calculator capable of up to 3 step equations and being able to do all PEMDAS operations in PEMDAS order. So far I've gotten it up to 3 step operations and being able to do addition...
  6. B

    Java For loop to print out numbers in order

    Hi, I'm trying to write a code with for-loop to get numbers in order. For example 3,4,5,6 or -1,0,1,2,3. This is what I have come up with this far. public static void runLoop(int start, int end){ for (start <= end; start++){ System.out.print(start); } }
  7. B

    Java Do-while loop

    I'm trying to make a do-while loop that print out a + each time it runs. It works well but I need to solve how to make a condition to make in not to print a + if it runs 0 times. I get that do-while loops runs at least time but I need to make a condition. Example runLoop 4 = 4 and runLoop 7 = 7...
  8. datdatyul

    Java Spring Boot Microservice - 403 Forbidden among API Gateway and some services

    Hi , As I'ven't solved the okta issue for nearly one month, I created and auth service (creating user and login). I have a security problem about connection among auth service, api gateway and order service. After I created a user and then login, I tried to make a request to order service...
  9. datdatyul

    Java Java Stream Not Calculating the total count after filtering and grouping by

    I have a problem about writing a java stream by filtering multiple conditions , groupby multiple condition (if possible) and calculating the sum value I store the values as `Map<String(pId),List<Person>>` Here is my Person class shown below public class Person{ private...
  10. datdatyul

    Java Spring Boot Microservices - JUnit Controller Test JWT Issue

    I have a problem about solving JwtGrantedAuthoritiesConverter in order service after defining preauthorize annotation in some methods of Order Controller. After I wrote the test shown below, I tried to run it but I got this issue shown below as well. I also shared my repo as a link. How can I...
  11. datdatyul

    Java Spring Cloud API Gateway JWT Issue java.lang.ClassNotFoundException: javax.xml.bind.DatatypeConverter

    I have a problem about sending any request to a defined service through api gateway with the usage of bearer token coming from login. After login, I tried to send a request to a defined service but I got this issue in JWTAuthenticationFilter of api gateway shown below. I think there can be...
  12. D

    Java How do I solve this Java riddle?

    I have the following riddle: How do I solve this in Java, using while loops? I had an idea on how to do it with for-loops, but it doesn't work using for-loops So far, all I have is the following, which seems to be going through all possible combinations, but is incredibly slow, so I suspect...
  13. Shinichi

    Java Cordinates of a point in a TreeSet

    Hey I wanted to ask if you could help me with my code. I am supposed to write a class point which shows a point in the plane. A Treeset shouldn't contain more point objects with the same cordinates. Also in TreeSets the point objects should be sorted by their distance to the coordinate origin. (...
  14. nebmucoy674

    Java Package required in .java using Eclipse? (first project)

    Hey all, I hope this thread finds everyone well! I'm new to Java and this is literally my first project. The school I attend requires us to use Eclipse. When I start a new "class" (which please correct me if I'm wrong is about the same thing as a new java program inside a java project?)...
  15. datdatyul

    Java Spring Cloud - Cannot send a request from one service to another one through Api Gateway

    I have an issue not sending a request from one service to another one through api gateway in my spring cloud example, Api gateway port number is 8600. I try to send a request from management service to advertisement service through api gateway, I get the issue in Postman shown below. {...
  16. datdatyul

    Java Spring Cloud Docker - Cannot access any service through api gateway and Cannot access any service itself

    Spring Cloud Docker - Cannot access any service through api gateway and Cannot access any service itself I have a problem about accessing any service through api gateway. Here is the properties file of api-gateway ``` ``` For instance, I tried to access user service through api gateway, I...
  17. datdatyul

    Java Cannot fetch all properties from Config Server in Spring Cloud

    I have a problem in my Spring Cloud Example running in Docker. I cannot fetch all properties file from config server. How can I do that? I only fetched 4 properties file (advertisement service, user service, api gateway and report service) while other properties file(eureka server and...
  18. datdatyul

    Java Spring Cloud Cannot register any service to Eureka Server in Docker through docker-compose.yml

    I'm trying to implement an example of **Spring Cloud** with its all services running in **Docker**. I cannot register any service to **eureka server** as **eureka server** throws a connection issue in **Docker**. When I show the **logs** of **eureka server** through this command (**docker...
  19. datdatyul

    Java Spring Cloud Docker Issues (Connection Refused)

    I have problem on Docker side. When I run docker-compose, 1) Keycloak,rabbitmq,mysql and config server are running. 2) Here is my error in Eureka Server ```Connect Timeout Exception on Url - http://configserver:9191/. Will be trying the next u rl if available 2022-08-17 11:39:08.699 WARN 1...
  20. strawbs89

    HTML & CSS Radio on-air script

    hi i'm having problems with my script it won't show my djimages when my staff are on air "could someone please possible help" here's my js script (function( d ) { 'use strict'; function onair(){ var dj = d.querySelector('#dj'), nd = new Date(), dy = nd.getDay()...
Top