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
votes1
answer385
viewsJSF accessing serial port
I am working on a JSF system and need to send data to the serial port of the client (printer). The only way is even using Applets?
-
1
votes1
answer777
viewsRedeem selected input values in the Datatable of the first faces
I tried to use ajax and the option f:attribute, but I cannot redeem the required values, that is, the selected line and the value of the input. I’d like some help. Thank you.…
-
1
votes2
answers1203
viewsCharacters Invisible
Setting up a web example, when I received a string for the projection in html from the application, I noticed an inconsistency. I would like help with this. In one of the moments of creating the…
javaasked 10 years, 3 months ago Gustavo Cinque 594 -
1
votes1
answer803
viewsJunit with spring Autowired
I have a big problem that in my Genericservice I use an @Autowired on an Httpservletrequest (Even not knowing the utility, because, I do not know the architecture so well), and needed to use unit…
-
1
votes2
answers464
viewsError class expected!
With this code I get the error: error: class expected import javax.swing.JOptionPane; public class MenorIdade { public static void main(String[] args) { String[] nomes = new String[5]; int [] idades…
-
1
votes2
answers2456
viewsHow to call a sound when clicking the android button
Hello, would you like to know how to call a more efficient sound? 'Cause I’m using this method : Button button1; MediaPlyer mp; button1 = (Button)findViewById(R.id.button1);…
-
1
votes0
answers154
viewsHibernate + Ireports
I’m trying to connect a Spring MVC project to Hibernate using JSP. But a problem arises when I try to create a connection to import data to a report using Jasperreports + Ireport technology. When I…
-
1
votes1
answer295
viewsReorder position in a sequence via Mysql
I have a table of Chamados. I have to add a whole column that will be called sequencia and will be used to search in the order the user wants. Just to illustrate: the call will have some arrows,…
-
1
votes0
answers225
viewsJasper report does not update data
Good night, you guys, I’m having a bit of a frustrating problem. I have an employee report in the system that works fine. Brings the data all correctly. However, when I register a new employee and I…
-
1
votes1
answer182
viewsApplication error in Heroku
I made an application using Intellij using database and everything is working fine, but as soon as I gave the push to Heroku I got a message: Application Error. An error occurred in the application…
-
1
votes1
answer989
viewsCount with Hibernate Criteria
I have two tables, Products and Itensvenda In the itensvenda table I have a FK of products. I want to make the following query using Hibernate criteria. select count(itensvenda.prdcodigo),…
-
1
votes1
answer1184
viewsError in XSD validation
My XSD after some modifications by another team started giving error: Parse Error at line 33 column 14: s4s-elt-invalid-content.1: The content of '#AnonType_TxnHdrTransaction' is invalid. Element…
-
1
votes0
answers191
viewsError 404 Servlet
I have an error that is the following whenever I access the URL that my Servlet had to answer it presents me error 404, I am trying to access the Servlet by this url: localhost:8080/project/oa Here…
-
1
votes1
answer1809
viewsHow to turn an image into a qr code with Zxing?
I’m developing an android app capable of generating and reading qr codes, the application already encodes and decodes strings, but now I need to do this with images. I’ve tried some paths like…
-
1
votes2
answers551
viewsI’m in trouble when I invoke a method - JAVA
I’m working on an online movie rental code, simple code to deliver to my science school teacher and I’m having the following mistake: When I register a film and I will list the film appears the…
javaasked 9 years, 9 months ago Igor Alisson 107 -
1
votes3
answers12679
viewsHow to change the color of the boot via code on android?
How to change the color of the button via the code, because when touching the button I want it to change the color, the color is inside the drawable.
-
1
votes1
answer199
viewsDynamically change the margin of a Checkbox
This attribute can be changed dynamically in java code? android:layout_marginTop I have a CheckBox dynamically generated, and I need him to have a margin. Java code: CheckBox cb = new…
-
1
votes1
answer465
viewsHow to reduce a decimal number in java?
For example, for example... Calculating 8/6 I will have a periodic tithe equal to 1.333333... But I just want to show the user only 2 digits after the comma, that is, 1.33. How can I do this?
-
1
votes1
answer42
viewsList of everything that implements such a class
Well I wanted to know why I can’t create a list of classes that implement another class, for example public List<Class<? implements Classe>> classes; this returns a syntax error... But I…
-
1
votes0
answers364
views(Hibernate2) How to use createSQLQuery to return uncharted values
Good afternoon, Using HQL, I’m having trouble catching the name of customer price list. Therefore, I decided to try using Native SQL via Hibernate. However, I am not able to do it in Hibernate 2...…
-
1
votes0
answers303
viewsJSF + Primefaces 5 - Same Status as Page P/ Multiple Users
I’m having a really hard time with the PrimeFaces 5 + JSF. I have two applications in the company where I work and the same ones running on intranet, but when someone executes something, queries or…
-
1
votes2
answers336
viewsAndroid: Problem searching last id inserted with Sqlitedatabase (ORM Lite)
I am having a problem executing a query (with Ormlite) that adds the return to 'ultimaConfiguration' in which you should get the last 'id' inserted in the Configuration table. the method that…
-
1
votes1
answer740
viewsHow to temporarily store data with good practices?
I have only one page where are all the scripts, when a user clicked on certain data, would redirect it to a specific script and needed to save this data (which he clicked) to put in a case he wanted…
-
1
votes1
answer618
viewsCalculate rest with 2 Biginteger numbers
How to calculate the rest with "%" from two Biginteger numbers?
-
1
votes1
answer668
viewsjava.lang.Outofmemoryerror: Java heap space
I need help trying to clear up these 2 mistakes: Exception in thread "Thread-4" java.lang.OutOfMemoryError: Java heap space at…
-
1
votes1
answer1107
viewsJDBC+mysql remote error while connecting
Introducing I am developing a program in java that can change the connection of the database, I have 1 local database (127.0.0.1:3306) and a remote database (192.168.25.75:3306) that would be a…
-
1
votes0
answers530
viewsWhile loop inside the Ireport
I wonder if there is any way to insert loop inside the ireport ? I have an FPDF report and within it there are two while loop and I would like to redo this report using ireport .
-
1
votes1
answer239
viewsHow do I open a Service from a Broadcastreceiver?
I’m creating an app that intercepts a text message via BroadcastReceiver, more from that I want to receive this text via broadcast open a service. probably this is done via Intent more I can’t do.…
-
1
votes2
answers167
viewsUse of the database connection class
It seems to be a silly question but come on, I have some tables in my database and I need to query them, but they are not @Entity, I did not create the sources, the only way to do the queries would…
-
1
votes0
answers175
viewsHelp to Generate this report in ireport
I have following report in FPDF, I need a help to generate it in ireport format <?php session_start(); // Classe suporte para geração de relatório - Relação de Escolas class PDF extends ImaPdf {…
-
1
votes0
answers127
viewsHow to use JSF and Spring Boot Starter JDBC in the same project?
I saw a video about the Spring Boot Starter JDBC and would like to use it in a web application with JSF. Does anyone know if it is possible and how to proceed to make the configuration?…
-
1
votes1
answer450
viewsCall Java class (.JAR) using C++ (.EXE)?
I have a Java application (SYSTEM.JAR) with the system input class ... Ok? To make it more transparent to the end user, I would like to create a compiled . EXE in C++ that just calls the Java class.…
-
1
votes0
answers353
viewsTomcat + jsf + Hibernate application = Slow to boot
My application is very slow to boot. Follow the eclipse log where it takes longer: INFO: HHH000397: Using Astquerytranslatorfactory
-
1
votes1
answer4138
viewsConsume REST service using Spring Framework
I am developing a web application, using Spring Framework. And I need to consume a service from another application. I know how to send requisitions POST, through using jquery and ajax, but I want…
-
1
votes1
answer56
viewsClick the button without using GUI
I am developing a java system and would like to do it in a more organized way, so without using the netbeans tool to click and drag, but I’m having a hard time clicking the exit button. How to do ?…
-
1
votes1
answer756
viewsRelationship between entities
I am unable to make the deletion of the selected object. I have two classes, Autor and Livro, Basic example of working, to learn the use of Java Server Faces, so far everything well, functioning and…
-
1
votes2
answers89
viewsHow to erase a word at once?
I am using this method to delete the last character typed in a Textview: texto = txtTexto.getText().toString(); int length = texto.length(); txtTexto.setText(texto.substring(0, length - 1)); When a…
-
1
votes1
answer144
viewsPaypal IPN for recurring cancellation payment
I got the following code from Paypal’s git hub. I am making recurring payments and would like to receive notification in the system when there is cancellation. Thus, I could block the provision of…
-
1
votes1
answer92
viewsComparable with Arrays.Sort
I’m having difficulties using the interface Comparable. In class TrabalhoGA I must call the method ordenaPorPontos class temporada2013 comparing the points of Pilotos of this class, I need to use…
-
1
votes0
answers150
viewsAuthentication and authorization in Websockets
Good afternoon, I was tasked with building a Java application that communicates with a mobile application developed with hybrid technologies (HTML5, CSS3 and Javascript), when researching in the…
-
1
votes2
answers146
viewsHow to decrease the response time of an unsuccessful connection when using Ksoap2?
When the server or service (IIS) is off, The web-service response time that there is some connection failure is very long. At this time the application (Android) requests closure due to inactivity.…
-
1
votes1
answer945
viewsHow to call information in an html from a page . jsp
I am developing a good HTML5 Hybrid mobile app and my backend will be done with Java and Mysql. I’m using Phonegap and the same to generate the APP needs my files to be extension .html .css .js, to…
-
1
votes1
answer670
viewsToggle action from a button
I’ve been searching the internet and I haven’t found anything that can explain me how I do to switch the action of a button in Java... Example: I have a button that when I press it I want it to…
-
1
votes2
answers1198
views404 error of a Spring MVC application
I am following the Caelum booklet. I made the application "hello world" with Spring MVC, which has both the configuration and the respective Controller. However, when I access the URL…
-
1
votes1
answer568
viewsIs there any software that analyzes the complexity of an algorithm?
is there any software that does the complexity analysis of an algorithm? if yes, I would like to know which
-
1
votes1
answer827
viewsWhen converting an object to JSON, because it appears several characters " "
To perform the Bean to JSON conversion, vice and versa, I am using the library org.json for JAVA. But although an object is converted normally, others end up being loaded with characters \, when…
-
1
votes1
answer121
viewsUsing Napkin Lookandfeel
I’m using the Eclipse IDE and I have this code: package br.com.caelum.argentum.ui; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.KeyEvent; import…
-
1
votes1
answer76
viewsOpen disk player with Java, and without specifying the drive
Wanted if possible a simple and quick way to open the disk drive without specifying the drive letter. There are several ways because I have seen.
javaasked 9 years, 8 months ago kholyphoenix1 175 -
1
votes1
answer88
viewsResource icons Jframe
Good afternoon. I’m having trouble with my app. It executes with changing the icon on JFrame. When compiling it for: "Runnable Jar file" and compiling with: Launch4j for Inary, the application…
-
1
votes1
answer335
viewsLayout customization of Joptionpane
I have the following structure of my Joptionpane, with horizontal typing fields: How to vertical the input fields? Here below is the class code: import javax.swing.*; public class…