Most voted "java" questions
Use this tag when the question refers to some resource, information, or problem relating exclusively to the Java programming language. Java is a class-based, statically typed, reflective, and execution environment (JRE) language. Java programs are compiled to bytecode and run on a virtual machine (JVM), allowing a "write Once, run Anywhere" philosophy (WORA).
Learn more…14,468 questions
Sort by count of
-
0
votes1
answer11
viewssetOnFocusChangeListener problem with edittext without filling
someone could help me please. I am with a problem, I made a setonfocus in my app, for it calculate and show the result as soon as the user click outside the edittext, however if the user does not…
java android android-studio android-activity android-adapterasked 4 years, 1 month ago Jonathan Castro 1 -
0
votes0
answers16
viewsERROR IN THE ARTIFACT
I’m trying to run a little Java project of a course of Servlets that I’m doing at Alur@Intellij and I’m having problems with Artifact. The instructor had just created a common Java project and used…
-
0
votes0
answers10
viewsHow to extract a text within a <dd> using Jsoup?
Talk, you guys, baby? I’ve been trying for a couple of hours, and I’ve already researched everything that is a place to fix it, question is as follows: I need to know if an X text is like "OK" or…
-
0
votes0
answers13
viewsAndroid Studio (Java) - Help with gesture direction detection using buttons
Hello, I’m starting to program, I’m making an app where I need to press a button and if it gets pressed and is dragged I want to know the direction it was dragged. I’m using the Java language.…
-
0
votes2
answers184
viewsi18n - Java Internationalization - Entity Validation Message
I have an app Spring Boot where I’m developing a system Web using Thymeleaf. The system has the translation functionality according to the language of the user, however, when using in the entity,…
-
0
votes2
answers31
viewsLocking app when adding a new page in Pageradapter
I’m creating a Viewpager using a Pageradapter, and a Tablayout for the pages, it creates pages normally, but when I try to create a new page after setting the Adapter from Viewpager, the Crasha app,…
-
0
votes1
answer16
viewsCrasha app when setting an Adapter for a Recyclerview
Hello, I’m new to Recyclerview, I’m trying to create an Adapter for it, but when I define an Adapter for Recyclerview, the crash app, someone knows why? Mainactivity /... RecyclerView recyclerView =…
-
0
votes0
answers36
viewsSet multiple initial paths for different packages in Spring Boot
I use: spring boot 2.2.4.RELEASE The need arose for me to use two different paths in my classes annotated with @Restcontroller @Requestmapping, today my application.propeties is as follows:…
-
0
votes1
answer63
viewsIntermediate table mapping with JPA attributes
Hello, I’m trying to create a relationship where there is an intermediary table that has fields other than foreign keys. My classes are like this: @Entity public class Pedido { @Id…
-
0
votes4
answers50
viewsProblem comparing java string
I am new to developing using java and came across the following error: When giving the Return inside my if that is inside the java is the following error:"Missing Return statement" The big question…
javaasked 4 years, 1 month ago user13288315 3 -
0
votes1
answer17
viewsProblem with Annotation after updating android studio
I have an implementation made with Socket.IO on android. However after I update the android studio, everything stopped working... I created routines to facilitate lib implementation, one of them is…
-
0
votes1
answer333
viewsSpring Boot @Autowired does not work with Repository
I have the following mistake: Description: Field categoriaRepository in com.algaworks.algamoneyapi.resource.CategoriaResource required a bean named 'entityManagerFactory' that could not be found.…
-
0
votes0
answers77
viewsAndroid 11 crashes when sharing file
I always shared files via my app, but with the version of android 11 I could not perform this process anymore, because the file in question will not. I tried using Fileprovide as per the…
-
0
votes1
answer39
viewsWhere the return is List<List<String>> convert this result into List<String> only by combining the elements
Considering the implementation below: fun main(list: List<String>) { val x = list .stream() .map { findMessages(it) } .collect(Collectors.toList()) } fun findMessages(s: String) :…
-
0
votes2
answers77
viewsnextLine() problem inside the loop
The user must enter different name and password, while they are equal will stay in the loop ... Scanner teclado = new Scanner(System.in); String nome, senha; do{ System.out.println("Digite nome:");…
-
0
votes1
answer41
viewsJava - Bluej giving error return Error found in class
I am trying to make a class to read numbers in full and used this base example. However, when compiling it claims the following error: Error found in class. Someone could help with that mistake?…
-
0
votes1
answer25
viewsHow to perform Flatten with reactor?
I have a list of strings, where I convert to a Flux. And, for each Flux, I perform a flatMap which, in turn, returns a list. Further ahead I run a collectList() which converts Flux to a list. As a…
-
0
votes1
answer32
viewsError making calling methods from one class through another
My application crashes when I write this code below, I am trying to stop the Login Class in the Registration Class and access the Login class methods through the Registration class.…
-
0
votes0
answers13
viewsHow to display stitch on screen without using canvas
I created an application in Java to draw lines, when I click the first time it draws a point to symbolize where it was clicked and when I click the second time it draws a straight line from the…
-
0
votes0
answers77
viewsError: Could not find or load main class in module Pdvapplication
I can’t run the PDV application to test. I cloned the project from github to my folder and ran it using Maven in the Intellij IDE. Inside the Intellij the main is this below. It runs error-free on…
-
0
votes0
answers67
viewsWhitelabel Error Page - Java Spring Boot Project Error
Good afternoon, I’m new here, and I’m starting to study java, I’m trying to climb an initial application with spring boot, but I’m with the error Whitelabel Error Page, I tried to solve by some…
-
0
votes2
answers30
viewsEnable input with enter key
Good afternoon, esotu trying to create a login system and to enter the system by clicking the enter key on the keyboard, ends up redirecting to my "forgot my password" besides activating the key…
-
0
votes1
answer36
viewsI can’t validate @Embeddable class attributes
I have validation problem in the Address class that is @Embeddable while trying to make a POST. When I put on null in the field nome that is of Pessoa for example, I can capture the custom message…
-
0
votes0
answers20
viewsHow to find the Status Code of a feign. Response when there is no server response
If you use Postman to request a server, I always get Status Code. We will use this website as example for server. Where I put Status Code 599 as seen: Now using the Postman: How can I get this code…
-
0
votes0
answers9
viewsJava Cling Port Redirection
Hello, I am trying to do port forwarding on my router automatically. For this, I am using the Cling 2.1.2 in Java. My code: package teste_cling; import java.net.ServerSocket; import java.net.Socket;…
-
0
votes1
answer45
viewsRequest Problems (Java - Spring Boot)
Hey, guys, how’s it going? I have a code for a Rest API that registers courses and students. There is a bi-directional relationship. N Students -> 1 Course mapped as follows: @ManyToOne…
-
0
votes1
answer75
viewsSave daughter entity against Manytoone Hibernate Jpa
I have 3 entities: Request, Request and Service; There is a many-to-many relationship between the Request and Service entities so I created the third table; I would like to save a Request and also…
-
0
votes1
answer15
viewsI cannot create table when running my project in Flyway
I wrote in SQL my table in the file and I’m using flyway, I’ve created the class all right but when I go up the project does not create the table written and does not present any error. NOTE: I have…
-
0
votes0
answers13
viewsProblem accessing multi-select with Selenium webdriver and Java
Hello everyone, I’m trying to access as shown in the image, a multi-select, which is in the yellow list, in ul and li, an option of Languages: Arabic, Bulgarian etc., and when selected, it goes to…
-
0
votes1
answer26
viewsinsert data date sqlite - java
Hi, I am trying to pass a date set by the user to the database, but whenever I click add the application crasha and I have the following error: java.lang.Illegalargumentexception: Cannot format…
-
0
votes1
answer19
viewsHow to get the Primary Key ID of the information from a line clicked on Listview?
Hello, I am new to Android programming and am doing a project of which I need to do a CRUD with a litView, anyway, I already have it displaying the data, however I would like to know how I do to get…
-
0
votes0
answers11
viewsSubstring in a Querydsl
I have a class called Methodoavaliacaoprecojusto, it has 3 fields called link1, Link2 and link3. I want to get a list of all domains without repeating. In that case the links would come…
-
0
votes1
answer39
viewsUse of nextLine() in java
Hello I started studying java a little while ago and I came across a problem : import java.util.Scanner; public class MainD { public static void main(String[] args) { Scanner scan = new…
-
0
votes0
answers17
viewsPOI ( Execel column reading is different)
Boys, good afternoon, boys ! I have a column in Execel that contains the value : Import used : import org.apache.poi.ss.usermodel.Cell; When I read it like this : spreadsheet.getRow(i). getCell(1).…
-
0
votes1
answer115
viewsHikari timeout oracle springboot
Hi, I’m trying to manually set up a connection pool with Hikari. I will need to do manual because the application will have its dynamic settings for connection to the databases and schemas/Sid. How…
-
0
votes1
answer70
viewsProblem with VS Code , package java
Guys I’m in trouble for 3 days on VS Code already took, put again, deleted the folder ". vscode" and still persist, if I create a new project in vs code it works normally if I close and open it…
java visual-studio visual-studio-code packages pathasked 3 years, 11 months ago wellington gertrudes 11 -
0
votes2
answers39
viewsHow to solve Sonarqube’s criticism: Read of unwritten field Connector
In my class in the method findRecursosMensagem() Sonarqube makes a criticism, but I did not understand what should be corrected. Could help me understand what must be done? public class…
-
0
votes0
answers35
viewsProblem with Regex and Java
my problem is to solve is to remove a substring from a string but ignoring accents, spaces and any special characters. I will paste the test scenarios that makes it easier to understand the problem.…
-
0
votes1
answer16
viewsJava Filter (Android) with Parsequery field type Pointer
How I would make this query, being that this field (product) is of the pointer type, which references another table (group)? ParseQuery<ParseObject> queryProdutos =…
-
0
votes1
answer39
viewsHow to load an external . jar in Java 11
It is possible to load a .jar external in the Classloader of Java 11? I can do this in version 8 of Java, but from 9 the method for this ends up being broken (because it is considered a security…
-
0
votes0
answers22
viewsLayout with bootstrap rows and columns and Primefaces
I’m developing a Layout and needed the <p:panel> occupy every blank space it contains before the ONE and Stock fields. I’m going to post two figures, where they tell you how this is right now…
java twitter-bootstrap primefaces front-end responsive-layoutasked 3 years, 11 months ago Pablo Oliveira 21 -
0
votes1
answer199
viewsError Creating bean with name 'transactionController'
I’m starting to learn Spring and I’m getting this error, I’ve done several searches on the internet but so far I don’t understand what is causing the problem:…
-
0
votes1
answer24
viewsParse problems with inherited JAVAX WS CORE fields
I have a return class, which has its attributes set to return in the response in json or xml, depending on the query. I need to insert two new fields in this return, but they are very specific, that…
-
0
votes2
answers52
viewsGet and Set in Arraylist
Hello I am currently trying to create a test program in which the user must inform the data about a car. This car he has his own class with get and set and a builder. I wanted to take the data of…
javaasked 3 years, 10 months ago Carlos Eduardo 13 -
0
votes0
answers32
viewsGetters, Setters and Constructors (JAVA)
Good afternoon guys! Okay? I hope so! Well, I started my studies about 3 months ago in java and programming in general. Well, I am in a stage selection process and I started to study POO (Object…
-
0
votes1
answer32
viewsDeploy Heroku Error - Java
I’m starting a project for a Java application, and I’m setting up the environments before starting the implementation. However, when I went to create the Heroku app and Deploy through the project…
-
0
votes0
answers24
viewsSecurity Failure | Java Web Authentication
Context: I am building a CRUD in Java Web to study and acquire knowledge. I am not using any Framework, only JSTL to have more elegant code in Jsps. I recently implemented system authentication…
-
0
votes1
answer46
viewsValidate a date field in javascript to send to server api
You guys, good morning. I am with a very boring error, I am trying to put a form in Vue.js, however, when I send the information to the server and in java, is breaking a date exception;…
-
0
votes0
answers24
viewsConnection to bank does not arrive in the Insert method
I’m trying to make an entry into a database mysql using Java. When running the method that creates the database connection, it works. But when making the request by Servlet, when arriving at the…
-
0
votes1
answer49
viewsDoubt about polymorphism
Hello, good afternoon, I have a question related to polymorphism. Suppose I have an object Casa implementing Imovel where Imovel has a method getValorIptu() and House has an attribute…