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
answers2238
viewsHow to read Boletus Shipping Files that are sent to Banks?
I would like to know an effective and structured way to read the Boletos Remittance Archives that are sent to the Banks. I’ve found some libraries that generate these files, but none that read these…
-
1
votes1
answer61
viewsfireTableDataChanged in Abstracttreetablemodel Swingx package
I’m having doubts about how to make a Reload on the objects of a JXTreeTable using a Model > AbstractTreeTableModel. The AbstractTableModel of a JTable normal has the fireTableDataChanged, but…
-
1
votes1
answer1007
viewsJava Barcode Code
How to do a barcode validation in Java ? A Java application that simulates a barcode reader. The program prompts the user to enter the 13 digits of the code of a given product and then returns the…
javaasked 9 years, 2 months ago Richard Franklin 43 -
1
votes1
answer183
viewsImplement screens in list
I’m working on my first project with ListFragment searching the internet in tutorials and even in the online course I’m doing. When the onListItemClick he sends a Toast to screen, but I want you to…
-
1
votes1
answer156
viewsNull Pointer in Part filetype when upload
I have a purpose using the javax.servlet.http.Part. It is coming null when I upload. XHTML of the test <?xml version="1.0" encoding="UTF-8"?> <html xmlns="http://www.w3.org/1999/xhtml"…
-
1
votes1
answer477
viewsPause program with Timer
I need to use it to wait 2 minutes before executing a method. I have researched and can’t find anything clear enough to help me. I’ve used the Thread.sleep() the more he locks the thread all of it,…
-
1
votes1
answer57
viewsValidation of java fields
People as I do a check in java SE for some data, to return a message and ask again this information if it is incorrect, in an elegant way following the good practices of object orientation?
-
1
votes0
answers66
viewsXML Manipulation with JDOM Java
Guys, does anyone know why when I write an xml I simply have to use the path of the directory, and to perform the reading I have to put file: before? "F:/Programming…
-
1
votes2
answers335
viewsInheritance and manipulation of a superclass’s methods
Inheritance is said to inherit all the methods of a super class. But in doing class Soma{ private double total; public void setSoma(double s1, double s2) { total = s1+s2; } public double getSoma() {…
-
1
votes1
answer934
viewsWhat is the Dispatcherservlet function in Spring?
What is the purpose of it? it is recommended to use spring-boot to make all spring xml settings automatically?
-
1
votes2
answers72
viewsConvert string in array format into an array and retrieve values
In the database I have a TEXT where an array is saved in this format: [ [ resumo: null ] [ datainicio: 2015-09-17T00:00:00.000-0300 ] [ datafim: 2015-09-22T00:00:00.000-0300 ] [ equipamento: 3421 ]…
-
1
votes1
answer480
viewsUbuntu linux deployment environment creation
I’m testing a Digital Ocean machine, it comes with Ubuntu linux (I chose), I need to create the following environment Firewall Java Tomcat7 Jenkins git MySQL MySqlAdmin Groovy Gradle Well, as you…
-
1
votes0
answers1297
viewsPhoto saved but not shown in the gallery
Good evening, I’m with a design of a camera that adds in the name of the photo what the user writes in the text fields. The app works only that the photo does not go to the gallery. Only appears in…
-
1
votes1
answer633
viewsTray Icon Windows
I am creating an application to perform backup, and think about putting the application to run full time in which the machine is running. I plan to put the application in Try Icon Windows but after…
-
1
votes0
answers60
viewsRecognize when my Android gives replay to a bluetooth ping
I need to know what it takes for my Android program to detect when mine bluetooth is responding to a ping command on bluetooth. They’re kind of shooting ping with l2ping against my mobile, on my…
-
1
votes1
answer1145
views"Google account: blocked login attempt" - Android app
Take a look at my code first Loginactivity class package com.softblue.sendemail; import java.util.Properties; import javax.mail.Authenticator; import javax.mail.Message; import…
-
1
votes2
answers288
viewsHow to block external requests in Jboss?
How to block an external application from accessing my web application? Are there any way to block this?
-
1
votes4
answers197
viewsCalling Gridview event in Activity
I have a Gridview Adapter and in it I possess a ImageButton to delete items. It is deleting correctly, however, every time an item is deleted I need to set the current quantity in one TextView that…
-
1
votes1
answer850
viewsUsing another class method
I need to execute a method that is in another class. I think the two are non-activityes classes. The following class has a method called connect(). When this method is executed, at the end of it I…
-
1
votes0
answers1019
viewsHow to generate an XML template from an XSD SCHEMA using JAXB?
I have a Schema . XSD and would like to generate an XML from this template. Below I have this code, however I am using the Jlibs library. I wonder if it is possible to do something similar to the…
-
1
votes0
answers27
viewsUpdate on Playframework not working
I am testing the play-framework 2.4.3 and I coded below to update the template I receive via json, but only the update is not working. I have the query log enabled but only a select appears for this…
-
1
votes1
answer1345
viewsPrimeface uploadFile + graphicImage: Upload image and display without refresh
I’m starting to program on jsf + primefaces. A long time ago I worked with JSP(java 1.4) and I’m kind of lost. I’m looking to upload an image and have it displayed below. xhtml images. <?xml…
-
1
votes2
answers543
viewsZoom button and Street View do not appear in Modal Boostrap
I’m loading Google Maps v3 into a Boostrap Framework modal. The problem is that I can’t see the zoom icons/button and Street View, they appear distorted in the blue square of the image. The right…
-
1
votes2
answers598
viewsWhy am I not getting into the if Else of this code
import java.util.ArrayList; import java.util.Iterator; import java.util.Scanner; public class ControladorVeiculo { public static void main(String[] args) { ArrayList <Veiculo> veiculos = new…
-
1
votes1
answer4739
viewsorphanRemoval JPA
How orphanRemoval works? Why when I put it on a list does not work ex: @OneToMany(mappedBy = "simulationMedia", cascade = CascadeType.ALL, orphanRemoval = true) @JsonIgnore private…
-
1
votes2
answers402
viewsRedirect JSF error
I am trying to pass two parameters to another example page: <p:commandButton icon="ui-icon-pencil" action="form?faces-redirect=true&id=cargo.id"></p:commandButton> But this error…
-
1
votes1
answer111
viewsWhich version of the primefaces Extensions is compatible with the primefaces 3.5?
I use primefaces 3.5 in my project and I intend to use Primefaces Extension. I would like to know what the newest version of Primefaces Extension is is compatible with version 3.5 of Primefaces.…
-
1
votes0
answers69
viewsHow does mock work in integration testing?
How to use mock in my integration tests?
-
1
votes2
answers318
viewsDAO + Webservice
I want to use the DAO standard to create a Java project in Eclipse to view data from a database. Only I want to turn it into a Webservice.. How should I proceed? Just use that IDE Webservice…
-
1
votes1
answer499
viewsRedirect JSF page
I have a Sessionscoped bean that I use to navigate data from page 1 to page 2. Page 1 is accessed through the menu, while page 2 is accessed by a button inside page 1, where some data based on…
-
1
votes1
answer1083
viewsInserting Image in Database with Java Web
I’m having trouble inserting an image into a database. I already have a saving method and I’m including a photo field, but I’m not sure how to implement to upload the image. Whoever can help me,…
-
1
votes0
answers86
viewsBuilt-in Activity/Fragment camera as Instagram
I have an app where sometimes the user needs to take a picture of a receipt during a confirmation process and would like to have the camera inlaid on the same screen at this time (rather than…
-
1
votes1
answer705
viewsIreport - Sub report with same main datasource
I’m developing a relatório and it has a subrelatorio that must have the same DATA SOURCE of relatório main, for this the dataSourceExpression of subreport was as follows:…
-
1
votes1
answer845
viewsReduce the size of a Bitmap
How do I reduce the size of a Bitmap.For example, take a photo of 600kB and reduce to 50KB. Obs:In the java.
-
1
votes1
answer88
viewsIncremental key
Guys, I’m doing a web service with Java + Postgres. I set my table in Postgres as follows: CREATE TABLE usuario ( id serial NOT NULL, nome character varying(40), idade integer, CONSTRAINT…
-
1
votes0
answers483
viewsJSF: Error messages inside the catch block does not appear on the screen
I have a JSF application and created a Basebean class to generate the messages that appear on the screen when an event occurs. Well, in Managedbean when I call the Basebean class to send a message…
-
1
votes3
answers3382
views -
1
votes1
answer63
viewsWould it be possible to convert a form to pdf?
Would it be possible to convert a form to pdf or print it ? made in java, and are in a database as well.
javaasked 9 years, 1 month ago Prostetnic Vogon Jeltz 408 -
1
votes1
answer3550
viewsHow to run a java program daily at a given time automatically
Hello, I need to run a program in java daily at a certain time, I found some things about timer.Schedule, but I would like to see some examples, thanks!
-
1
votes1
answer343
viewsHow to clear Jtable’s cell when starting typing?
How can I clear the cell in Jtable by starting to type in an equal cell in excel. For example, I place the cursor in a cell and when starting to type the cell enters editing mode, at this precise…
-
1
votes1
answer267
viewsMaven calling Ant
I have a Maven project, I want Maven to "call" some target of ant, I’ve seen that there is a plugin "Maven-antrun-plugin" there on the apache site, but I can’t understand any example, someone could…
-
1
votes1
answer137
viewsOne controller method works correctly and another similar returns error
I have two Controller files and two JSP files with the same structure. In JSP I have the following structure for AJAX: $.ajax({ method: "POST", url: '/modulo1/funcao1', data: { 'atributo1':…
-
1
votes1
answer47
viewsMy Labels are abbreviated when running program
When I run my program the text that is inside my Abels are abbreviated, I even try the space needed, to solve I have to leave an absurdly large space inside the label, which gives a lot of work to…
-
1
votes1
answer214
viewsCannot find Symbol - variable calories
Why this mistake if I’m setting the calories on ifs? import java.util.Scanner; public class Alimentos { public static void main(String args[]){ Scanner in = new Scanner(System.in);…
-
1
votes1
answer727
viewsList in Textfield or an editable Combobox when user type - Javafx
Someone more experienced, could inform me if Javafx has any way to make a list as you type in the textfield. Example: When you type your facebook email, and you type the first letter and your email…
-
1
votes0
answers72
viewsI can’t find classpath from Jaspersoft studio
good night Does anyone know how to set up jasperstudio classpath so I can test reports based on beandatasource? In the ireport I had option but in this I can’t get.
-
1
votes2
answers578
viewsHow do I block access to an application from the user’s IP?
How do I block access to a web java application by the user’s IP. The application will be hosted outside the company environment, but need that by certain profile can be accessed from outside. I…
-
1
votes1
answer512
viewsHow to limit the number of characters in an inputNumber?
I’m using the Primefaces extension to format a input the weight and height of a person and could not. How do I limit the amount of characters typed in input? I tested with maxlength="5" but it…
-
1
votes1
answer3806
viewsHikaricp - Unable to get driver for JDBC URL
I’m trying to implement the Hikaricp to take care of the connections in a web project. Steps in a row: I created a Dynamic Web Project I added the .jars needed within WEB-INF/lib (HikariCP-2.3.5.jar…
javaasked 9 years, 8 months ago Rafael Withoeft 2,287 -
1
votes0
answers92
viewsRestful web service + common java project
I have the following problem, I have a web test service created in a separate project(I) in eclipse and another java(II)(Drools) project. How do I make the two communicate being in different…