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
answer456
views -
0
votes1
answer67
viewsApp only brings a record on Android
I’m developing an app on Android where the data is in a web-based developed in PHP/Mysql. The code I’m using to get the data is: public class ListarDados extends AppCompatActivity { public static…
-
0
votes1
answer216
views -
0
votes2
answers131
viewsLoad with Ant and EAP task 7x "Caused by: java.lang.Noclassdeffounderror: javax/xml/Ws/Soap/Soapfaultexception"
I compile a script using the ant task, the load and the application platform JBOSS EAP 7, below follows my source code: <taskdef resource="cargo.tasks"> <classpath> <fileset…
-
0
votes1
answer940
viewsUse a java Resultset to print an entire table on the screen
I know that with the resultset we can do several things with a SELECT done in some table. For example: I know that we can take a table and print its contents, listing which columns we want with…
-
0
votes1
answer92
viewsManytomany Hibernate - study
I am studying the operation of Ibernate and I have some doubts.... Folks anyone can tell me how Hibernate works on the issue of organizing this information Manytomany? on this example site:…
-
0
votes1
answer49
viewsreport error - unknown property in class
I am using Jaspersoft to create a report and get the following error message: Unknown Property 'Relpadraoacesso' on class 'sda.perfilacesso.model.report.Relpadraoaccess' Error retrieving field value…
-
0
votes0
answers76
viewsImplement interface with linked lists
Good evening, everyone, I could use a hand here. I’m starting to learn the implementation of linked lists in java, but I can’t understand or find a solution to this. I have this interface: public…
-
0
votes1
answer3270
viewsLogin to the Wifi network through the app
When you connect to a wifi network that needs authentication, Android sends you to the network authentication page by a redirect usually sent by the link connectivitycheck.gstatic.com/generate_204…
-
0
votes0
answers170
viewsRequired Multipartfile Parameter 'file' is not present when I make a request through Angular 4
I can make a file upload request through Postman, but when I make the Angular request, WARN is returned "Required Multipartfile Parameter 'file' is not present" Follow my API feature made in Java…
-
0
votes2
answers717
viewsCall method with View parameter in another method
Examples of a method that requires a View public void lista(View v) { Toast.makeText(this, "Ok", Toast.LENGTH_SHORT).show(); } public void botaoAbrir (View view) { Intent i = new Intent(this,…
-
0
votes1
answer1849
viewsConsume Webservice in Deli
I created a REST webservice using JAVA, but I need to make a client in Delphi consume this webservice, I tried to make several video lessons I found by google, but none was useful to me. I created a…
-
0
votes1
answer1101
viewsGradle can’t find my main class
I have the following problem. :runErro: Não foi possível localizar nem carregar a classe principal LoadWebService FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed…
-
0
votes1
answer46
viewsCommandbutton does not register in SQL
I’m having trouble with my code, when I register a new vehicle, it says that the vehicle is not being instantiated and is returning null. Follow my settings: LAYER DAO: public void adicionar(Veiculo…
-
0
votes0
answers223
viewsJava Robot does not work in the game, does anyone know if there is a way?
I recently made a bot for a game and had a problem that had occurred to me before. The code runs out of the game but when I click on the game and press to start, only the Mousemove(robot class, java…
-
0
votes1
answer38
viewsCalendar returns object with an additional 1 month
I have an Android app that tests whether the dates stored in bank exceeded the time limit to perform a new data capture through a certain function. I was able to add the values of the database to…
javaasked 7 years, 9 months ago Rodrigo Ferraz 35 -
0
votes2
answers70
viewsFile still in use by Java / How to close file connection
Problem: Code to demonstrate the problem: import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.util.logging.Level; import java.util.logging.Logger;…
-
0
votes0
answers95
viewsListener (Listener) for Google Maps v2 Android Camera Zoom changes?
I’m using the Cameraposition() to get Camera Zoom on Google Maps mMap.getCameraPosition().zoom It works perfectly when I call somewhere in the code, but I would like to create a Listener (Listener)…
-
0
votes1
answer174
viewsI cannot register data using JAVA Rest webservice
When registering data in my database using webservice the following error occurs. Sending 'POST' request to URL : http://localhost:8080/FazendaWS/webresources/fazenda/Usuario/inserir Post parameters…
-
0
votes0
answers60
viewsDate Validation using Jdatechooser
I’m trying to validate two dates in the following case: I created a Jframe that receives two data fields using Jdatechooser, as shown below: First field the user informs the shutdown date, second…
-
0
votes1
answer61
viewsAccess Jlabels without using switch case...
I’m developing a game with JLabel from 1 to 50, I can access them online without having to use a switch. You can verify that what changes in the code and only the lblBoard1 or lblBoard2 and so on,…
-
0
votes0
answers263
viewsAngular forwarding NULL data
I already checked here on this link Request problem with jQuery ($. ajax) and Angular ($http) however I am not consequent sending in json format my data of a form in html , dry error Possibly…
-
0
votes0
answers41
viewsGetkeycodeforchar printing wrong JAVA
getExtendedKeyCodeForChar is printed wrong: Using this test class: package test; import iRobot.iRobot_Functions; public class Test { public static void main(String[] args) { String admUsr =…
-
0
votes1
answer236
viewsConvert String to INT
How to convert variable string fg in one whole? if (connectionIsOpened) { String s = "INSERT INTO jogador(nome) VALUES " + "('" + this.playerName + "'" + ")"; connection.executeUpdate(s); String fg…
-
0
votes1
answer35
viewsSearch for custom Listview values
I got the following ListView that was generated with a Customized Adapter: I would like to know how to find the values (date, time, history, id, etc) of the item with the setOnItemLongClickListener,…
-
0
votes1
answer588
views -
0
votes1
answer134
viewsString comparison does not work
I have a string that currently only gets "ERROR" and I did an if for when she gave me this value ran some things, it turns out that the comparison always fails, even the strings being exactly the…
-
0
votes1
answer24
viewsFbsqlexception in the INSERT method with Returning
I’m trying to make an INSERT in my bank (Firebird) with Returning to return the registered ID, however, when it arrives at the line stmt.executeUpdate() i get the Exception Fbsqlexception. Insert…
-
0
votes2
answers105
viewsBackground Edittext Alpha (transparency)
I would like to know how to make the Edittext fund transparent, in this way: I tried in the following ways, but without success: edt.xml <?xml version="1.0" encoding="utf-8"?> <shape…
-
0
votes1
answer128
viewsChange a record with a REST Webservice
I am trying to change the registration of my bank through a web service in java Rest, the tests in the webservice worked, but in the client I am having problem to work. Note: Using Delphi…
-
0
votes1
answer71
viewsRecyclerview Android
I wanted to make imageButton appear if item.getImprimir() == true. It seems to work ok but if scrolling Recyclerview down starts to appear problems, it starts to appear right where…
java android android-adapter android-recyclerviewasked 7 years, 9 months ago Anderson Scherdovski 85 -
0
votes0
answers84
viewsSend E-mail by pressing a button
I’m making an application that consists of, by pressing a button a programmed email is sent automatically without I have to enter gmail to press "send" Until then I built this code and it’s doing…
-
0
votes1
answer155
viewsGET instead of DELETE in the REST webservice
I’m trying to delete my bank using a webservice rest(JAVA), he carries everything neat, but time I send the test he Method not allowed. Note: I am using Netbeans. From what I understand the WS is…
-
0
votes1
answer2275
viewsJSON parse error
I am developing a web application (Spring) and need to save a date in the database. I made a function Ajax to save the value, but I get the following error: JSON parse error: Can not deserialize…
-
0
votes2
answers40
viewsIdentify the input URL of a Filter
How do I identify by which URL a filter is being accessed? My situation is as follows: I have the class below: @WebFilter(filterName = "FiltroLogado", urlPatterns = {"/alterar.jsp", "/deletar.jsp",…
-
0
votes1
answer239
viewsjavax.ws.rs.client.Client set timeout
I have a web application where at a certain time I make requests on a endpoint using JAX-RS RestEasy as follows: // Outros códigos acima @Inject private Client client; ... WebTarget webTarget =…
-
0
votes1
answer47
viewsUser-Managed Transaction and Flush problem using JTA and Arquillian
I’m doing some tests with Junit and, to inject dependencies in it with CDI, I adopted Arquillian. But there’s one problem I haven’t figured out how to solve without using the method flush() of…
-
0
votes1
answer611
viewsDoubt in listing data from the JAVA database - JSF
Good afternoon, I have a doubt in listing data in a datatable, coming from the BD. I do not know how to return to the BD data view. Follow my code until the moment package…
-
0
votes1
answer85
viewsList Classes with Generated Jar
I have a class that searches and lists the classes within my jar, being it: public static Class[] getClasses(String packageName) throws ClassNotFoundException, IOException { ClassLoader classLoader…
-
0
votes0
answers237
viewsProject in React doesn’t open on Apple devices
I have a project done with React using Webpack for frontend and Spring Maven for back. I am using JSX files and as a framework Ant Design. The problem is in the fact that on Windows and Android, the…
-
0
votes0
answers164
viewsprimary key as char
I have a table as a primary key char(1) in sql server using jtds driver. public class Situacao{ @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "cod_sit_pedi_aval") private…
javaasked 7 years, 9 months ago Felipe j.lemos 11 -
0
votes1
answer285
viewsHow to read files with accents on Android?
Hello, I’m having trouble reading files with accents on Android. I am using the following method to perform the reading: public String lerAquivo(File arquivo) { String texto; String linha;…
-
0
votes0
answers28
viewsResultset to return BD data - Java
All right, let’s go... I have a question, I have a Bd with 3 tables and used Inner Join to unite them, and internal function of Postgresql to create a dynamic table, whose result is this: I need to…
-
0
votes1
answer33
viewsAndroid App Creation Problem - Java
I need to ask a number of questions, for a problem that was imposed on me, regarding the creation of an Android application in Java. To describe the circumstances, I am creating an app to serve my…
-
0
votes1
answer203
viewsDoubts about the construction and relationships between classes and the mapping in JPA
In the following class diagram I am trying to make the following class relationships where a demand will have a responsible analyst and a requesting client. I wonder if my mapping is right if the…
-
0
votes1
answer68
viewsHow to print only numbers that repeat between two different progressive formulas?
I have two progressive formulas of 10 numbers. Each will be added to a certain number. The first formula progresses like this 0+2+4+6+8+10+12+14+16+18+20. And its result is…
-
0
votes1
answer156
viewsOrganize message from Thread
good night. I need your help in something kind of simple, I’m doing a chat via RMI, the implementation of the program is already working less as I want, but I’m breaking my head in a simple print. I…
-
0
votes0
answers135
viewsJava/Mysql - Query error
Hello, I am trying to make a simple application to register in the bank with Java and I am getting the following error: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error…
-
0
votes0
answers90
viewsWhile iteration with date and time
How to organize the method JAVA below, to get the output as in the example. I have an array of times (would be input and output), and I need to associate these times to a date range, while I was…
-
0
votes1
answer72
viewsError executing JSF project
I am going up a jsf project, but give this error in the console. log4j:WARN No appenders could be found for logger (org.jboss.logging). log4j:WARN Please initialize the log4j system properly.…