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
-
1
votes0
answers59
viewsError while running Choose to query JAR file
I created a Servlet that should access a class in java that is in a Jar file in Servlet Buildpath, but it is giving an error, I will leave the prints here for those who can help me take a look.…
-
1
votes1
answer692
viewsFile . properties in java code
My JSF application I’m using a file. properties to store the texts, etc. I already use calling the keys inside the .xhtml. file How do I call the keys in the code . java ? My class Util: package…
-
1
votes0
answers49
viewsGet feedback on the keyword that was sent to the Twitter Stream API in creating Apache Storm topology
I am developing a system that uses Apache Storm integrated with the Twitter4j library, to process tweets in real time. But I have a problem: Is there any way to know which keyword that originated…
-
1
votes1
answer172
viewsDefine which method is not serialized
I have a Rest service that returns as a response the object of a class that contains the following structure: public class LocalizacaoLinhaWrapper implements Serializable { ... private…
-
1
votes1
answer32
viewsJava Iterator | Increment within a sentinel
public void actionPerformed(ActionEvent e) { i++; ImageIcon icon = new ImageIcon(files[i].getAbsolutePath()); imagem.setIcon(icon); frame.add(imagem, BorderLayout.CENTER); } }); I have an array of…
-
1
votes1
answer205
viewsJboss AS 7 using proxy with HTTPS
I have a Jboss server on my machine for developing tests. In the company where I work we have a proxy. I need to test the Google recaptcha. It uses https. I set up the proxy information in the tag…
-
1
votes1
answer309
viewsError in field validation
I have the following class: package br.com.pokemax.modelo; import java.util.Collection; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import…
-
1
votes1
answer355
viewsAdd lines in a Jtable according to ascending order
I’m making a RBC system to verify the similarity between computers. I would like to sort my table rows by the value of probability. The problem is that the table has around 9,500,000 rows. Does…
-
1
votes1
answer1241
viewsHow to create a transparent or colorless css background?
What is the code in css to make the background transparent, or colorless? I’m creating a Native ad on Admob and I need the background to be transparent.
-
1
votes1
answer611
viewsDatatable with Rowexpansion Editable not Update - Primefaces
I have a DataTable which expands the line into a DataTable editable, in the expansion it is possible to add items, by the button "+ Item", everything is working correctly, but I cannot update the…
-
1
votes1
answer444
viewsSum values of equal items in a table
I am using JAVA, JPA, Wildfly and Primefaces, but I would really like someone to help me in a java method to sum values of equal items of a dataTable.Example: I have two columns PRODUTO and…
-
1
votes0
answers56
viewsMapreduce. Does not perform Reduce function correctly
Hello. I’m having a hard time working with Mapreduce. Whenever I run the application I get no result, because apparently the Map function runs, but the Reduce function remains at 0%. When I check…
-
1
votes0
answers126
viewsCall properties in java
I created a file .properties to organize my texts, etc. I can use normally calling the key from a .xhtml. But I can’t call from a code .java. My files are below: package br.com.pokemax.util; import…
-
1
votes1
answer791
viewsUpload photo in java form
I need to make my form send and save a photo in the database and show later, how I should do ? I declare what type of variable in the Client entity? String or byte ? I know the first faces have a…
-
1
votes1
answer113
viewsHow to handle the MAC address(physical address) of the roteadot?
I am making an application on INTEL XDK for smartphone and would like to capture the value of MAC Adrees Wifi Router active at the moment, as well as the network name (SSID) and password, to make…
-
1
votes1
answer53
viewsLink model information to a Listview correctly
To retrieve an object from my domain from the event AdapterView.OnItemLongClickListener linked to my Listview added to the Viewholder of the Adapter used by this a reference to my domain object.…
-
1
votes1
answer217
viewsBetter organization of my project
My project has the following packages in its structure: br.com.xxxx.model: Which contains the entities. br.com.xxxx.negocio: That contains the DAO interface along with the implementing classes.…
-
1
votes0
answers80
viewsWhat are Abstract Classes
Why should we use an abstract class? in what situation? is the same thing as interfaces? What are the advantages and disadvantages of using?
-
1
votes1
answer471
viewsCompare geopoints with user geolocation
I’m using the Google Maps API v2 in the Android Studio and I took the base code that made it available and just implemented a few points on the map, using latitude and longitude of the points…
-
1
votes1
answer340
viewsRead files. bat java
Someone could ask me a question, as I do to read and edit a file . bat by java, in case I have a file . bat I want to open it in . txt to change, the method below is what I am using public void…
javaasked 8 years, 1 month ago Renato Valadao 11 -
1
votes2
answers717
viewsJPA error with Wildfly - No Persistence Provider for Entitymanager named Project
Hello! I am creating a very simple test application using JPA, Wildfly as application server and Oracle Database 11g Express Edition as database. The purpose of the Test class is to execute a People…
-
1
votes0
answers325
viewsConversion from String to Bigdecimal is giving error and method not saved
I’m making a system for video rental and on my category screen a field called value to save the value of my category. I was able to convert String to Bigdecimal using the following methods:…
-
1
votes2
answers267
viewsHow to split a number stored in a string and check if it is divisible by 495?
For example a number that doesn’t fit in one int and I store in a String. How do I see if it is divisible by 495?
-
1
votes2
answers237
viewsWhy isn’t jsf recognizing Istener in the Bean?
Why jsf is not recognizing the Bean Reader? My bean: /** * Listener que escuta a mudança do tipo de Solicitante * * @param event */ public void mudarSolicitante(ValueChangeEvent event){…
-
1
votes1
answer1831
viewsSending of sms by Java
Speaking personally, I am developing a financial application that I was asked to send a text message to the main administrator. I’m using Java web, Mavem,jsf, Hibernate. Could someone give me a…
-
1
votes1
answer216
viewsError "Please configure your build for Vectordrawablecompat"
I created an application that uses the database and it is not running. When I open it shows the following message "The Beta Database app has stopped" So I went to see Logcat and he shows that the…
-
1
votes3
answers3912
viewsArduino IDE does not open in Windows 10 - JAVA error
I installed the IDE of Arduino in my Windows 10 64bits and I’m having trouble executing: The log of debug gives this result C:\Program Files (x86)\Arduino>arduino_debug.exe Picked up…
-
1
votes2
answers199
viewsI’m not able to exbir a listview that uses an Arrayadapter<String>
I have a main class that inherits from Activity where I have my views, but I needed to create another class that inherits Arrayadapter. However I am not able to present my listview, the strange…
-
1
votes1
answer1546
viewsChange the line color of a datatable
I am using JAVA,JPA,Primefaces, I have a datatable that summarizes a stock.I want to color the rows of the table if the check value to the minimum of each product, I do not know how to proceed,…
-
1
votes2
answers840
viewsHow to know the number of files in a folder using Java?
In short, given a path that is a system folder, the return is the amount of files directly in the root of the folder (should not take into account files in subfolders). This would be used in a for…
-
1
votes1
answer41
viewsNot converting INTEGER to String
Good Afternoon, my application has the function of monitoring virtually a football game, and it contains a button that saves the name of the team and the number of goals that the team made... Only…
-
1
votes1
answer695
viewsProblems connecting to my computer using external ip
I am trying to make a java application that will serve as a server so that an android application establishes a communication by Socket with the computer that my program is open on the port that it…
-
1
votes1
answer55
viewsAndroid consmindo web service Soap
I’m having trouble consuming a web service SOAP complex-type How could I submit this request, I am beginner in mobile development. <Autenticacao xsi:type="urn:Autenticacao"…
-
1
votes1
answer309
viewsClass not found in Windows CMD build
I am unable to run my JAVA algorithms through the Windows 8.1 terminal . It turns out that there is always a class error not found, I already put the . class files together with . java and still…
-
1
votes1
answer271
viewsselectonemenu and dialog of primefaces
Hello, everyone. At the moment I’m having a problem with prime faces which is a library of visual components of Java. The problem I am having is the following: On the login screen of my system,…
-
1
votes0
answers249
viewsHow to upload/transfer files with java?
I’m trying to make a program that controls the information of students in a school. One of the functions of this program is to archive scanned student documents, but it’s precisely in this part that…
javaasked 8 years, 1 month ago Victor Piovani 55 -
1
votes2
answers290
viewsWhat is the life cycle behavior of JSF 2 when validating mandatory fields?
I have a customer registration form with two fields, the first field is the CPF with mandatory and the second Name with optional. When editing a client with CPF and Name populated, delete the two…
-
1
votes1
answer1403
viewsAdd item to Arraylist every time an object is instantiated
I have 3 classes: Customer, Account and Bank. public class Cliente { private String nome; private String telefone; public Cliente(String n, String t){ this.nome = n; this.telefone = t; } (...) +…
-
1
votes1
answer821
viewsHow to modify an object attribute in an Arraylist?
I created a ArrayList(objetoQueCriei), and would like while running the program to change the value of the attributes of these objects in the array. Have some command to do this? I tried to use the…
-
1
votes1
answer51
viewsLeave some data from a Java interface not required
I use interfaces to make the callback on android. public interface CallbackUsuario { void resultadoSalvar(boolean b); void resultadoTrazer(Usuario u); void resultadoListar(List<Usuario>…
-
1
votes2
answers816
viewsCreate Jsonarray with objects?
I have 2 classes: Venda and ItemVenda. I want to create a Jsonarray with all my sales and your items. I’m trying to use Jsonobject with Jsonarray to create this but I’m not getting it done. For…
javaasked 9 years, 2 months ago FernandoPaiva 1,562 -
1
votes1
answer52
viewsQuery with jpa + Hibernate with more than one idt in clause
with Hibernate I can make an inquiry by idt as follows: entityManager.find(Empresa.class, idtEmpresa); And that would already return the mapped object of the company class, but what if I wanted to…
-
1
votes1
answer667
viewsError 404-Not Found Spring MVC application
I’m getting the bug Error 404-Not Found: The server has not found Anything matching the Request-URI when trying to access any url of my application, the strange thing is that the page index.jsp…
-
1
votes1
answer1317
viewsHow to solve the date validation problem - Calendar - Primefaces?
Loading the date in a Calendar (Primefaces) normally loads: Code: <p:outputLabel value="Data de Nascimento" for="data-nascimento" /> <p:calendar id="data-nascimento" locale="pt"…
-
1
votes1
answer370
viewsError in creating a Maven project
As soon as I create a Maven project with the "War" Packaging, it gives the following error : Description Resource Path Location Type web.xml is missing and <failOnMissingWebXml> is set to true…
-
1
votes1
answer1631
viewsLoop to fill an input with multiple data - Selenium Webdriver
How to loop to scan an array and bring its data one by one and fill in the input? The picture illustrates well the problem... I need For to pass several times through the method and take the data…
-
1
votes0
answers100
viewsUpload image using Android
I implemented the step to download the images on Android. It’s working wonderfully well. But now I need to do a method to upload an image to a php server. I thought of converting to Base64 and…
-
1
votes0
answers95
viewsjava redirect 301
I need to do a permanent directing via Servlet in java, with the code below: Here it directs with the status 301 response.setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY);…
-
1
votes1
answer71
viewsJSP Two boxes after the comma
I have the following number: 10.205203 I would like it to be shown at only 10.02; I have that function, I don’t know if it’s the right one <fmt:formatNumber value="${media / total}"…
-
1
votes1
answer86
viewsModify Dates of each object - MONTH, YEAR
I have an application where I create a release of for example 400 real and before saving define the creation date and how many times I have to do. Then saved. And at this point I save I add the…