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
answer1192
viewsBug on booting Tomcat
Good evening, everyone, I started to study the book of the code house, spring mvc, but right off the bat I made the following mistake when trying to start the cat tone, someone can help? jan 23,…
-
1
votes2
answers89
viewsMethods Running in Parallel
Hi. I think this is going to be a very simple answer, but it’s something I still have doubts about how to do. Let’s say I have a class PedidosListener responsible for reading a . csv file and…
javaasked 9 years ago Lucas Schneider 430 -
1
votes1
answer324
viewsTarget Unreachable, 'reply' returned null - Selectoneradio
I’m not getting the value of mine selectOneRadio, comes as null: <p:dataTable id="exibePerguntas" var="questao" paginator="true" rowsPerPageTemplate="2,3,5,10,12" paginatorPosition="bottom"…
-
1
votes0
answers63
viewsGooglemap move camera from map to certain location
I added the map to Fragment, it is already appearing, I even added a random marker with the map starting on it. the problem is that now I am using the Geocoder. I put the address in edittext and it…
-
1
votes1
answer165
viewsJava + Active Directory - Single Sign On
I was asked to do SSO for a web application in Java. The idea is that through computer information, the application check in the AD and according to the OR user, he has access to certain modules of…
-
1
votes0
answers187
viewsError in JSF page call + Primefaces
I have the following menu: <h:form> <p:menubar style="margin-top: -20px; margin-bottom: 20px"> <p:submenu label="Cadastros"> <p:menuitem value="Pessoa" /> <p:menuitem…
-
1
votes1
answer97
viewsError while listing Sqlite data
I am making a listing of the information contained in my Sqlite database However, sometimes or other, I get the following error: java.lang.Arrayindexoutofboundsexception: length=13; index=1401 The…
-
1
votes0
answers30
viewsUsing this rule, how do I delete all (Descriptions) from Listview
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_especialidades); Integer[] imgid={ R.drawable.ic_plus_white,…
-
1
votes1
answer423
viewsSet Attribute from JSP radiobutton
I am putting together a generic form for registration of legal and natural persons and the definition part of two RadioButton's that change the fields, after completed they are sent to a Servletand…
-
1
votes1
answer155
viewsHide column at editing time
I have a registration screen with some attributes, in which at the time of editing I do not want to load the password, because I just want to change the name and email, I mean, I want to hide the…
-
1
votes1
answer199
viewsHow do I get the listview style effect?
I have a layout and in it I want to display the data in this ListView but I need it to have a white background with no stripes and no click enabled when it’s touched. I can do it this way??…
-
1
votes1
answer216
viewsHow to validate attributes in Spring Batch
I’m working with Spring Batch. In my batch processing, my Reader needs to read a file .csv. When I read the file, I have a class that represents each line, and I would like to know how to validate…
-
1
votes0
answers157
viewsTestng Facescontext.getCurrentInstance() Return null
I’m running a test on Facescontext.getCurrentInstance() is returning null. Ambience: Spring 4.3 JSF 2.2 Scope view Escope view is customized for Spring This is scope class, it works public class…
-
1
votes1
answer180
viewsBug in Spring with Hibernate query code
I have a problem, I am studying spring mvc with Hibernate and I ended up entering a bug where it returns the following exception "java.lang.Nullpointerexception", follows the codes:…
-
1
votes0
answers148
viewsBiometrico veridis
I’m developing a biometric system to register and identify customers. I am basing myself on Veridis Biometric only that when requesting identification it is generating this error: The format is not…
javaasked 9 years ago Henrique Rafael 11 -
1
votes0
answers115
viewsWindows auto increment environment variable
Short question I need a variable environment in windows that is auto increment: setx /a PORT=1000 and every time you call %PORT%: setx /a PORT=%PORT%+ 1 the result would be: echo %PORT% 1001 echo…
-
1
votes1
answer164
viewsWhen running PUT method on Grails application system inserts new record instead of updating
When trying to run JSON below via PUT method in a Grails application the system inserts a new record. Urlmappings.groovy class UrlMappings { static mappings = {…
-
1
votes2
answers868
viewsCSS javafx Color Text
I have a Button and I am using javafx, what I need: the text of the button is written Search, I need the 'B' to be in red and the "uscar" to the default color, I have tried everything and I am not…
-
1
votes0
answers53
viewsConnect Java to Access (.accdb)
I’m trying to connect a desktop application that uses Java to a server. First I tried to use Acess, but I had problem with drivers, I tried to use Ucanaccess and more problems, anyway, I gave up, I…
-
1
votes2
answers177
views -
1
votes1
answer945
viewsHow to get an element id that has just been inserted - JAVA
How do I catch one id of an element that has just been inserted into Database in Java? Something like: mysql_insert_id() in the PHP.
-
1
votes2
answers556
viewsPersistence and reading of Firebase data
would like to have a data structure in the Firebase database Realtime similar to this: { "codigo": "01", "Data": "1234567890", "usuario": "{codigo : 01, nome : Rafael}" } have the class: class…
-
1
votes2
answers2638
viewsHow to call a method into an If and Else?
I am developing software for a video rental company with Pattern MVC (Model-view-controller) design and the problem of not calling the save() method and the change() method is occurring inside If…
-
1
votes1
answer193
viewsExport datatable to PDF
I’m using Java,JPA,Primefaces,Wildfly, I have a datatable that I need to export to PDF,in excel just add the poi.jar that works but in PDF I don’t know which poi I should add, someone could help me?…
-
1
votes1
answer1233
viewsHow to adjust screen according to Android virtual keyboard?
I would like to know how to resize the screen according to the display or not of the Android Virtual keyboard, Evernote’s home screen style, that when the keyboard appears the image decreases and…
-
1
votes1
answer483
viewsLogin with JAAS + Tomcat
I did the JAAS configuration procedures in my JSF project, when I try to access it shows the information that user and password does not check, but I have already created the user table. xml…
-
1
votes0
answers30
viewsCheck if string exists - Procyon
Well, I’m trying to make a program that reads the code of a file . class, decompile it, and check if there’s a string there. I’m using the library Procyon, but I don’t know how. This is my code to…
-
1
votes1
answer275
viewsJSF: How to Reference Managed Beans
I’m starting to study JSF and soon came to me the question of how to reference the View (JSF) with Managed Beans. Because in the examples I see I can’t understand how JSF can see the Bean. For…
-
1
votes1
answer301
viewsShow typed string string
How to show read values inside a repeat loop in Java? Ex: for(int i = 1; i <= 2; i++){ System.out.print("Nome: "); String nome = tecla.nextLine(); } ?? <- Make the read names appear here…
-
1
votes0
answers40
viewsDoubt when overwriting attribute with Apache Tiles
I am studying a little about Tiles and I have a question. I have the following definition: <definition name="main" template="/views/templates/main.jsp"> <put-attribute name="titulo"…
-
1
votes0
answers17
viewsDoubt with Decompiling VB.NET project
A class compiled in J# or Vb.net after is in a DLL, there is some program that can decompile by passing a code that is in Vb.net to C# or J# to c#?
-
1
votes1
answer82
viewsSave only if not null
How do I map with Hibernate @OneToOne and save only if the information has data in the related table? Example: public class ObservacaoPessoa { @Id @GeneratedValue(strategy = GenerationType.IDENTITY)…
-
1
votes1
answer956
viewsHow to disable spring security
Good evening, I am learning jsf, so I followed some videos of Leandro Costa on youtube, I found it very didactic and etc. At the end of the course it provides the source code, however as the project…
-
1
votes2
answers748
viewsWhen I create two tables in Android Sqlite, only one works
I’m trying to develop a test app that requires two tables (aluno and disciplina) in class DataHelper. I create two tables, but when testing, only the table Aluno works. In summary: the application…
-
1
votes1
answer65
viewsHow to rebuild the XML of a Fragment layout when it is expanded?
I have a screen with a Fragment, that without being expanded, it just shows the user and password field and the sign up button, and I wanted that when I expanded it, fields like name, date of birth,…
-
1
votes2
answers1616
viewsLocating Object in a List
I have the following objects public class Passo { private Long id; private Date dataAtend; private Time horaRealizada; private Long idProfissionalRealizador; private String Descricao; /*getter &…
-
1
votes1
answer568
viewsJava/eclipse does not recognize Path GET annotation
I am developing a Restful application, using eclipse and jersey (No use framework). But I’m having a problem with @Path annotations, @GET. When I use these annotations there is an error in the line…
-
1
votes1
answer99
viewsTutorial Demoiselle 2.5 - M1C2 - ERRO rt.jar unknow
Unknown bug for me I’m starting on the REST api. :( 11:35:51,778 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/calc].[calc.Api]] (http-localhost/127.0.0.1:8080-1)…
-
1
votes2
answers333
viewsDifficulty defining the path where a particular txt will be created
The method below generates a txt containing certain information: public static void gravarIp(String ip) { try { File arquivo = new File("ip.txt"); FileOutputStream fos = new…
javaasked 9 years ago Fábio Jânio 3,407 -
1
votes1
answer83
viewsDifficulty getting object inside a CDI Extension
I want to create an Extension in my project so that it starts to interpret an own annotation, for that I have initially a @Producer of the Quartz Scheduler object, see public class SchedulerProducer…
-
1
votes0
answers480
viewsError Reading . jar; error in Opening zip file
I have a Java desktop application that uses Jasperreport for reporting, the application runs normally on my machine, but on my client’s machine it does not. Below is the Stack Trace when the…
-
1
votes1
answer527
viewsHow to break at the end of the checkbox line
The courses are coming out without formatting, there are more courses and are not appearing on the registration screen. How to break this in XHTML? Code: <h:panelGrid columns="2"…
-
1
votes1
answer1279
viewsVarious data on an Arrayadapter
To make a list with a dice with Arrayadapter I do so: ArrayList<String> palavras = new ArrayList<>(); int a = 0; for(int i = 0;i<50;i++) { a++; palavras.add(Integer.toString(a)); }…
-
1
votes1
answer248
viewsUpdate a textview for a few seconds
I wanted to implement a transition between two Activitys, where the user, via a Progress Bar (I already implemented) and a textview where every 2 seconds, a new phrase appears to me, for example:…
-
1
votes0
answers311
viewsProblem with Widfly
I am having an error starting the library project with Widfly 10. Until the part connecting with the bank was working, agr when connecting with mysql am having problems. I’ve already set up the…
-
1
votes0
answers115
viewsI have 2 source Packages in the same netbeans project
Quick question I have a project in my netbeans with 2 source Packages for no reason. All my projects have 1 source package. they appear to be cloned because if I add or remove something in a source…
-
1
votes0
answers243
viewsAndroid sending POST Json using JAX-RS receiving object with null array
I am trying to post an object but the array only comes null.. someone can tell me what is wrong? @XmlRootElement public class Produto implements Serializable{ private String nome; get e set...…
-
1
votes1
answer1538
viewsValidate Login with Sqlite
I have a problem in the logging method, it is logging in with both the right login and password as with them wrong. When it logs in with wrong login the user id goes as 0 and if it logs with the…
-
1
votes1
answer152
viewsReturn method with throw
This method has the type of return Connection, however in the blocks catch there is no return conn and still there is no compilation or execution error. I believe it is by throws and throw but I…
-
1
votes2
answers138
viewsStream Manipulation(java 8)
Good morning guys I would like to get a little doubt, I have a String Stream with many lines of a txt, I need to do a split to break the lines in the Pipes, but the return as you know is a String…