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
answers67
viewsFor no Jasper Reports
I have a problem as follows: I need to create a table for printing, where it will be filled manually, and for that, I need to generate lines according to a number that I will pass by parameter. I…
-
1
votes1
answer173
viewsHow to recover combobox index from a string?
I have the String for a combobox item, but when the user clicks on the table, the combobox should automatically select the category for that particular item. However, I found that there is no…
-
1
votes0
answers79
viewsJson mapping error for Spring boot
I’m getting the below msg when trying to map a json -- Spring Boot Jsonmappingexception: Can not Construct instance of javax.servlet.http.Httpservletrequest: Abstract types either need to be Mapped…
-
1
votes0
answers1039
viewsHow to exchange messages with java Socket server and client?
I am unable to exchange server messages to the java Socket client. The server is ready, but the client cannot do according to the server. Which class sends message to the server? Below are the…
-
1
votes1
answer290
viewsCreating dynamic tabs and combos - Jsf / Primefaces
I am working on a project that has as a basic requirement that the user can create screens to display data coming from various data sources. The user creates what we call Dashboard and includes…
-
1
votes1
answer95
viewsJfxtextfield is not a Valid type. Error launching application in Javafx
I’m using a Javafx lib for styling, and one of the stylizations I’m using is Jfxtextfield, however, when compiling the application, I come across this error: Jfxtextfield is not a Valid type What is…
-
1
votes3
answers159
viewsApplying Interface in Controllers
I have some controllers who call upon their respective models and would like to apply interface on them. I have created an interface with some methods that it would be important for everyone to…
-
1
votes1
answer523
viewsString reading error - picking n from buffer
I’m using a variable of the type String to get the answer whether or not to enter a new account. When I start the program, in do while I ask for the name of the holder. The program does not display…
javaasked 8 years, 8 months ago André Nascimento 1,258 -
1
votes0
answers97
viewsError passing request attribute to angular directive
I have to pass an array of objects to an angular directive, but I have the error below. How do I resolve ? angular.js:12330 Error: [$parse:ueoe] Unexpected end of expression: [{…
java angularjs spring angularjs-directives attributesasked 8 years, 8 months ago Mayllon Baumer 586 -
1
votes0
answers35
viewsPopular Tableview with dice coming from apache derby
I’m trying to popular tableview with data from apache derby but I’m not getting it. Follow the code: Telaagenda class: package view; import java.awt.ScrollPane; import java.util.Observable; import…
-
1
votes0
answers22
viewscontinue running when der Duplicate key, how to proceed?
I’ve got nine tests on every procedure, but at some point the guy saved one of those null tests, but it’s possible he could save null, because it might be that these tests aren’t applicable to that…
-
1
votes0
answers75
viewsAdapt code to google maps json url
I followed the code that was in the first comment Link to the comment worked well but when I tried instead of passing the json from wikipedia pass the json from google maps no longer appear results…
-
1
votes1
answer310
viewsJava Desktop with Mysql Database
I’m trying to write an image in the Mysql database, the table is just below, the code to load the image is soon after, I’m using a button to click on a Jlabel, after that, I use another button to…
-
1
votes1
answer126
viewsHow to eliminate extra space formed in a Linearlayout when creating Imageview via code?
I’m using this code to create a Imageview and add it to a Linearlayout: public void inserindoImage(ImageView image,int rid,LinearLayout linear ) { LinearLayout.LayoutParams params = new…
-
1
votes1
answer413
viewsCielo Checkout - Certificate error
I am deploying your java checkout solution on my local machine for testing purposes. The code I am using is available in the developer at Cielo. Follows the code: public String envia() { String…
-
1
votes2
answers1458
viewsHow to hide the keyboard when the user presses a button?
I would like my application to force the closure of the mobile keyboard whenever the user presses a button (which is above and next to Edit).
-
1
votes0
answers83
viewsError of Inflateexception
I’m getting an error of InflateException, but I don’t know how to solve. Error: Caused by: android.view.Inflateexception: Binary XML file line #1: Binary XML file line #1: Error inflating class…
-
1
votes0
answers40
viewsPopular Calendarview with Firebase data via a Datasnapchot
Hello, I’m having difficulty in popular a Calendarview with a Firebase data... is as follows: I have a "Cadastroactivity" where I register events in Firebase with specific days, but now I would like…
-
1
votes1
answer334
viewsRequest by browser works, but Java gives error 301
When I make an HTTP request to that URL, It works and I get a CSV file. However, when calling the same URL via Java (by get or post), I’m getting code 301. Could someone help me? Here’s my code:…
-
1
votes1
answer11590
viewsWhat is Java & quot?
I wonder what it means " java. Example: used to form the name of an object: ClasseObjeto celula+""+col+"_"+lin = new ClasseObjeto();…
-
1
votes1
answer103
viewsMethod override of an interface
I’m having a question about the method override of an interface. I can override a method in a daughter class that inherits from the mother class the implementation of an interface and in that method…
-
1
votes1
answer1335
viewsjava.lang.Nullpointerexception: Attempt to invoke virtual method
My program gave this problem when I tried to create a stack (database), to store strings on my Android app package com.project.meuapp2; import android.content.Intent; import…
-
1
votes2
answers362
viewsI cannot assign value to an Object Arraylist
It’s the following guys, in my project I have three different classes, one is a model (Client), one is the main, which has a Client arraylist, and another is a window. My intention is to register…
javaasked 8 years, 8 months ago Daniel Santos 555 -
1
votes1
answer69
viewsHibernate - Dynamic Instantiation using Factory
I know that using the Dynamic Instantiation of Hibernate I can instantiate an object according to a constructor. The Problem: I need to optimize the system as much as possible, and with that ended…
-
1
votes1
answer924
views -
1
votes1
answer149
viewsData access object - DAO
I’m learning project patterns and applying in a CRUD , within the DAO I can only leave these SQL related code? public class UsuarioDAO { private Connection con = ConexaoFactory.getConnection();…
-
1
votes2
answers181
viewsPackage usage difference in Delphi/Lazarus and Java
I would like to know the difference of use of packages in projects Java for use of packages in projects Delphi/Lazarus? In the Java so I know it’s about separating the classes into folders that the…
-
1
votes0
answers496
viewsjavax.faces.el.Evaluationexception: java.lang.Nullpointerexception
You guys are my last salvation. I get this mistake javax.faces.el.EvaluationException: java.lang.NullPointerException when I try to register a client. My experience with development is low, I am…
-
1
votes1
answer25
viewsError 404 when deploying using Beanstalk
When deploying the application, it is online, but when clicking on the link environmente.mf6j6us2wp.sa-east-1.elasticbeanstalk.com which was generated by Beanstalk, from error 404. But if you put at…
javaasked 7 years, 1 month ago Jonas Cardoso Dos Santos 11 -
1
votes0
answers138
viewsItext with Firebase on Android
Hello, everybody, all right? I have a question here that I would like you to help Sandra. You can generate a PDF report with itext that contains Firebase data. Type, register several clients during…
-
1
votes1
answer74
viewsRecord method has no action and link of Dependent x Driver is not done
When developing a simple application where the dependent is linked to his responsible one who is a driver, when I click to create the link and record dependent nothing happens, only the following…
-
1
votes1
answer610
viewsInterfaces can be instantiated?
Hello. I know interfaces can’t be instantiated, but I came across a code that doesn’t make much sense to me. EditText nameField = (EditText) findViewById(R.id.name_field); String name =…
-
1
votes0
answers72
viewsHow do you turn a character into a mathematical symbol?
I have a question, can I convert a char or string variable into a mathematical operator? Is it possible? The language I use is Java. For example: int n1 = 1, n2 = 1; char simb = '+'; int resultado =…
-
1
votes0
answers32
viewsError in sending Mdfe
The company where I work has a Java project made in Eclipse to send Nfse and Mdfe. There is an error when I try to send a Mdfe. The error log is in the Pastebin link. https://pastebin.com/jNimHEmS…
-
1
votes1
answer153
viewsJava - Import Excel with combo and checkbox
I need to import an excel spreadsheet using java. Only the spreadsheet has selection values like checkbox lists and combos. As in the example below: Someone has an example of java code that can…
-
1
votes3
answers514
viewsError persisting data in JPA
I am following algaworks exercises of the java-ee-7-com-jfs-primefaces-e-cdi-2a-edition module. When registering release I have the following error: WARNING: #{cadastroLancamentoBean.salvar}:…
-
1
votes0
answers558
viewsHow to query involving more than one table (JPA) using JPQL
Hello, I have a query using SQL, now I am changing the project using JPA and I would like to change the queries in a coherent way with JPA. public void gerarConsulta() {…
-
1
votes1
answer319
viewsProblem with JSF during form validation
I have a problem with the animal registration form: Follow the part of the diagram involved in the relationship regarding the form: The problem is that when I am registering an animal, I can put the…
-
1
votes1
answer819
viewsHow to make a basic configuration in the persistence.xml file to access a database in SQL Server 2008?
I searched about how to set up the file persistence.xml in a basic way, however, I was even more confused about this configuration. So I would like to know how I can make a basic configuration in…
-
1
votes0
answers75
viewsHow do I get the data from the person who just logged in to my system?
the previous question I wanted to know the validation and I already realized it , now I want to know how I took the data of the person who logged in and play to another screen and separate each data…
-
1
votes1
answer112
viewsHow to save a private key locally in security?
I am developing an application for Android/iOS mobile devices, in this application the communication with the server is done in encrypted form. The user application, when first started, generates a…
-
1
votes1
answer441
viewsPick selected value from Jcombobox populated with Enum
I have at my window one JComboBox with items from an Enum, and a JLabel to show the value of the selected item in the combo. So far so good, I’m able to do this, only I’m a little unsure if I’m…
-
1
votes1
answer1267
viewsHow to deploy a web application manually in wildfly9?
I have already implanted a web application manually in Omcat, I know it is not a complete container,but now I would like to manually deploy in wildfly9 . I would like to manually implode the web…
-
1
votes1
answer9434
viewsEclipse Message: The Selection cannot be launched, and there are no recent launches
I set up a program in JAVA and when I went to run this message, did anyone know why? If anyone knows and can explain I am very grateful :) Well, that’s my code if it’s easier to understand why…
-
1
votes0
answers130
viewsError android studio "Onfragmentinteractionlistener"
I’m trying to use a Fragment in Navigation Drawer, but is giving error "The application stopped working" menu: package portal_aluno.com.portal; import android.os.Bundle; import…
-
1
votes1
answer547
viewsLine break in Jbutton
I am developing a complete and beautiful periodic table for the course. But when it comes to implementing jbutton it lets me put only one text, no space, line breaks and other sentences in other…
-
1
votes1
answer128
viewsString Conversion to Double returning null
I have an android application that I need to capture the entries and store in my Order object, but I need to convert the entries(Strings) into Double numbers, but from the following error:…
-
1
votes1
answer212
viewsWhat would be equivalent to these two persistence.xml properties in Hibernate?
I have these two properties in eclipselink : <property name="eclipselink.logging.level.sql" value="FINE"/> <property name="eclipselink.logging.parameters" value="true"/> but I’d like to…
-
1
votes1
answer40
viewsProblems with Ws
Personal I am when runs the page to generate the json it only tras null , already I checked it is taking the data of the database the stranger and q is giving this message : Information: Scanning…
-
1
votes0
answers293
viewsAttempt to invoke virtual method 'java.lang.String java.lang.String.toString()' on a null Object Reference
I am developing an application that aims to consult prices and deadlines of orders consuming the Post Office service. However, I’m having trouble implementing the service in the application.When I…