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
answer2198
views -
0
votes1
answer2933
viewsjava.lang.Nullpointerexception: Attempt to invoke virtual method 'android.view.View android.view.View.findViewById(int)' on a null Object Reference
I have a Fragment that through a button it will call the other Fragment. But the following error is appearing. 06-20 19:12:12.075 17971-17971/com.example.gerdaumanagement.gerdaumanagement…
-
0
votes1
answer38
viewsHow to place ad inside Alertdialog?
I wanted to put an ad banner inside the AlertDialog , has how to do this?
-
0
votes1
answer585
viewsMake a denial in an IF codition
I have the following condition IF: (ClientesBDM.getNomeEmpresa().toString().equals(ClientesBD.get(1).toString())) How can I verify if the variables are different, ie deny this condition in the same…
-
0
votes0
answers318
viewsJSP instant messaging web application with Websockets
I would like to get or build an example according to what I leave in the following image: This one will need to use websockets. I tried to study the matter of websockets and run some examples only…
-
0
votes1
answer52
viewsOne button animation (Imagebutton) android
I would like to know how to do when the user clicks on the button it gets bigger and smaller when releasing, simulating a zoom effect on the component.
-
0
votes0
answers36
viewsImplementing Textitem maximum width in Smart GWT 2.6
At Smartgwt, I’m trying to make a MaxLength in a TextItem. This TextItem is in an editable field of a Grid. Below follows the code used. How to do a validation on OnKeyPress which, when it reaches…
-
0
votes1
answer659
views -
0
votes1
answer243
viewsFieldset in Javafx
Good morning guys, someone can tell me how to implement Fieldset in Javafx. There is no such object in Scene Builder.
-
0
votes1
answer272
viewsUnable to build Entity manager Factory
<persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence…
-
0
votes0
answers139
viewsField calculated in Java
I’m doing a project in Java and I have a data base with two tables and one of them with a calculated field. The calculated field is of type "time" and was done with the command UPDATE nome_da_tabela…
-
0
votes1
answer99
viewsJAAS Authentication and Security with Multi Module
I am working on an application with the following architecture: As you can see the system will have several modules. In Project Portal I implemented JAAS, and I’m not able to maintain authentication…
-
0
votes0
answers65
viewsEdittext - more than one Listener?
I am continuing a project that makes orders on Android, and I came across the monetary format on EditText Researching I managed to find a class that is working smoothly, more because I’m talking…
-
0
votes0
answers428
viewsCould not find or load main class
I try to run my project Netbeans 8.1 and from this error shown in the picture inserted, I have java and all its components already installed, the error appeared after denying running a form, giving…
-
0
votes0
answers391
viewsRedirect JSP page
When registering the "object" in a JSP, it calls a command that at the end calls another that redirects to the "list". RequestDispatcher dispatcher =…
-
0
votes1
answer19
viewsStart the bank service with a function
I would like to know how I can do a function that once I start the software, I can start the database service if it is turned off. to using java with swing, netbeans and Mysql thanks in advance.…
-
0
votes0
answers152
viewsError saving request | java web application + jsp + Hibernate + vraptor
I am making a web application (E-commerce), which is the final work of the web discipline, only need to save the request in the bank but is giving an error that I can not solve. I searched, but I…
-
0
votes1
answer786
viewsHow to get the Android device IP to be used in Socket() in java?
I’m trying to implement a point-to-point communication (device to device) and I need to get the real IP of the server device to then insert it into the client but I can’t. I’m using: ServerSocket…
-
0
votes1
answer875
viewsNull Service Instance with @Autowired
Hello, everyone. I am making a Springboot REST webservice application with JAVA. I need a method to run from time to time. For this, I am using Quartz (org.Quartz). The class method is executed in…
-
0
votes1
answer83
viewsWhat is the best way to eliminate spaces and dots?
This is my code, but the output is not matching with what I want and is not separating the space or deleting the dots from all lines in the file. BufferedReader inf = null; String line; String…
javaasked 7 years, 3 months ago zaissov Mendes 3 -
0
votes0
answers18
viewsError generating report, only on server
I have an application in Netbeans, decided to put it on the air, made an aws server on Amazon, set up mine glassfish server, and up the application, the configuration of the glassfish It’s the same…
-
0
votes0
answers154
viewsConsuming JAVA webservice - Problem
I am trying to consume the webservice but is giving a mistake that I do not understand. The webservice is this. I’m trying to use the solicitarRange, and normally I do so: new…
-
0
votes2
answers828
viewsFormat Timestamp for string without milliseconds?
I have the following variable public Timestamp CreatedAt; She is placed in a textview in this way: hora.setText(String.valueOf(notificacao.CreatedAt)); The exit is: 2017-06-29 12:31:21.759 I wish it…
-
0
votes2
answers672
viewserror starting apache tom cat(home page) HTTP state 404
when I am starting the tom cat(localhost:8080) the following State HTTP 404 error is happening, and does not show the initial page of the tone cat. cat tone log Ene 21, 2016 11:53:41 AM…
-
0
votes0
answers107
viewssave the data coming from parse (back4app) in mobile memory
I am trying to save the data coming from the parse on the device, when it has connection to the internet it works, but when it does not have it does not work so the data only appear when it has…
-
0
votes0
answers164
viewsPlace an image.jpg as the maximized background
<head> <link rel="stylesheet" href="stilo.css"> </head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Gleriston</title> <body…
-
0
votes1
answer282
viewsRecord audio equal to Whatsapp
Does anyone know how to record an audio while the button is pressed and stop when releasing the button equals Whatsapp?
-
0
votes1
answer64
viewsFilter in a project that consists of several projects and that are executed in different ports (Spring Boot)
I wonder if there is how (and how I can) develop an application that consists of several other applications and to access these other parts of the application I need to have logged in. I believe…
-
0
votes1
answer19
viewsAlertdialog when there is an exception
Good afternoon, I would like to know how to make a Alertdialog to be shown to the user when there is an exception , on android.
-
0
votes1
answer1113
views -
0
votes1
answer40
viewsImageview error cannot be converted to Byte[]
I am mounting an application to which you want to save the image in the SQLITE Database. I am not able to proceed because the following error occurs ImageView cannot be converted to Byte[] I ask to…
-
0
votes1
answer714
viewsError saving SQLITE: table .. has in column named
Error when saving the image path in SQLITE. Says it does not have a column named pathImage in the products table attached to the image with the error for better understanding. My Dao Product Class:…
-
0
votes1
answer98
viewsThe last Listview item is always deleted even by deleting an item in the middle of Arraylist
I own a Adapter any and by clicking on an delete icon, the item in my ArrayList is removed. The problem is that even by removing the desired item, the ListView is updated, always removing the last…
-
0
votes1
answer459
viewsSpinner.setadapter on a null Object Reference
The array of players is filled with the dice but gives error in the method setadapter. Spinner spinnerJogador1; ArrayList<JogadorModel> jogadores = jogadorRepository.SelecionarDisponiveis();…
-
0
votes3
answers405
viewsHow to import all Static variables from another class?
I have two classes, A and B. The class A need to access all existing static variables in B. How to make this import? I found a lot to do with get, however it does not seem to be that. I am beginner…
-
0
votes1
answer808
viewsSend Image with Socket Java
I need to make a program able to send an image to a server (my pc for testing) when pressing a button, I already know how to select the file, but I can’t find/understand anything on the internet to…
-
0
votes1
answer102
viewsError when compiling Phonegap
When running the command to compile phonegap phonegap build android But you make a mistake: [phonegap] executing 'cordova build android'... Running command:…
-
0
votes1
answer265
viewsError testing a route with Apache Camel
I have an application running Apache Camel and now I’m implementing tests integrated in it. I have here a class that does the route function: @Component public class CoreRouteBuilder extends…
-
0
votes0
answers96
viewsDoubt how to get the answer (Java)
Friends, it is possible to get the answer of this request through a GET or POST? The page is: http://nfe.sefaz.ba.gov.br/servicos/nfenc/Modulos/Geral/NFENC_consulta_chave_acesso.aspx What I need is…
-
0
votes1
answer773
viewsError with Coordinatorlayout
XML: <?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"…
-
0
votes1
answer175
viewsHow to get jsoup to pass only specific parts of the site?
How do I make sure he only passes the €1.25 part to String? https://www.pingodoce.pt/produtos/tab-choc-negro-nestle-100g/…
-
0
votes0
answers41
viewsHow to save values from an array to a database?
I’m creating an Android app for tcc. I have 3 vectors: coorx[i]; coory[i]; busy[i]. This Busy vector is not fixed, so the values were changing according to what the user requested. Then I would have…
-
0
votes1
answer310
viewsHibernate does not generate the database and tables in mysql
I’m having problems with my project, tables. jul 06, 2017 7:19:21 PM org.hibernate.Version logVersion INFO: HHH000412: Hibernate Core {5.2.10.Final} jul 06, 2017 7:19:21 PM…
-
0
votes1
answer92
viewsAdd Background to a Girdbaglayout
Good afternoon guys, I’m struggling here trying to add a background image inside a Gridbaglayout but I can’t. Some charitable soul could help me? Follows Code > package View; import…
-
0
votes1
answer217
viewsRedirect DDNS to Tomcat
I created a free DDNS in Winco and wanted to know how to redirect it to an application in Tomcat. At the moment when I access the DDNS, it redirects to my modem page.
-
0
votes1
answer274
viewsJtextfield that accepts only two letters
How do I make it in a JTextField, I can just type two letters of the keyboard and not use any other letter, number or character? For example: in a field I just want it accepted either the letter T…
-
0
votes1
answer279
viewsHow to draw an image with Canvas?
I have this code and I want to draw an image: public void render(){ BufferStrategy bs = getBufferStrategy(); if(bs == null) { createBufferStrategy(3); return; } Graphics g = bs.getDrawGraphics();…
-
0
votes1
answer29
viewsRemove values for SQL file not working
I have this code, which takes Strings and puts them in a Database, but the problem is that it is creating Database but I don’t know why , it is not inserting the values in it. Below I leave the xml…
-
0
votes1
answer1578
viewsHow to use Findviewbyid E Onclique in a Fragment?
I added two tabs to the main Activity layout, and created two java classes, one for each tab. So I took the buttons of Activity xml from main Activity and put it in the layout of Fragment, but I…
-
0
votes1
answer526
viewsCapture part of a string within a pair of <> characters using regex
I’m trying to solve a problem that consists of exchanging words that are between <>. For example, I have the following string: <><PALAVRA outrapalavra>palavra</PALAVRA> In…