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
answers136
viewsSpring: java.io.Notserializableexception: Mapsqlparametersource
I’m trying a simple Spring Jdbctemplate based Insert mapping query parameters with Mapsqlparamatersource and I’m making an error according to the data below: public void adiciona(Conta conta) {…
-
0
votes2
answers1857
viewsFor in a Java Object Arraylist
I am studying Java and I have a problem in a code I wrote. I need to read the name and age of 3 people and say the name of the youngest and the name of the oldest. I know the best way for a large…
-
0
votes1
answer211
viewsWhy can’t I instantiate an object by clicking my button?
The operation of the button is correct, it executes all previous lines. However, when instantiating an object Email displays the error. public void send(View view) { EditText text = (EditText)…
-
0
votes0
answers171
viewsException in thread "AWT-Eventqueue-0" java.lang.Nullpointerexception
I’m trying to pass an old code to an MVC standard, but by modifying the methods and creating the new Zoom class, I’m encountering this console flaw: Exception in thread "AWT-EventQueue-0"…
-
0
votes1
answer104
viewsLaunch Exception on the onCreate of an Activity
I am working on the development and refactoring of some Activity's that has similar behaviors in our projects, so to avoid code repetitions, for common functionalities, I created some Activity's…
-
0
votes0
answers47
viewsWhy my Asynctask Freeza?
The moment I instate an object EmailTask the app hangs =( public void send(View view){ EditText text = (EditText) findViewById(R.id.editText); Switch iluminacao = (Switch)…
-
0
votes2
answers915
viewsdatatable primeFaces shows the number of correct records but does not show the fields
I have a problem I can’t solve if you can help me thank you. In short, it’s a prototype invoice registration with notafiscal items, I can enter the records through a dialog, the table shows that the…
-
0
votes1
answer51
viewsHow to store images within the application?
I’m starting now in Java and need to finish an application that by clicking on a button show an image, I even managed to do this using the method Desktop.getDesktop(). open(new File() but I needed…
-
0
votes1
answer673
viewsaccess matrix data while in another class?
I have a matrix in a class called Logica. And I’m manipulating her from another class called Game. But when I pass a value of the Game class to the matrix in the Logica class and check if the value…
javaasked 9 years, 6 months ago Leandro Macedo 1,143 -
0
votes0
answers521
viewsHow to Capture Device Microphone Sound
How to capture the device’s microphone sound. Better specifying. I only need the volume of the captured sound. The idea is to call a method to a given volume. It is possible?
-
0
votes1
answer1996
viewsError while trying to consume Webservice: Server did not recognize the header value
I am facing the following error when trying to read a Webservice: SoapFault - faultcode: 'soap:Client' faultstring: 'O servidor não reconheceu o valor do cabeçalho HTTP SOAPAction:…
-
0
votes1
answer94
viewsMy application does not change database data
I’m developing a software for a video rental company with MVC. There are two problems: not changing people’s attributes and displaying the following error: java.sql.Sqlexception: Column 'code' not…
-
0
votes1
answer101
viewsResteasy @Form annotation does not work in Glassfish 4.1
I am trying to make a legacy web java application that is packaged within an EAR and that was written for Jboss 7 to work on Glassfish 4.1. The application is not built with Maven nor with Gradle…
-
0
votes1
answer34
viewsCapture Form Expandlelistview Fields
I have a ExpandleListView with each item having its own layout. This layout has Editexts, checkbox, etc. I need to capture what is typed and selected in each item of the expandle listview. Has…
-
0
votes1
answer330
viewsError: You have an error in your SQL syntax
I am developing a software for a video rental with Pattern MVC (Model-view-controller) design and the problem of not changing people’s data is occurring. When I change the person’s data displays the…
-
0
votes1
answer125
viewsImport Android library in Java project: Noclassdeffounderror
I am trying to import an Android library into a Java desktop project. But the library doesn’t find any classes that are related to import android.os. I’m having trouble with class Handler…
-
0
votes1
answer82
viewsLike does not return data
I have a function in mysql that returns a decimal value. In this function it has a like. When I test sql in mysql the value is returned if I enter a letter or more than one. Ex: LIKE 'Home%'. As for…
-
0
votes1
answer75
viewsWhy is this code on an infinite loop?
When I run it starts to calculate infinitely the value of the bracelet.. import java.util.Scanner; public class Sistema_Bichara{ public static void main(String args[]){ Scanner in = new…
-
0
votes0
answers117
viewsProblem while saving file on Android Lolipop from second generation moto-g
Good morning, I have an app that works normally on all versions of Android from-the 2 to the first generation moto-g version, this app is very simple, I describe the details I need to add in the…
-
0
votes1
answer97
viewsManipulating android imageView
I have an image view on android, I wonder how can I exchange this image via code ? Thank you
-
0
votes1
answer896
viewsProblems loading datatable Primefaces
I am using in the Java Web CDI, JPA and Maven application, my application is already entering records in the database without any problem, now what I have left is list the records in the Primefaces…
-
0
votes2
answers346
viewsDynamic form statement in JAVA
I am doing a work on graphs and need to read in the file the input of data from a file, example : VERTICES 0 1 2 3 4 EDGES 0 1 2 3 After reading the file need to instantiate these vertices and…
-
0
votes1
answer1221
viewsJavafx in the Eclipse
Does anyone know how to install Javafx in the eclipse? I tried to find it on the internet but found nothing useful. If anyone can help, thank you. Eclipse Version: Luna Service Release 2 (4.4.2)…
-
0
votes1
answer32
viewsHow to close Drawer after changing orientation?
How do I get my Drawer to close after a change of orientation? Example: At first I opened the Drawer, right after I turned my smartphone horizontally, now I want this Drawer that April previously…
-
0
votes1
answer633
viewsMaturity of dates
I have this code that validates the dates of a card and puts in the table: @SuppressWarnings("nls") public static ObservableList<String> getPagaVenci1(TableView<PersonC> jtc, String sq4,…
-
0
votes1
answer867
viewsHow to integrate Java code with Javascript?
//retorna o usuário logado no sistema public class ContextObject { public static Usuario getUsuario() { ContextObject contextObject = ContextFactory.getContextObject(); return contextObject.usuario;…
-
0
votes1
answer162
viewsOpen/Close Disk Player (Vbs)
I am using a code to "open/close the disk drawer" however it creates a file on the desktop and would like to arrange some other way to resolve this. package controller; import java.awt.Desktop;…
javaasked 9 years, 6 months ago kholyphoenix1 175 -
0
votes1
answer185
viewsOrder By Hibernate in JSF
Hello, good afternoon, I am a beginner in this web world and I need to order establishments by punctuation (the best punctuated at the beginning, LOGICAL) The mistake is An Error Occurred:…
-
0
votes0
answers47
viewsAndroid does not recognize parse.parse.initialize
I’m on my first project with Android consuming the parse API. I followed the tutorial to the letter and always get the same error: could not find method com.parse.Parse.initialize I use ADT with…
-
0
votes2
answers96
viewsServer instance restuful in Tomcat
Staff developed an app - https://play.google.com/store/apps/details?id=br.com.apprioconcurso I am using a server restfull connection to the postgree bank in Hibernate. This server is hosted in…
-
0
votes0
answers350
viewsAngularjs and JSTL Master-Detail
Good afternoon, you guys. Next, I’m using Angularjs to add the details of a sale, but on the server side I’m using Spring MVC with JSTL foreach the details to add on the server. HTML that rescues…
-
0
votes1
answer221
viewsMinecraft make the player connect to the game
Hello I have been trying to get the client to connect to the server with sockets this site has an explanation http://wiki.vg/How_to_Write_a_Client#Login but I can’t find a way to login already tried…
-
0
votes1
answer227
viewsEventually java.lang.Arrayindexoutofboundsexception occurs
I made a simple algorithm of a book and there are two possible results. To test these results I have to run the program several times until Math.Random() generates the possible numbers and displays…
-
0
votes1
answer57
viewsHow to send input from a java app to a php file
How to send input from an android app written in java to a php file on the server? The file must store what the java code sent in a variable. How can I do this?
-
0
votes2
answers568
viewsGson: serialization of dates in various formats
I am using Gson and need to serialize a class with different date formats: @TimeStampField(onlyDate = false) private Timestamp datahora @TimeStampField(onlyDate = true) private Timestamp diaLimite I…
-
0
votes1
answer179
viewsKSOAP ILLEGAL PROPERTY
I made the webservice using Android and KSOAP, now I need to consume the webservice... The specified method needs to recover all users from the database (idusuario,username) Guys, I’m making the…
-
0
votes2
answers138
viewsHow long does an x++ increment take?
How long on average an i++ increment takes to be done. In view of the answers and comments placed here: I asked this question because I have a method to send emails when a certain condition is…
-
0
votes1
answer420
viewsMinimize jfx window
My window is without the edges of the system. primaryStage.initStyle(StageStyle.UNDECORATED); I created a button to minimize the window but I find Exception by assigning to my stage: @FXML void…
-
0
votes1
answer731
viewsCapture the change event in a p:selectOneenum type
I cannot capture the change event of the p:selectOneMenu component, whose upload source is an Enum. I registered in my view the Ajax change event, however the Listener method is not called. My view…
-
0
votes1
answer74
viewsStart a new Fragment when searching
I need to know how when people give enter in the search bar, the application pass what was typed to another Fragment and start it. Currently I arrived at the following code, but it is not working.…
-
0
votes1
answer1098
viewsProgramming Resta-Um using Monte Carlo Method
I have little experience in Java and I’m trying to apply the Monte Carlo Method in Combinatorial Game Theory. I’m trying to demonstrate the Leftover Game Method where it needs to be solved using…
-
0
votes1
answer1665
viewsPrint Arraylist, Java Swing
I am starting my studies in Java applications with Swing, and I have doubts about how to print my Arraylist. How best to print or list an Arraylist within a window? In my case we have an agenda, we…
-
0
votes0
answers1131
viewsTake input from an Arraylist to generate report in ireport
How can I get the Dice from the list to go to the ireport? I already tried to give a "get" but error. This is my method that generates the report: public void gerarRelatorio(ArrayList list) { for…
-
0
votes0
answers44
viewsIndependent datetime
I am developing an application for password generation "time on based TOTP", but I’m having difficulty when the mobile time zone is disabled or the user modifies the date/ time. I’ve thought about…
-
0
votes0
answers174
viewsApplication does not access database when hosted
I have a trial hosting, but I can’t access the database. persists.xlm: <?xml version="1.0" encoding="UTF-8"?> <persistence version="2.1" xmlns="http://xmlns.jcp.org/xml/ns/persistence"…
-
0
votes1
answer1060
viewsJoin several Arraylist in one collection
It is possible to join 3 Arraylist in a collection and then send as datasource for a report. Or have another way to do this? I have 3 Arraylist of 3 objects, I wanted the information of these lists…
-
0
votes1
answer62
viewsCan you block external access in an application?
Is it possible to block a system that is accessing from the outside? I have a system with login and users are using Curl PHP to load the whole page in their environment. I’m using Java + Jboss.…
-
0
votes2
answers934
viewsInsert selected SPINNER item into SQLITE
How to identify the selected item in the SPINNER and insert it into the SQLITE database. I can do the Insert in Sqlite using the data provided in Edittext, however I am not able to create a way to…
-
0
votes2
answers1445
viewsCalling JQUERY function with Primefaces
I want to run a Jquery call after the click of a button: <p:commandButton id="btnSelecionaLote" icon="ui-icon-pencil" action="#{loteController.selecionarLote()}">…
-
0
votes0
answers459
viewsProblem with java.util.Nosuchelementexception
Error: java.util.Nosuchelementexception: No Child 'Runtime-name' exists I would like some advice on this message that is emerging in my application... the error is above.…