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
answers175
viewsBar Chart Primefaces
Folks someone knows how to leave the primefaces bar chart this way? I tried to do here only that it alternates the colors, it leaves for example instead of three columns blue, 1 blue, 1 red, 1…
-
0
votes1
answer630
viewsReturn string value with firebase
In Android Studio I have the following code in Mainactivity package br.alan.com.firebaseapp; import android.support.annotation.IdRes; import android.support.v7.app.AppCompatActivity; import…
-
0
votes1
answer246
viewsJsf&primefaces CSS problem
Project -- JSF CDI Mysql //I am not using Maven Good afternoon, my question is this: I would rather use style="...." ; in xhtml code, to make the code more elegant, make use of css. for example, I…
-
0
votes1
answer304
viewsHow to take a user’s ID in a Listview and use as a variable in another Activity?
I’m doing my TCC and I’m having trouble removing the ID of some user from Listview and using it in another Activity (The intention is that when the user holds the click on someone from the list, a…
-
0
votes1
answer1069
viewscatch and set value of a Jdatechooser
I created a JDateChooser own, so I can make more personalized changes to it later. The problem is, I realized, if I pick a date on it, it just gives me the current date. For example, if I choose…
-
0
votes1
answer90
viewsError: cribsFactory.getCribs is not a Function
I have this controller angular .module("ngCribs").controller("cribsController", function ($scope, cribsFactory) { $scope.cribs = cribsFactory.getCribs(); }); and that Factory…
-
0
votes1
answer935
viewsHow to inform the largest consecutive sequence?
Guys I’m hooked on this algorithm where I create an integer vector with n positions and need to show the longest consecutive sequence. I will leave the statement to try to be more specific.…
-
0
votes1
answer119
viewsSending data between Activitys with Putextra - Management
I have the following problem: I have three screens: Main Activity 2 Activity 3 In the first Activity (Main) I send a data by putExtra to Activity 2 (id user). Activity 2 is the profile screen, and…
-
0
votes0
answers263
viewsHow to highlight a date in the Calendarview widget?
XML of the project <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:tools="http://schemas.android.com/tools" xmlns:android="http://schemas.android.com/apk/res/android"…
-
0
votes1
answer44
viewsHow to resolve Invalidformatexception in xls file generated by Jett?
I have a way of generating reports done with Jett: Map<String, Object> beans = new HashMap<String, Object>(); beans.put("fichasTecnicasMateriaPrimaResumo",…
-
0
votes2
answers160
viewsSharedpreferences - Firebase android
I am logging in normally but quado close application, back to login screen. I’m trying to run sharedPreferences but I’m not successful. public static final String PREF_NAME =…
-
0
votes1
answer389
viewsAndroid - org.json.Jsonexception No Value for
While running the application I received a Jsonexception No Value for error { "time": "05:07:18 AM", "milliseconds_since_epoch": 1504588038515, "date": "09-05-2017" } I know there are many errors…
-
0
votes0
answers163
viewsProblems sending JSON by POST when compiled
I am with an application whose one of the modules is responsible for sending a JSON to an online API that synchronizes the data with a back system. When this module is run or debugged into an IDE,…
-
0
votes2
answers994
viewsSubquery in Java HQL
Hello, I am in a project that uses geolocation and I am doing a feature to list the stores closer to the location chosen by the user. I am using the Postgresql database and I made this query to…
-
0
votes1
answer212
viewsForeach returning only one object in the list
I have a JSP page and in it I want a list. For this, I created a method listarTodos() within the DAO class and set the fields to display the object data, thus leaving the code: </div> <%…
-
0
votes0
answers442
viewsError "Concurrentmodificationexception" when modifying (insert data into) Arraylist
I am trying to create a small login system in Java. I have the following classes: Logincontroller: public static void main(String[] args) { ArrayList<Usuario> listaUsuarios =…
-
0
votes0
answers297
viewsRead PDF or TXT file in java
Hello. I’m doing a course work where I have to take a PDF file or the TXT that the teacher went through, and encrypt it by Cesar’s cipher algorithms, playfrai and transposition. I would like to know…
javaasked 7 years, 1 month ago Renan Alexandre 137 -
0
votes1
answer495
viewsTarget Unreachable, Identifier [usuarioMBean] resolved to null
I have a problem trying to log in to my java web application. As you can see below, there is the stacktrace of the HTTP Status 500 - Internal Server Error error. I’ve tried a few things, such as…
-
0
votes1
answer164
viewsI can’t get value from the onSuccess (Uri Uri) method return
For my college TCC I am developing an App for android. I stopped at a point where I am downloading the URL of some Firebase Storage images, and within the method onSuccess(Uri uri), i have access to…
-
0
votes1
answer298
viewsClear form after registration (Javaserver Faces)
After having made a registration, it clears the form normally, but when I change page and return to the registration page, the fields are filled with the values I previously registered. The scoped…
-
0
votes1
answer489
viewsHow to Save the Date Field of a Java SE Application in Postgresql
I need to save these two dates (ALLOCATION DATE and RETURN DATE) from an allocation, where I have the following Allocation Table: CREATE TABLE public.aloca ( alocod serial NOT NULL, alodtdevolucao…
-
0
votes0
answers21
viewsnotify every day schedule X
I was running the code in android studio but the code has some flaws and I can not solve,. Mainactivity @Override protected void onCreate(Bundle savedInstanceState) {…
-
0
votes2
answers2434
viewsError while booting application with Spring Boot
I am creating an application using Spring Boot with JPA. When I go up the application, the following message is launched: Description: Cannot determine Embedded database driver class for database…
-
0
votes1
answer664
viewsValidation of fields with Javascript in JSP
function validar() { var nome = document.getElementById("nome_passageiro").value; var data = document.getElementById("dt_nascimento").value; var cpf = document.getElementById("cpf").value; var…
-
0
votes1
answer550
viewsSeparate content in the CSS menu
I want to leave the links of the pages Control Drivers,Control Passengers,Control Racing, the menu a little more separate but spaced, but I’m not getting. <%@page contentType="text/html"…
-
0
votes1
answer812
viewsError in wildfly postgres configuration
I performed the postgresql configuration: C: wildfly-10.1.0.Final modules system layers base with postgresql main I added the files: module.xml postgresql-9.4.1208.jre7. jar OBS: The bank has…
-
0
votes1
answer26
viewsMainactivity error :non-static method set(int,int)
I was running the codes when I got to the end and came across errors in MainActivity, I’m using API 16, someone help me ? **code ** import android.app.AlarmManager; import…
-
0
votes1
answer99
viewsCreate an int variable that recognizes numbers in time format
I have a variable int that is taking the current time of android and comparing with more dua variables int of my database in the parse that contains the opening and closing time of a company, in…
-
0
votes1
answer372
viewsEntering data automatically when loading the JSP page
I am developing a web application using jsp, in which I register a mototrista but soon when loading the jsp page the application already tries to register alone the driver data, thus giving the…
-
0
votes0
answers38
viewsHow to put the values of a db column in an array?
I have a table, which is written below. Busy is the part I will move. The value of Busy will be changing according to the program from 0 to 1, depending on whether you are busy or not. I need to…
-
0
votes1
answer37
viewsHow to run a Recicle view on other activitys
How do I place a recicle view or a list view in some other Ctivity ? Example: I created a project with name X dai in it so I put the layout as Empty Activity and such it generates me an…
-
0
votes1
answer282
viewsAttempt to invoke virtual method 'long Contactodao.alterar(Contact)' on a null Object Reference
Error: 09-12 14:05:28.662 10410-10410/costamilam.guilherme.contatosempresariais E/AndroidRuntime: FATAL EXCEPTION: main Process: costamilam.guilherme.contatosempresariais, PID: 10410…
-
0
votes1
answer710
viewsDoubt Exercicio Collections - Queue Interface
I’m having a question in this exercise about Collections in which I should use the Queue interface : Write a program that simulates control of an airfield at an airport. In this program, the user…
-
0
votes1
answer659
viewsRead xml in Java
I’m using a program called Tiled(Tilemap) to generate a map and I want to read these numbers. The xml is like this: <?xml version="1.0" encoding="UTF-8"?> <map version="1.0"…
-
0
votes0
answers113
viewsHow to send data from an Activity to a Fragment?
1I’ve been having a question for a while. I want to pass a value of a activity for a fragment, however, the error when opening the fragment to be specific when receiving this value, I believe. This…
-
0
votes1
answer563
viewsJtable currency format
I am making a Cellrender with currency format. I placed 13 columns in a jtable, one has the recipes (Salary, 13th salary, Overtime).. and other 12 with the months. each month the person will enter…
-
0
votes1
answer1067
viewsRetrofit JSON - Error Expected BEGIN_ARRAY but was BEGIN_OBJECT
I’ve done some Retrofit projects and it always worked but I’m doing one that consumes the end-point of api.github.com and is giving an error and I’m not able to find a solution, I’ve done everything…
-
0
votes1
answer24
viewsError syntax in query with Postgresql JSP sort
I made a select in the database in which will make a query according to name, and order it but when executing select happened the following error. public List<Motoristas>…
-
0
votes1
answer59
viewsPass String to array (Xml);
I’m using this code to read a map of an xml file. private void loadMap(String mapa) { File file = new File(getClass().getResource(mapa).getFile()); try { dbBuilder =…
-
0
votes1
answer319
viewsjava.lang.Stackoverflowerror: stack size 1038KB
I’m making an algorithm that converts one bitmap leaving it in shades of gray. I could do it using for but I’d like to do it recursively. Using for (This working well) //BUTTON - ON CLICK . . .…
-
0
votes1
answer54
viewsHow to share content from a listiview?
Hi, I have a question. I’m making an APP, which has a listview that has text and an image. I would like to know how I can share the content the person clicked on. Just follow my code: // DECLARANDO…
-
0
votes1
answer682
viewsError No value specified for Parameter 4
When I execute the code by the browser appears the error quoted in the title "Error No value specified for Parameter 4". Below I will leave my DAO and my Mysql configuration if someone can help me…
-
0
votes0
answers88
viewsError org.hibernate.dialect.Firebirddialect does not support Identity key Generation
This error appears when I go to save an entity in the database. I have configured the Entity class and the Repository in several ways, but the error remains. I am using Firebird 2.5. The table…
-
0
votes2
answers238
viewsIs it possible to reuse the parameters of a Query in JPA?
Hello, I have a question regarding Parameters of the object Query in the JPA. I am implementing pagination of my tables using the Primefaces with LazyDataModel and in the function I use to make the…
-
0
votes1
answer73
viewsREGEX JAVA Find a chunk throughout the document
I am trying to develop a Regex expression in the JAVA language to find and validate the existence of a small sequence of characters within a . txt. Exp: Validate the existence of the sequence…
-
0
votes1
answer100
viewsCreate Java EE 7 Algaworks Workbook
I’m trying to create the Java EE 7 course database with Jsf, Primefaces and CDI and I’m not getting it. Make the mistake below: set 17, 2017 8:24:22 PM org.hibernate.annotations.common.Version…
javaasked 7 years ago Gilmar Pinto 1 -
0
votes1
answer218
viewsViewpager + Fragmentpageradapter + Update Fragment?
In the implementation of a Slidingtabs using the Slidingtablayout and Slidingtabstrip classes provided by the Android website Dev + Viewpager + Fragmentpageradapter when the data is updated in the…
-
0
votes0
answers40
viewsWildfly 8 does not read network folder when run as a service
Good morning! I have a Java 8 application running on Wildfly 8, I need to view images. The display works perfectly when the folder is local C: (Eclipse, CMD and Service). I had to transfer the…
-
0
votes3
answers373
viewsArray overriding elements
I did the method registraReclamacao() in that class and every time I call him on main, he overwrites and only stores the last record. package testelp2; import java.text.SimpleDateFormat; import…
-
0
votes1
answer411
viewsHow to check if the fields are empty before adding to the arraylist?
I have a question: how could I check if the fields of my Jtextfields are empty before adding to the arraylist? as would be the validation in this part of code? Endereco enderecoPJ=new Endereco();…