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
votes0
answers428
viewsHow to speed up webview?
Is there any way to speed up website loading via Android webview? I saw that in my app it takes up to 5 seconds to load a page, while the Chrome browser loads in 1 second.
-
0
votes0
answers415
viewsError like @Manytomany (com.sun.Jdi.Invocationexception occurred invoking method) - JSF
Galley, am trying problem to change an employee’s password, in my Manytomany is giving an error: com.sun.Jdi.Invocationexception occurred invoking method Can someone help me? Functionbean…
-
0
votes0
answers49
viewsHow to Redeem the Position of a Sprite with Libgdx
I am unable to rescue the position of a Prite. I want to rescue the position of only one Prite as I do? public class Cubos extends Actor { Sprite azul, verde, vermelho, amarelo, cinza; public…
-
0
votes1
answer584
views -
0
votes1
answer1134
viewsPrimefaces doesn’t see the methods of my class
Here’s my problem: In the xhtml below (listDeOSs.xhtml) when I put it this way, it does not recognize the method I made in my Bean (the bean method returns a list). JSF along with primefaces is…
-
0
votes1
answer68
viewsData acquisition by Jtable
I’m trying to get JButtonGuardar(panelInserir) pass user input(local time text) of the JPanelInserir to the JPanelEventos(where is Jtable) At the moment, I am not succeeding, if you have any…
-
0
votes0
answers150
viewsHow do I change the background color of a Jfoenix Combobox item?
I’m having trouble with colors in Jfoenix. My program has this yellow, gray and white palette, but all objects are in blue. Like the items in this combobox: I tried to add this to the archive…
-
0
votes1
answer157
viewsHow to allow one device to be logged in at a time
I have an app that when installed and logged in by firebase, the user will not be able to use your account on another device. In case, if you need to change the device the user will have to ask for…
-
0
votes1
answer33
viewsError loading JSF project: URL changing alone
When running my project in netbeans, my project is being uploaded to the URL http://localhost:8080/loogix// when you should actually carry http://localhost:8080/loogix/faces/index.xhtml. The log…
-
0
votes1
answer34
viewsArrays not initialized
After the statement int[ ] a; what is stored in the variable a? null or an undefined value, where a cannot be used until something is assigned to it?…
-
0
votes2
answers3107
viewsHow to generate executable program . jar in VS Code?
Oops, I ran a java application, now I need to get the executable .jar. How do I get the . jar in VS Code?
-
0
votes1
answer363
viewsHow to run scripts in Lua with java program?
I want to learn how to develop, combining more than one programming language, using java with scripts in moon.
-
0
votes0
answers32
viewsDoubt about Fibonacci series
Why didn’t my code print the first 300 numbers in the Fibonacci series and start finding negative numbers? What’s the problem with this code? Because he only goes up to 92? final int ARRAY_SIZE =…
-
0
votes1
answer137
viewsChained list is not removing the elements
I cannot remove elements from the list. class no { public int dado; public no prox; } class lista { no ini; no fim; public void crialista() { ini = null; fim = null; } public void inserir(int num) {…
-
0
votes1
answer316
viewsHow to deploy Angular and Java in Heroku?
I have a web application in Angularjs that communicates with a backend in Java. I would like a hosting and I ended up seeing about Heroku. Is it possible for me to buy a single plan (for example,…
-
0
votes0
answers57
viewsError 404 on deploy
Hello, I am developing an application using spring boot, locally it loads everything perfectly (I am referring to static files) but when I deploy in Heroku I is returned error 404 for css files.…
-
0
votes1
answer206
viewsSave objects to Java file
I have the following code: package p10; import java.io.*; import java.util.*; import myinputs.Ler; public class P10 { public static boolean verificawl (int i) throws ExcecaoWhile {…
-
0
votes1
answer28
viewsI cannot open a message sent by firebase
I can send a firebase notification to my App but I can’t Open that same notification within the actidity responsible for the arrival of that notification
-
0
votes1
answer1243
viewsJava Webview how to use
How do I use the webview when I use: public void site(){ WebView browser = new WebView(); WebEngine webEngine = browser.getEngine(); webEngine.load("http://mySite.com"); } I have the error:…
-
0
votes1
answer38
viewsHow to exchange data between a web page with App using Firebase
I have a web page where I want to receive information from an App or exchange information between them but using Firebase, the App sends the information to the web page and the user responds with a…
-
0
votes0
answers183
viewsAbout the applets that will be discontinued, I used netbeans java web start but it didn’t work with Chrome browser
I really need to know the whole to use the java web start plugin free, because I know it has solution; What would be the best technique to launch applets in the browser Chrome? I generated the…
-
0
votes1
answer150
viewsUse of External class with error (non-static method)
I created a Class external call Useful to leave some methods that I always use, but is giving error when using them, follows code from Useful: package com.hs.gui.testelayout.util; import…
-
0
votes0
answers63
viewsHow popular is Jtable?
I have to fill out a table with bank data. But nothing appears at all. My Class Inserting information in the table: DefaultTableModel dtm = new DefaultTableModel(); String sql = "select * from…
-
0
votes1
answer99
viewsDifference between Model Class and Class generated in a Webservice
I’m having trouble generating a webservice. I have my Lib with the model classes: Address, City and Customer. I also have a Lib with the DAO classes to control access to data for the model classes:…
-
0
votes0
answers100
viewsError connecting to Sqlserver using JAVA JDBC
I’m using the sqlserver lib and my connection class is down here: public class conexao{ //sqlsever private static final String USUARIO2 = "usuario"; private static final String SENHA2 = "senha";…
-
0
votes0
answers115
viewsInvalidate characters from a Maskformatter
So guys, I have a window where I need to go through a validation of null fields of several JTextField and a JFormattedTextField, where the latter has a mask for phone numbers "(##)####-####". The…
-
0
votes2
answers81
viewsHow to Capture UTC with an Android App
Good afternoon to all! I need to capture, through an android app, which UTC used in the client device to make internal validations. Thank you in advance!
-
0
votes1
answer752
viewsExtract last numbers with Regex
I have these two examples of strings: /news/uk-news/commuter-who-extraordinary-row-woman-12345 /news/weird/dude-who-killed-14-extraordinary-98765.amp I just want to get the latest numbers, 12345 and…
-
0
votes1
answer75
viewsWhat would the @DELETE methods of a Restfull java api look like?
I’m using the FullEntityRepository of deltaspike, the Response has to be a status 204 if successful, and status 400 if not. Any tips? Service layer: @Transactional public void deletar(Integer id){…
-
0
votes2
answers52
viewsSelect from empty data
My code returns all users, checking if they paid the last month, however I connect two tables, one of all customers with the registered payments table, I want to print on jTable even if you have no…
-
0
votes0
answers187
viewsHow to take two attributes of the same HTML class with JSOUP - JAVA
I’m taking content from an HTML page, I’m selecting content for a specific class, but in this case this class has content with a href and span, I can only take one. Document doc =…
-
0
votes1
answer98
viewsJava Web - Remove Method Caused by: org.hibernate.Mappingexception: Unknown Entity: java.lang.Integer
Gent,and I’m trying to create a method in which I delete the database record. However, the following error is occurring: Caused by: org.hibernate.MappingException: Unknown entity: java.lang.Integer…
-
0
votes2
answers4907
viewsWhich encoding to use when it comes to accent?
There are so much encoding... I’ve searched a lot on Google and can’t differentiate when using each of these here ISO-8859-1 UTF-8 LATIN1 cp... See, I was having trouble with our accents, I tried…
javaasked 6 years, 10 months ago user97933 -
0
votes2
answers105
viewsProblem entering data into database
I am trying to insert a mass of data into the Mysql database using Hibernate. However I have the following error: 18:15:30,221 ERROR [org.hibernate.tool.hbm2ddl.SchemaExport] (ServerService Thread…
-
0
votes1
answer305
viewsFirebase authentication
I developed an Android + Firebase app (authentication + Storage + database). While this in the tests on Android Studio + authentic smartphone and works perfectly. I posted last Tuesday and after I…
-
0
votes2
answers58
viewsAdd Elements from one class to an arraylist in another class
I have a class Ticket, that creates a ticket. and I have to do a class CustomerService with a ArrayList Ticket type, which I called tickets and places all tickets created in this Arraylist.…
-
0
votes0
answers301
viewsJPA References an Unknown Entity
I have the following scenario: Class Rpsv3vo: package nfse.vo; import java.io.Serializable; import java.util.Objects; import javax.persistence.CascadeType; import javax.persistence.Column; import…
-
0
votes0
answers209
viewsTaking textarea data from a Jtable
I know how to use the DefaultTableModel is not the best way to make the tables, however I have not mastered anything of AbstractTableModel, i have a table that is edited as Jtextarea, but when I…
-
0
votes0
answers37
viewsException leaves no application startar
Below is my pom.xml and the exception that appears on the console. I have already followed all the recommendations I found, in general they say to redo the steps until generating the project or to…
-
0
votes2
answers174
viewsCall the Textwatcher method
Good afternoon! I’m starting my studies in Java and I’ve come to this topic. What I call the method insert on the side of Activity, past the field EditText defendant? public static TextWatcher…
-
0
votes1
answer117
viewsArray of numbers with variable amount Java Android
I am making a program for Android and I want to make an array of integers, but I need to define the quandity of numbers with a variable that has 3 options of values: 20, 50 and 100. I tried to use…
-
0
votes0
answers551
viewsLogin and password verification
I need help checking a login and password. If the login and password I type in JTextField are the same as I have in the bank, can not allow registration, what I am looking for is not a validation…
-
0
votes1
answer206
viewsError saving to bank (Unable to build Entity manager Factory)
I am trying to implement a register but when clicking on the button to save the following error appears in the console: dez 18, 2017 3:49:14 PM org.hibernate.ejb.HibernatePersistence logDeprecation…
-
0
votes1
answer87
viewsJaxb and JPA: class Embeddable Could not determine type for java.util.List
I’m trying to incorporate a class into another class. I’ve been able to do this in other scenarios, however, by the error shown below, I’m not getting it now. javax.persistence.PersistenceException:…
-
0
votes0
answers23
viewsWrong format on String to Date conversion
I have the following date in format String: 12-12-2017 I’m trying to pass this figure to java.util.Date. I’m trying like this: SimpleDateFormat formatter = new SimpleDateFormat("dd-MM-yyyy"); final…
-
0
votes1
answer193
viewsMagic square in android
I wanted to make a magic square, where I put 9 numbers, and the sum of them has to result 15 (diagonals, horizontal and vertical) I’m doing in android studio . I only have this until then: import…
-
0
votes1
answer212
viewsJava Stream converter Map<String, Obj> to List<Obj>
I have this object filled: Map<String, List<LogLine>> logMap = new TreeMap<>(); And after I’ve made a filter, I’d like a flat list of it, but I can only create a list…
-
0
votes0
answers35
viewsHow to Read and Condition a Java String
I need to know the following: I want to make a program that Le a number and then write the name of the number: For example: was typed the number 29340, then appears: 2-Two, 9-Nine, 3-Three, 4-Four,…
javaasked 6 years, 9 months ago Misael Johanson 1 -
0
votes1
answer672
viewsDivide a . txt into other . txt through the idenficator at the beginning of the line
I am trying to split a file into other smaller files, I am receiving via serversocket a file and I want this file to be divided according to the identifier that comes at the beginning of each line,…
-
0
votes0
answers109
viewsSOAP Response Returning NULL
I am communicating with a SOAP webservice, through the IDE I can execute the calls of the methods and capture the values perfectly, however, by executing the . jar generated by Intellij, all returns…