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
answer78
viewsCode does not read ELSE
Speak people, I’m a beginner in Android and I would like you to take me without a doubt. I am making an app for the user to complete all Edittext’s so that the program can perform the proper…
-
0
votes2
answers404
viewsEquivalent to C# Java Form.Showdialog()
I’m starting now in Java, has a feature that I use a lot in C# that is NomeDaTela.ShowDialog();. I wanted to know a similar code that does the same thing in Java.
-
0
votes2
answers313
viewsError running Java program - Mapping Servlet Web.xml
I have the following software, it should allow me to pass a file, will send a message on the console to just positive access to a class and list the result on the page, I’m starting and do not know…
-
0
votes1
answer53
viewsAdd a SET list value to Mysql
I want to add values in a list (values separated by "," which will then be used the "split" function) in mysql, I am using this code: UPDATE clans SET Admins = concat(Admins, ',', 'NomeDoJogador')…
-
0
votes0
answers2145
viewsJava error - Failed to validate the signature of the drive file
I am getting the following error when climbing the application via jboss: JNLPSigningException[Falha ao validar a assinatura do arquivo de acionamento. A versão assinada não corresponde à obtida por…
javaasked 8 years, 11 months ago user128420 1 -
0
votes0
answers72
viewsDrawline deletes previous lines
How do I draw more than one line with drawline? It always deletes the previous one when drawing a new one, but I want to keep it. The code is as follows public class DrawLines extends JPanel{…
-
0
votes1
answer168
viewsJPQL - SQL query
good night. I have a bean, which has an init() method. One of the objectives of this init is to bring the cycle that was opened according to the course of that user, that is, If there is no cycle or…
-
0
votes1
answer46
viewsActionbar dynamic text size
How do I place the text in the dynamically sized actionbar? I need to set in different text sizes and have to frame dynamically. public void setarTituloActionBar(String nome){ setTitle(nome); } The…
-
0
votes1
answer77
viewsDoubt about java.util.Date
Can anyone explain to me what this will return: java.util.Date date = new java.util.Date(); java.util.Date date1 = date; java.util.Date date2 = (java.util.Date(date.clone()));…
-
0
votes1
answer289
viewsI want to use Cardview to make the screen more beautiful only cardView works similar to a listview?
And I want to take dynamic data to show on the screen. Dynamic data that will come from a webservice. So I need to use Recyclerview with Cardview Layout to make the data dynamic? How can I make my…
-
0
votes1
answer50
viewsStackoverflowerror when using a method
Next, I’m in the development of an app. In it there are two calculation methods, where in the data entry the user chooses the method and inserts the data. One of these methods is working perfectly.…
-
0
votes1
answer162
viewsDialog with datatable is not displayed
I have a dialog with a dataTable, However, when you click the button that should open it, this does not happen. He also owns a dataTable within it that should have respective values the line in…
-
0
votes2
answers549
viewsRemoving replaceAll("[().- "]")
I’m using the openJDK1.7, I’m in need of help. String[] vetor = {"\"Jui.ce \"", "j-90.0", "Abobr.e-u"}; for(int = 0; i < vetor.length; i++) vetor[i].replaceAll("[()-.\"]", ""); The above code…
-
0
votes1
answer243
viewsManipulating a JSF + Primefaces datatable
How do I make for the dataTable only be displayed after I click Reply Simulated? When loading the page, the dataTable first logo is already displayed, even I have no question in it. I have a Command…
-
0
votes1
answer114
viewsDoubt about threads
I have two classes. One possesses a thread for the download of email attachments and the other has a thread for the conversion of files xml for csv. I started those two threads in another classe. To…
-
0
votes0
answers110
viewsDependent checkbox
I have a problem and I was wondering if you could help me. I have a CRUD that registers cycles, these cycles can have many courses. What I wanted to do exactly, is validate the selectsOneRadios when…
-
0
votes0
answers56
viewsError making associations in XML with Hibernate
I’m having trouble making associations Many-to-one. Any help I appreciate Exception in thread "AWT-Eventqueue-0" org.hibernate.Mappingexception: An Association from the table material refers to an…
-
0
votes1
answer491
viewsMysql in Java Desktop applications for multiple establishments
Hello, if I make a Java Desktop application with a Mysql database, which will be delivered to several establishments to use, what about the database? Do you have any suggestions? The application, I…
-
0
votes2
answers267
views404 in css file after spring mapping
Good night to you all! I can’t access the css of my application in spring, even after mapping resouce, follows codes: @Override public void addResourceHandlers(ResourceHandlerRegistry registry) {…
-
0
votes1
answer133
viewsSynchronous webservice
I have a Restful Webservice developed in Java. I need a (service) method that is synchronous. But I can’t do that on the client side, it has to be done on the Webservice side, because this service…
-
0
votes1
answer58
viewsWhat information can I get from the user through Java EE?
I need to implement SSO(Single Sign-On) in a client of the company I work, the scenario is basically the following: They have a web system, made in java, which has a normal login, but they want that…
-
0
votes1
answer39
viewsGenerate file by reading a database field
I’m having trouble generating files (both text and binary). The text files are not coming out with the correct encoding, and the binaries are corrupted. I’m using java 5 and struts. The code to…
-
0
votes2
answers234
viewsJSON treatment returned from PHP
I would like to know how to manipulate the data JSON below. If the structure is correct, and if not, how change the structure of it? { "postagens":[ { "URLIMG":"1.jpg", "NOME":"Jhonatan",…
-
0
votes1
answer119
viewsSpring Batch Skippolicy, what’s it for?
I wonder what the Skippolicy which is set in Stepbuilderfactory. If possible would like some documentation explaining.
-
0
votes1
answer571
viewsHow to know which Activity is open, running?
I have two activities, Activity1 and Activity2. I need to know if 2 is active or not in both activities. Example: if (activityrunning == activity2){ //do something }else{ //do something else } Thank…
-
0
votes1
answer34
viewsError when trying to include a mapfragment in an Activity
I have an Activity that should go up with the map (Googlemaps). But when implementing some methods, so that I can for example click and add a marker, it breaks, with the following error: Attempt to…
-
0
votes1
answer43
viewsGoogleapiclient inside recycleViewAdapter?
The app has a fragment with a recyclerview and a FAB. By clicking on FAB, opens a dialog where the user informs addresses, among other information. Address input fields are of the…
-
0
votes0
answers50
viewsAccented words with problems
In many projects jsf I don’t remember if I’ve ever had a problem like this but as the image below shows, the encoding is not correct. The problem is occurring in the java because I have accented…
-
0
votes0
answers620
viewsRedirect user to requested pages after login
Here in the company it is common to pass news links from the portal to others via email, but when the user opens the link he asks for authentication in the system, but after logging in he is…
-
0
votes1
answer259
viewsUpdate. csv file when edited in Java
I have a . csv file that contains information, but when I delete information (in this case contacts) from the console output the file . csv is not being updated. How to resolve? private void…
-
0
votes0
answers1212
viewsJava - Selenium - Use contains with element list
I have on a website the products that were added in the cart. I want to check that the product "Test T-Shirt" has been successfully added. For this, I have a string where this value (Test T-Shirt)…
-
0
votes3
answers60
viewsJavascript does not follow the algorithm flow
Example : $("#segundaFeira").change(function(){ valorSegundaFeira = calcularJornadaDeTrabalho(this.value); var x = valorFinalJornadaTrabalho(); alert(x); }); Note that the global variable…
-
0
votes1
answer511
viewsJSF dependency conflict with Maven
I created a Maven project in Eclipse with JSF 2, project has been evolving well, running on Tomcat 8 smoothly and that’s where I started implementing the reports so I put the dependencies for Jasper…
-
0
votes1
answer420
viewsRounding numbers on Android
I am wanting to format numbering to only two decimal places after the comma, I am using the following code line NumberFormat formato = new DecimalFormat("0.00"); But my application’s minimum API is…
-
0
votes0
answers104
viewsCreate a JPQL and define the entity at runtime
Good night. I wonder if there is a way to make a JPQL query and define the entity at runtime, without having to concatenate or interpolate String. Example using interpolation: public long…
-
0
votes0
answers28
viewsERROR when selecting a simulation
I have a subscription problem. I have a screen that recovers cycles that are open according to the course of the user and for each cycle of this already has a simulated saved, ie a relationship.…
-
0
votes0
answers38
viewsLocation of the file where the data is saved in the Parse library
I’m doing maintenance on an android project that was developed using parse library to make the persistence layer. http://parseplatform.github.io/docs/android/guide/ I couldn’t find it in the API,…
-
0
votes1
answer734
viewsNFC emulator for android
I own an android phone without NFC and need to program an application that manipulates this tool. Is there an emulator that simulates NFC on my phone so I can test my programs?
-
0
votes1
answer281
viewsError while running an Httpresponse in Android Studio
I am trying to send a string from an Android app to a PHP page, but when I send it, an error occurs in the method Httpresponse Response=httpclient.execute(httppost); In case anyone can help me with…
-
0
votes0
answers41
viewsOptical Mark Reader
I need to read a. pdf file and generate reports based on the data obtained from that file. I once made a specific system for a printer, which interpreted the responses of the candidates of a public…
-
0
votes0
answers270
viewsUpdate image after attaching to fileupload
When I insert the image by dialog using the fileupload the graphicImage does not update the image after I click on attach. The photo only appears on graphicImage after I save the form. I wanted the…
-
0
votes1
answer97
viewsJASS implementation in JSF + Tomcat
I want to create an authentication for login in my project, but when I try to log in, the error java.lang.Nullpointerexception appears Error log javax.faces.el.EvaluationException:…
-
0
votes1
answer84
viewsJava Nullpointerexeption, agenda inserts no compromise
I have a project for the college, a simple schedule, no graphic parts or database. There are four classes: Contact, Commitment, Schedule and Test. In the Contact and Commitment classes we have only…
-
0
votes2
answers89
viewsJboss Multiple context-root pointing even War
good night. Is it possible for me to configure several context-root Jboss pointing to the same War? If it’s not possible in jboss, is there any way I can do it? Thank you
-
0
votes1
answer1077
viewsFiles . jar do not open
Hello I would like a help, I created a basic java project but the file . jar does not open. I already have the jdk set Microsoft Windows [version 10.0.14393] (c) 2016 Microsoft Corporation. All…
javaasked 7 years, 8 months ago Léo Ramos Andrade 31 -
0
votes1
answer751
viewsBase64 and MD5 - Java
What are the differences between MD5 and Base64 for encryption? Which is the safest? I read that the MD5 is the most used, but I wanted to understand the reason.
-
0
votes0
answers99
viewsError when returning the object after query
Good night to you all. Objective: The main objective is to take the user id and the code of the simulated that he answered, and display it on another screen after he answers this simulated, however,…
-
0
votes1
answer629
viewsCurl or Webservice Running Javascript
I have a chronic problem, I need a CURL request to execute codes also in Javascript. Generally speaking, all posts and references point to the same answer, that Curl does not have the ability to…
-
0
votes1
answer85
viewsDoubt about cryptography
I’m looking at how encryption works though, I’m having a doubt almost all examples encryption codes have a Plaintext String, follow the link from one of the post I looked at:…
-
0
votes0
answers631
viewsDifference between Scenebuilder and Javafx Application
People I am using Scene Builder 2.0 to make the Layout of my Javafx application. When I see the application through Scene Builder everything is ok, but when I run the Javafx application the side is…