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
answer1364
viewsAdd widget in an Array
I need to add lista.get(i) in an array, will be added in the array with the value of key spec_linha-criativa changed. However, in my code I always lose the reference and when j = 1 My list has the…
-
1
votes1
answer40
viewsProblem to sum values in JDBC
The console presents me the following error: FUNCTION worksoviagemd.SUM does not exist. Check the 'Function Name Parsing and Resolution' Section in the Reference Manual Can only be sql in my…
-
1
votes2
answers11349
viewsHow to insert Java code into html?
Hello guys I would like to know if it is possible to insert Java code into html,because I want to make an encryption program in Java and put inside html. I’m asking here why I haven’t found anywhere…
-
1
votes1
answer50
viewsInhibit information Requiredroleinterceptor in Moiselle log
When using the Demoiselle framework, with each user interaction, the system records the information br.gov.frameworkdemoiselle.security.RequiredRoleInterceptor in the server log. Logs get extremely…
-
1
votes0
answers203
viewsSign in when making web service requests
I created a Web Service that brings results in the format JSON in java, but sometimes when the user makes some request to the Web Service the same hangs and interrupts the whole service, I wonder if…
-
1
votes0
answers339
viewsSave image to the application folder (File upload) using EJB+Servlet JSP
Good people? I need an example of how to upload the file using the technologies, EJB+Servlet+JSP... I am working on a project that needs to insert the images dynamically in my application. Hugs!…
-
1
votes1
answer104
viewsVraptor task does not work
I’m having a problem with the vraptor task. I have a Vraptor 4 project created that is sending email normally, but when I try to create a task it does not send email. See the task class Controller…
-
1
votes1
answer1403
viewsError while converting to Json with Gson
Guys, I’m having this error when converting the object to json. I’m using gson. I have tried to send the whole object and had the same error, changed and separated the object to try to locate where…
-
1
votes3
answers48
viewsHow to store which Navigation Drawe item I selected
Good morning guys, I’m developing an app and put a navigation Drawer in it very basic, and I would like to know how to "save" which item is selected. And so whenever the app opens, it will open in…
-
1
votes0
answers378
viewsProblem Getting Back from Delphi DLL With Java
I am developing a system in java and a part of this system needs to get data that comes from another system in Delphi. I created two functions one that returns one String and another that returns a…
-
1
votes1
answer644
viewsComparison with Stock and Sort
Good afternoon, I’m starting in Java and I have a little problem. I want to sort my list alphabetically. I created a class Pessoa and another class TestaPessoa. Person public class Pessoa implements…
javaasked 9 years, 4 months ago Fernanda Ferreira 197 -
1
votes2
answers40
viewsThe functions do not end
After the execution of the 4 functions it should print the time it took to execute public class main { public static void main(String[] args) { long init = System.currentTimeMillis(); ataque1();…
-
1
votes1
answer122
viewsProblem using the Jaybird
I am unable to connect in my bank using the jdbc of Firebird. the bank is very old and I can not discard it yet, I need to at least download the customer list and save on sqlite. the problem happens…
-
1
votes2
answers168
viewsWhere to place comments and javadoc ? Model or Controller?
I’m doing an MVC program, but it’s time to describe in a javadoc what each window does, I was in doubt between putting these comments in the forms (Model), or us controllers of the respective…
-
1
votes2
answers542
viewsHow to update a line(Row) in datatable? (Primefaces)
Hey, guys? Please, can some Javelin ninja help me with this case? I have a datatable and need to know how to update a single Row after an event, such as a click on a commandButton. I studied a…
-
1
votes1
answer538
viewsHow to create a dynamic Jtable?
I have a JTable in my form, I wanted the size(number of rows and columns) of the table to be according to the number the user enters, how to do in java?
-
1
votes1
answer587
viewsError: Parameter index out of range (1 > number of Parameters, which is 0)
I am trying to remove a data from the bank, but the following error happens: Parameter index out of range (1 > number of Parameters, which is 0) Can you help me? public void remove(Bean e) { try…
-
1
votes0
answers86
viewsMeasure RTT in JAVA
Is there any way to measure latency between a client and a JAVA server? I intend to create a proxy server that will redirect the request of a client to one of the other two servers, and one of the…
-
1
votes1
answer173
viewsError picking up Time type data from database
I am making a query but it is giving error when I try to get values of type Time. This is the error: java.sql.Sqlexception: java.sql.Sqlexception: Bad format for Time '13:00:00.000' in column 5 The…
-
1
votes1
answer553
viewsOccasional error when transmitting Nfce in the new Sefaz webservices of RS - Connection
I have an Nfe and Nfce emission system that we use for several RS clients. A few months ago Sefaz here changed the structure of the webservices, so they also provided new Urls for access to the…
-
1
votes0
answers301
viewsDisable caching in Wildfly navigation
Hello, I am using Vraptor 4 with Wildfly 9, and I noticed that in my localhost browsing, every refresh or browsing among other pages, the HTML content is normally reloaded. However, when I am making…
-
1
votes2
answers3824
viewsPaging with Spring Framework
I have a question, I need to make a pagination when I return all the records of a table, I don’t have much experience with Spring and I would like to know how it is done, I need to overwrite…
-
1
votes1
answer499
viewsdynamic "message" of p:confirm - Primefaces
Can anyone tell me how to change the message of <p:confirm>? When you click the button I want the value of message is returned by the method messageCount(). ... <p:outputLabel…
-
1
votes1
answer921
viewsJava - implement serializable
What are the benefits for the system in implementing this interface in some java class? What changes having a class that implements compared to one that does not have the implementation, based on…
-
1
votes1
answer83
viewsFormat word if it is in a datatable
Given my datatable: Mark the word Atack. Is it possible to create a check that if this word is in the datatable it gets a different format? Ex: Bold and the color is Blue.…
-
1
votes1
answer1738
viewsSearch using Jtextfield and Jtable
I have a question as to the research on a Jtable using Jtextfield. When the person enters the Work name in Textfield and click Search, in Jtable is to appear the search result. My question is this:…
-
1
votes1
answer47
viewsOpen another activity silently
Here’s the thing; I added a button to open an activity from another app. It is possible to open only silently, that is, anonymous, invisible, minimized, or better, without the user noticing!? Intent…
-
1
votes1
answer94
viewsError writing file on Android
I’m trying to create a file on Android, but is appearing a letter that I do not want to be written. Note the code: File file = new File(Environment.getExternalStorageDirectory().toString(),…
-
1
votes1
answer35
viewsFile variable with output [Ljava.lang.String;@
When I do a Sysout of my variable type File, I get this output: [Ljava.lang.String;@3e92957f And my sysout is like this: System.out.println(entrada.getPath() + " " + saida.getPath()); The funny…
javaasked 8 years, 5 months ago Vinícius Novelli 173 -
1
votes1
answer301
viewsOpen Video in a Webview
I made a java browser for Android using webviews, it works perfectly except for the fact that it does not play videos via stream. I want to know how do I make it possible? Thank you..…
-
1
votes2
answers106
viewsError importing csv files from FTP to the application
I am creating an app and I am trying to import some csv files that are on ftp into android. then I have hers the following way: Spinner will list all the files present in the "import" folder that is…
-
1
votes1
answer970
viewsChange variable from another class
I have two Activity/classes, follow the boot of my first Activity where when I click goes to the second Activity: public void onButtonClick(View v){ if(v.getId() == R.id.Busuarios){ Intent i = new…
-
1
votes2
answers255
viewsFirst application using Maven
In my application I am trying to use Maven, but I have some problems that can be related to configuration, when I will generate a project JAR or use some Run As option from the pom.xml file in the…
-
1
votes1
answer318
viewsIs there a framework to assist in the authentication process when using Google Appengine?
I don’t want to use the app session. Would Spring Security be the only option? In this case it would be a SPA app.
java framework spring-security google-app-engine single-page-applicationasked 8 years, 5 months ago gledson85 23 -
1
votes0
answers82
viewsPinning Certificate Application in APP
I would like to apply pinning in an app but never applied. I’ve seen some articles on Pinning, like the of this link, but it doesn’t specifically explain where I have to put it, and how I put it in…
-
1
votes1
answer1324
viewsUnreachable Statement
I need help, on line 107 the android studio shows an error that says: "Error:(107, 48) error: unreachable statement" Whereas Line 106 is the AdapterView.AdapterContextMenuInfo info is red. When I…
-
1
votes2
answers6513
viewsHow to implement a close (close) screen event?
When I create a screen in Scene Builder in Javafx, comes as default three buttons in the upper corner of the screen that are: minimize, maximize and the close-up. My question How I can manipulate…
-
1
votes0
answers725
viewsTimertask calling method twice
I have a TimerTask which calls a method every 1 minute, but the method is called twice. This method checks some factors and sends an email, as the method is called twice the email is sent twice.…
-
1
votes1
answer759
viewsHow to save the values of a String in a Double variable?
I have a string with the x value inside it (String value = "x") Need to pass this value to a Double Variable, how do I pass the x value of the String to the variable? If I convert from String to…
-
1
votes1
answer685
viewsHow to read the return of the json webservice (WEBSERVICE - JSON)
I have this JSON: { "articleList": { "conversas": [ { "cd_resultadofinanceiro": "24", "cd_feedbackfinanceiro": "61", "mm_resultado": "Tomar as devida providencia judiciais.", "dt_resultado":…
-
1
votes0
answers59
viewsHow to pass the Excel worksheet(s) name to a Jlist
I would like to know how I pass the sheet names of an excel workbook to a Jlist when I click on a button. Since I already have the button created and it simulates a Shell to locate the file. Taking…
-
1
votes1
answer1226
viewssetPreferredSize and setSize do not work
I used the setPreferredSize and the setSize on the button color1 but no effect on the application, it continues using the entire application. public static void janelaPrincipal() { //FRAME JFrame…
-
1
votes0
answers40
viewsChart problems on Jasperreports
I have to make a report that has two pie charts, what happens is that my first Chart appears without problems, the second no, and I have already checked that the lists, which are sent via parameter,…
-
1
votes0
answers206
viewsError solving Handler Javafx method inside classeDAO and controler with Mysql database
I am trying to create a simple cash system (cash entries minus cash outputs equal balance). And I made a method in class Dismissed going to the bank with the personalized consultation: (SELEC…
-
1
votes0
answers59
viewsAndroid - How to turn off automatic camera lighting?
I would like to disable automatic camera lighting on Android. When I use the camera for example, if I approach something to the lens while shooting, it makes the shooting clearer. I would like to…
-
1
votes2
answers188
viewsGet information from multiple files in one directory
I’m making a Java application that takes information from multiple files *.tif in a directory, but I can’t take information from more than one at a time and need to put the specific path of each…
-
1
votes0
answers135
viewsAndroid Fragment with Textwatcher - does not work
Good morning! With the help of the staff, I made a calculation scheme that when typing the value in an editText1, another editText2 is updated automatically, and vice versa.. It’s just a test…
-
1
votes1
answer85
viewsImages loaded in Listview are changing randomly
I implemented a Listview where an external image is populated in each position, but when I scroll the screen the images are changing randomly. This video shows exactly what happens:…
-
1
votes1
answer301
viewsIs there a difference between Java platforms?
In: Java Desktop Java Mobile Java Web Languages are different, or is it standard changing only the environment?
-
1
votes1
answer68
viewsJava does not compile. java
Java does not compile error return, it is not possible to locate or load main class with.sun.tools.javac.Main.