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
answer46
viewsHow to capture the last 5 characters of a URI
Hello guys I would like to know how I can capture the last 5 characters of a link, for example in this link below I would like to capture the characters ". m3u8"…
-
0
votes2
answers813
viewsStart an app with a screen that isn’t Main?
Hello, I wonder if it is possible to start an application with an Activity that is not the main Activity, and from it call the main, as a kind of login to access the main menu, or even a…
-
0
votes0
answers319
viewsProblems with Scroll View, how to solve?
Good morning, I’m new with Android programming and I’m trying to develop an application in which, depending on the subject that the user choose will open a certain screen, but every time the…
-
0
votes0
answers214
viewsUse txt as Java database
I’m with a data structure project and want to use . txt as database. To write , read , write without losing data. Can someone help me?
javaasked 6 years, 8 months ago Telo Gaspar 1 -
0
votes2
answers847
viewsHow to go through an iterable?
I have a method keysWithPrefix for the purpose of returning all Keys starting with an input value that is specified as in the implementation below: public Iterable<String>…
javaasked 6 years, 8 months ago Leonardo Furtado 144 -
0
votes1
answer300
viewsError - JSF and Primefaces
Error trying to register user, the following message appears: accordion:dtNasc: '22-02-1990' could not be understood as a date. XHTML: <p:outputLabel class="lt" value="Data de Nascimento:" />…
-
0
votes2
answers704
viewsProblems with the result of a sum between double-type numbers
I want to make the following calculation: 615.6555 + 566 I expected this result: 1181.6555 However, this is me returning this: 1181.6554999999998 How do I solve this problem?…
-
0
votes0
answers40
views -
0
votes1
answer91
viewsHow to detect if the Jspinner value has been changed?
I want to carry out an action whenever the value of the JSpinner is changed. How do I do this?
-
0
votes1
answer114
viewsSending email in a Jax-rs json api
I have a demand to develop an api that among other features need to send warning emails, in the architecture it was defined that we will use javaEE Jax-rs someone has already worked with some api…
-
0
votes1
answer1061
viewsCapture the file creation date
I am creating a control panel on jsp to show updates of Excel files of a particular folder on the network. Problem: I have several SAS programs that are scheduled to update daily, and generate the…
-
0
votes1
answer244
viewsCall open Activity via Notification without losing the information
I’m having trouble calling an Activit via Notification, every time I press the notification Activity is loaded from scratch, losing the data that was in the one that was open.…
-
0
votes1
answer674
viewsHow to add duplicate values of an object arrayList and keep only 1 of each duplicated object?
Hello I have the following problem and I’m having a lot of difficulty in solving it. I have a code that applies a mathematical formula. This formula ends up being applied several times. each time it…
-
0
votes1
answer295
viewshow to make combobox modify a combobox with java desktop database items?
I managed to do but only works with pre-selected items. CidadeDAO cidadeDAO = new CidadeDAO(connection); EstadoDAO estadoDao = new EstadoDAO(connection); List<ModeloEstado> estados =…
-
0
votes0
answers155
viewsInternal frame adjustable
I made a simple code in netbeans from an internalframe that loads inside the jframe, but the internalframe is a fixed size. If I open it with a full screen…
-
0
votes1
answer402
viewsIs it possible to edit a project name?
It is possible to change the name of an application after already created the project in Android Studio, by Manifest or something like this?
-
0
votes1
answer57
viewsApplication Installation Failed
After using for the first time Android Studio on a mobile phone, I could not use the emulator normally. The message appears below. Somebody please help me? "Installation failed with message Failed…
-
0
votes1
answer148
viewsLoad Empty Spinner
By generating a Spinner, it brings the first value of ArrayList generated already selected. How do I bring it "empty" ? The best option would be to populate it with a function onClick instead of…
-
0
votes0
answers212
viewsOn call to Entityidentifierreaderimpl#resolve, Entitykey was already known; should only happen on root Returns with an optional Identifier specified
Using Hibernate with class: Java text. package br.com.meusite.model.documento; @Entity public class Texto extends ABeanDao<Texto> { private static final long serialVersionUID = 1L; private…
-
0
votes1
answer786
viewsRender component after clicking button
I have a Yes/No button.I would like to have an element rendered below by clicking Yes. As follows in the example of my page: <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE html PUBLIC…
-
0
votes1
answer56
viewsProblem with Jtable
I got a problem with a jtable. I made a method in DAO that calculates a total of consumed products, this method is called on the Screen on the sign up button, every time I register an accurate…
-
0
votes1
answer354
viewsManagedBean methods are not processed
Good morning, I am the following problem. I have an application that has several Managedbeans that are working normally. Today I went to create a new bean to do a test and this bean does not run nor…
-
0
votes1
answer1571
viewsMD5 encryption in Java?
I’m creating a program that takes a login and a password and encrypts it using MD5,I know that MD5 is not an algorithm that you can call encryption,but is actually a hash,but it does not matter,…
-
0
votes1
answer12496
viewsChange the Android App icon
I’m developing an app in Android Studio and when running the app on the smartphone, the icon that appears is the Android itself. How do I change this icon for one I have on my computer?
-
0
votes1
answer34
viewsMagic Cast - Convert String to Various Object Types
Class: @Entity public class ReportParam extends AbstractModel implements JRParameter { @Column private String nome; @Column private String descricao; @Column private Class<?> classe; The goal:…
javaasked 6 years, 8 months ago Augusto Silverio 69 -
0
votes0
answers54
viewsAndroid studio gallery effect
I have a little problem that I am not finding the answer, I wanted to make a gallery with this effect: but I’m not getting anyone would have a hint of how I can achieve such an effect?…
-
0
votes1
answer123
viewsIn Bluej Class Random IDE, limit start and end values
As I have in the code gives me the error of void cannot be deferenced On the part of nextInt() in the last two lines and with so many attempts I’ve made I ended up like this. Latitude cannot be…
-
0
votes0
answers170
viewsHow to create method to print a report - java
How do I create a way to print a DB report. Follow my method below. public void printReport (Date initialDate, Date endDate){ list<Sale> sales = getSales (initialDate, endDate); for (Sale…
-
0
votes2
answers37
viewsError inserting data into table
Opening Connection: private static final String USUARIO = "root"; private static final String SENHA = "123456"; private static final String URL = "jdbc:mysql://127.0.0.1:3306/escolabd"; private…
-
0
votes2
answers74
views -
0
votes1
answer483
viewsThis web container has not yet been Started
My Java Web application, using Hibernate, published on a Glassfish server and using Mysql database published on Hostgator this causing, constantly the following error: [2018-01-31T11:51:15.852-0200]…
-
0
votes1
answer58
viewsPrint all 0
I declared the following variable: int sequencia = 000000000; At the time of printing, is printing only a 0. Does anyone know how to print all 0 (zeros) ? How do I auto-increment to the point that…
-
0
votes0
answers116
viewsHow to show the progress of a Progressbar in S.O.’s Taskbar?
I’m using a javafx.scene.control.ProgressBar and a javafx.scene.control.ProgressIndicator, and would like to know if it is possible (and how to do) to be shown the progress in the Taskbar of the…
-
0
votes1
answer588
viewsbackup of specific mysql content data via java
Hello, I have the following method that backs up my database: public static void makeBackup() throws IOException{ String caminho = "C:\\Program Files\\MySQL\\MySQL Workbench 6.3 CE\\mysqldump.exe";…
-
0
votes2
answers435
viewsProblems sending email with Javamail
I am developing a Java Web application with Primefaces in which I use javaMail to email with user information, but it is giving error. The Bean: @Named @RequestScoped public class EnvioEmailBean…
-
0
votes1
answer81
viewsHibernate is not generating id to write to the bank
I am handling a xls file, so far so good. I can perform setters and getters normally. however in save to go to the bank, id is coming null and with that not recording in the bank. I will post my…
-
0
votes1
answer29
viewsHow to update an array with Mongodb and Morphia?
I need to update a Ingredient in the ingredient list. So far I only know how to update the entire JSON. How do I update only one item of the array? { "_id" : ObjectId("573c721f75fe72149c4d9987"),…
-
0
votes1
answer64
viewsDoubt Return API Json Android
I recently read a lot about getting data through an API on Android, but I can’t get what’s being returned in Json from a specific API shown below. { "Sumario": { "Termo": "teste", "Tipo": "teste",…
-
0
votes1
answer65
viewsValidate if method exists in the webservice and customize return message
I am creating a webservice Rest, and it is working properly, but there is a situation that I could not handle: if the provided url is searching for a non-existent method, the requester is redirected…
-
0
votes1
answer112
viewsProvide a downloadable file in an API that returns JSON
Hello, I am developing a Java API. It is basically a java Servlet that returns content in json (application/json). With a Tomcat server. One of the response fields is supposed to be a link to the…
-
0
votes1
answer87
views -
0
votes2
answers435
viewsHow to focus position using Recyclerview?
Hello, I’m having a problem saving the last user view position, e.g.: The user goes sweeping the list and when clicking on a position the app opens a new Activity and when returning to the list it…
-
0
votes0
answers177
viewshow to pass HTML objects as parameters
wanted to know how I can pass a variable VARIAVEL of the kind "[object HTMLTableRowElement]" as a parameter to send to a JSP that will make a $(VARIAVEL).remove() using javascript. This variable has…
-
0
votes1
answer28
viewsDesktop application position
Everybody good afternoon I’m having a problem I’ll try to explain: I created a desktop app and need your onscreen position to take a picture... first step catch posY,and X with getX,GetY, already…
-
0
votes2
answers46
viewsBinary Replication with Java
I’m trying to replicate a binary field that represents an image on the Oracle. Could you tell me the best way to take this data and insert it again? The field in Oracle is LONG RAW. What kind of…
-
0
votes1
answer892
viewsApache POI: how to know if a spreadsheet has come to an end?
I am developing a personal project, and for this I am using Java along with Apache POI to read XLS files, how can I know if the spreadsheet has reached its end? Thanks in advance!
-
0
votes0
answers870
viewsSocket Error ( Socket is closed )
I am making a program using sockets but a very strange error appears when I juice two numbers for 2 time. The socket goes down and I don’t know why here is the server code import…
-
0
votes1
answer46
viewsDisplay given arraylist, with click on given button
Hello, My xml has several buttons as I do so that when I click a certain button press an arraylist in listview example Botão1 clicado -> arraylist<Perguntas> carrega na listview1 Botão2…
-
0
votes1
answer150
viewsREST/JAVA+ANGULAR2 authentication
I have a java Rest api and need to perform an authentication (login/password). I’m basing myself on this java code that uses Jwt: http://www.totalcross.com/blog/seguranca-com-jwt-e-java/ My question…
-
0
votes1
answer105
viewsIs it possible to create the main method in an abstract class?
I can use the method main in an abstract class? An abstract class cannot be instantiated, I know. It can be referenced, yes. But I can use the method main in it? I’m not talking about "compile or…
javaasked 6 years, 8 months ago João Victor Souza 65