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
answer43
viewsProgress bar in java
Good afternoon guys, I have a scientific initiation project in college where we work with java, in this project I created a program that performs some calculations, it displays the calculated…
javaasked 6 years, 1 month ago Igor Fonseca 21 -
0
votes1
answer199
viewsJAVA - Split and Arrays
Hello, I need to read several strings, divide them into parts and allocate them to arrays. The problem is that my code even stores the pieces of the string in the variables, but I need to read…
javaasked 6 years, 1 month ago Victor Grecca 5 -
0
votes1
answer196
viewsError when adding foreign key to table
I get the error message: SQL Error [42703]: ERROR: column "tela_inicial_id" referenced in Foreign key Constraint does not exist ERROR: column "tela_initial_id" referenced in Foreign key Constraint…
-
0
votes1
answer199
viewsError Running Test Class
Good afternoon! All right? When running the User Informationtest class, it is showing the following errors: Error:(4, 20) java: package org.Selenium does not exist Error:(5, 27) java: package…
-
0
votes1
answer184
viewsmultiples Thread client, server using socket
Hello I’m doing a job for college and I’m doubtful how to add a new thread to add another client... basically what I want to do is after started the server is possible to send message from more than…
-
0
votes1
answer104
viewsCount integer occurrence in an Arraylist
Good afternoon, I’m having a lot of trouble calculating the total number of student absences, I’m not able to implement this class somafalta, I would like a help. from now on. import…
-
0
votes0
answers32
viewsHow to work with Scheduled Parole?
This guy is the Scheduled, he is triggered when the project is executed. Just as he is is in the automatic. I wish instead of being on automatic be triggered only when called, someone has an idea of…
-
0
votes1
answer243
viewsCalculating Number Frequency in an Arraylist
I would like a help to calculate the frequency that enrollments (whole numbers) of students appear to be able to count the total number of absences in the day. public class Principal { public static…
-
0
votes0
answers37
viewsProgressidialog exiting (Ismiss) before executing the previous code
Boa Tarde Personal! I made a request screen, where basically there is a looping fed by a data vector of WS, where it goes including the "lines" in the linearlayout. During this process, I display a…
-
0
votes1
answer59
viewsDoubt about method in Java
Would someone like to tell me how I pass the value of a parameter through the "invoke" method in Java? I have a method that takes as parameter a String (This is the method I want to invoke). However…
javaasked 6 years, 1 month ago GUSTAVO HENRIQUE LOPES SPACHUK 93 -
0
votes0
answers50
viewsProblem with database connection
My group are doing a Java project with database and while continuing the project on other machines only appeared problems only in mine that is giving the following error when trying to make the…
-
0
votes0
answers75
viewsHow to run two Websecurity classes in Spring
I have a project that performs authentications through JWT Token, and it uses Swagger, so I made a login and registration page to authenticate before entering Swagger, but I did not want to…
-
0
votes1
answer62
viewsHow to create Queries to generate a JPA SCHEMA
I am trying to create a query to create a schema in sql automatically; as soon as opening the program it executes: createQuery("CREATE NEW SCHEMA IF NOT EXISTS"); My project is like this: -Class…
-
0
votes0
answers787
viewsHow to validate a Restassured request through multiple Methods in Java?
I am developing the Test Automation of a API using Rest Assured and Cucumber, mine Feature of Cucumber is like this: @criarConta Esquema do Cenario: Criar uma conta valida Dado que realizo a chamada…
-
0
votes0
answers208
viewsValidate JWT signature with public key ECDSA (Error Decoding Signature bytes)
Good, I need help validating a json web token signed with ES256 algorithm using a public key from a .pem. file I am using a lib from Java JWT and Bouncy Castle. I have this code: String…
-
0
votes1
answer146
viewsTesseract - OCR recognition, invalid memory access
I am trying to read a license plate of a car/truck using the java Tesseract. However, I am experiencing error. I still can’t understand why. Follows: private void…
javaasked 6 years ago Filipe L. Constante 814 -
0
votes1
answer25
viewsJtable - Nullpointerexception when I addRow() in jTable from another class
I wanted to know what solution to be able to add to jTable lines so as not to give me Nullpointerexception public class Estatistica extends javax.swing.JFrame { public static DefaultTableModel…
-
0
votes1
answer166
viewsCriteriabuilder
Good evening. Please, I would like to ask you for help for the code below. It returns the total value (total values, saved in the database), but I need to return by month. I tried everything I knew,…
-
0
votes0
answers231
viewsSave an image of Imagemview to Postgres
Hello, I am making a screen where the user takes photo of the error and sends in our program. The routine loads the image of both the Camera and the Gallery and I put in Imageview, in this part…
-
0
votes1
answer27
viewsError using maximum number of vectors, and does not return to menu
I am new to programming language and would like to know if anyone can help me, here is the following problem: PS: I know the error is because I am using my object limit, but I do not want the error…
-
0
votes1
answer212
viewsSending numeric value of an Enum by HTTP request in Java
I have a problem in my system, in my back-end in Java com Spring Boot I have a class that has a property that’s kind of a Enum that I created, and my Front-end which is in Angular when making a…
-
0
votes1
answer128
viewsSpring project not saved in Mysql
I created a project with Spring boot and cannot save data in Mysql. No error message is displayed. Spring creates tables, but does not insert data. User class package com.projeto.principal.entity;…
-
0
votes1
answer29
viewsProblem when receiving value in a select with richfaces
Good morning guys, I need help in the example below: <rich:select value="#{bdaBean.argosDocum.localizacaoObra}" disabled="#{not(bdaBean.usuarioPodeAtualizarBDA)}" height="20px"…
-
0
votes1
answer24
viewsVery fickle output in multithreaded application along with Exception
I’m seeing threads now and doing some experiments. It’s a simple test, I want to print on the console ten times the name of each thread by inserting into the same object of type List in a…
-
0
votes1
answer102
viewsException in thread "main" java.lang.Nullpointerexception - CRUD Java Mysql
I’m trying to make a CRUD, when I come across this mistake and I don’t know how to fix it. Error: Exception in thread "main" java.lang.Nullpointerexception at view.ProdutView.(Productoview.java:29)…
-
0
votes2
answers149
viewsHow to send an Arraylist<Object> to Webservice SOAP
Good Afternoon Assuming I have the following Java Order and Item classes: public class Pedido implements KvmSerializable, Serializable { private String numero; private ArrayList<Item> itens;…
-
0
votes1
answer51
viewsAndroid - Convert arrayList to String []
Good morning guys, I need to convert a ArrayList for a String[]. I could not make it work. Just returns me a giant string. Follow my code public List<Item> geral(){ buscaLatLong();…
-
0
votes1
answer1332
viewsHow to create War to deploy on Tomcat with Spring-Boot?
I am creating a project in Spring-Boot and I want to create the.War file to deploy to Tomcat and I am unable to do so. I am following this example but I have not yet had success War is not being…
-
0
votes1
answer88
viewsList information of inserted objects in a Linkedlist
I am implementing an exercise requested in class regarding the insertion of objects in a Linkedlist (queue), but I do not know how to print the information of the objects on the screen. Follow the…
-
0
votes1
answer31
viewsvalues in a hashmap
Guys, I have this code, it takes a sentence and counts how long it took to type a whole sentence. since each letter has a value. but I have to do this for 10 sentences. and I’m only able to do it if…
-
0
votes1
answer30
viewsHow can I identify if 2 Hashmaps have Objects with Common Ids
Right now I’m playing a card game, in which each Player has an inventory of his Cards. I am now trying to create a Deck and my goal is to make the Cards that are already in the Deck not appear on…
-
0
votes1
answer287
viewsChange the content value of a javafx tableview line
Next, I’m using hsqldb to do a college job, and I need to change the content of a tableview view view In this case, in the columns Team name, you would need instead of code, the team name The seat…
-
0
votes1
answer438
viewsHow to check if an Integer type parameter received in Spring is empty?
I have a method that will receive several parameters. But the parameters are set to required = false because I don’t want it to be mandatory for them to be informed and I also didn’t enter a default…
-
0
votes0
answers417
viewsHow to take the value of a Java class variable and print to a JSP file
I am trying to transfer the value of a query counter in the database to a class variable, to call it in a JSP file, it will display it in an HTML page. The problem is that when I call the variable…
javaasked 6 years ago Daniel Ferreira 1 -
0
votes1
answer43
viewsString conversion problems reading data in CSV
Personal greetings. I’m creating a program that reads data from a csv file. I’m having trouble reading a String and converting to int, because in the String reading is not removed the quotes ("").…
-
0
votes1
answer157
viewsAccess all rows of a JAVAFX table
I have the following table: When clicking a button, I want a function to run on each line read: private void inserirResultadosUsuario() { //Necessário pegar o valor de cada linha e de cada coluna…
-
0
votes1
answer48
viewshow to work with genus and species of various tables unifying them to graphics
I am 3 weeks studying java, I have a spreadsheet and in it coast. Genus and within it the species that in column 1 of Excel. In column 2 it has the amount of individuals of this species in a given…
-
0
votes0
answers27
viewsproblem to compare two strings in java
Hello, I read a text file File file = new File("/path/historical"); String ler=""; try{ String urlF="/caminho/historico"; FileReader fileReader = new FileReader(urlF); BufferedReader reader = new…
-
0
votes0
answers69
viewsHiding Pages (Java for Web Development)
I’m studying the Java booklet for Web Development - Caelum, but I’m struggling at one point. In chapter 9.10 HIDING OUR PAGES I have already put all my pages in the WEB-INF/jsp directory and I have…
-
0
votes1
answer49
viewsProblems declaring a foreign key using Ibernate
Hello.I need help declaring a foreign key using Hibernate in a project with JSF, I consulted several websites and handouts and could not find a solution. Where I have the classes already mapped…
-
0
votes0
answers101
viewsHow to transform a JSON with Jolt?
I have a json which contains categories and subcategories, I would like to transform it using Jolt. Thereof: [ { "id": 1, "name": "Alimentos", "children": [ { "id": 2, "name": "Arroz" }, { "id": 3,…
-
0
votes2
answers547
viewsIdentifying triangles in Java
I’m doing java exercise, but I can’t find a logic for this: Receive 6 numbers representing measures a,b,c,d,e,f and relate how many and which triangles can be formed using these measures.(To form a…
-
0
votes1
answer43
viewsHow to get information from a TCP server and send to the java client
The idea is this:I have a TCP server that calculates the amount of water in a water tank,when it is 250 liters should warn the client that it needs to refill. But whoever has the information that…
-
0
votes1
answer52
viewsAutocompletetextview with suggestions, from a web service
I have a Autocompletetextview that from a php api returns suggestions to the user based on values contained in my database. php autocomplete.: include_once('../includes/config.php'); $connection =…
-
0
votes1
answer250
viewsOverflow error
Good afternoon, I’m having a problem with overflow in my Location class, I have no idea why it’s happening. I am beginner in the area, I still have not much notion of these mistakes, someone could…
-
0
votes1
answer48
viewsView error
I have this query system in the msql database on the site, but I want to bring to the Oura Activity the login values and password. I tried with putExtra, but she doesn’t recognize the strings…
-
0
votes3
answers253
views -
0
votes1
answer508
viewsHow to return validation errors of subobjects, attributes(objects), lists, to spring?
Today I can validate attributes errors of my class that are not complex objects (other objects of my model that are related to it), but what happens is that the "validation bean" validates the…
-
0
votes0
answers95
viewsHow to stop a Session?
I am working with Java Swing. I have a report screen, which when it is clicked on the confirm button, it calls the generate method. The generating method goes in control, and the control goes in the…
-
0
votes1
answer644
viewsjava.net.Bindexception: Address already in use: bind
How are you guys? So I have a problem running my WS, I developed in java, at the time of starting it returns me this error along with: at sun.nio.ch.Net.bind0(Native Method) at…