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
votes1
answer58
viewsHow do you get that line out of Tablayout?
Someone here knows how to shoot that green line? Thanks in advance ^^…
-
0
votes1
answer3999
viewsCalling xhtml page by commandButton
I am implementing the Toolbar component of the first faces and within this component there are several commandButtons that I need when clicking it to call another xhtml page of my project. How do…
-
0
votes1
answer864
viewsHow to Make a Control Class for JDBC Crud
How do I make a control class for a list method of my crud? The method of my dao class will return all the data set that have the same city. But this mistake happens in my main class: Method of…
-
0
votes1
answer238
viewsError inserting JDBC data
I’m having the following problem, I want to enter the data from my expense table but some error happens with my Foreign key, which may be ? background: Cannot add or update a Child Row: a Foreign…
-
0
votes1
answer70
viewsError trying to save register in bank
After filling the form and clicking Save, the error below occurs: mai 20, 2016 7:14:52 PM com.sun.faces.context.AjaxExceptionHandlerImpl handlePartialResponseError GRAVE:…
-
0
votes2
answers260
viewsDelete file (photo) from folder when performing update
I’m having trouble with a code. I am creating a form with a profile photo, but when you make a photo change in EDIT, I would like the photo to be deleted from the images folder. Today I can only…
javaasked 9 years, 1 month ago Juliano Morche 116 -
0
votes1
answer378
viewsProblems when consulting a table for a webservice
I made a web-service I can find all services when I access the localhost in the browser but opening in SOAPUI and trying to make a query by all occurs the following error in SOAPUI?…
-
0
votes1
answer743
viewsHow to store the value of a variable in java after the end of the program?
How to store the value of a variable in java after the end of the program
-
0
votes2
answers1040
viewsError connecting to Mysql database in Java
Connection code: package br.bent.jdbc; import java.sql.DriverManager; import java.sql.SQLException; import java.sql.Connection; public class Conexao { private static Conexao conexao; public static…
-
0
votes1
answer390
viewsHelp with Libgdx
I want to know how to create an event by tapping an image using Libgdx... I’m trying to start a game and added an image as Play button.
-
0
votes1
answer116
viewsInsert soapui into a webservice
when I try to make an Insert using soapUI the following error occurs: org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544347. validation error for column CON_CODIGO, value "*** null ***" at…
-
0
votes1
answer206
viewsLoad applet through javascript
I have a java web start project (a applet more precisely) and I want to rotate (display the applet) with javascript. Chrome has a way to run the applet, but you need to click on the link. I want a…
-
0
votes1
answer261
viewsHow to run multiple FOR at the same time
In the code below I have 4 for and they run in sequence, but I need them to run them all at the same time. public class main { public static void main(String[] args) { long init =…
-
0
votes2
answers145
viewsCheck Smartphone Current Time
I am always wanting to check the current time of my device and with this display a notification. But using this code, I can only catch the time I open the app How can I do this background check, and…
-
0
votes0
answers157
viewsdatasource Connection, error while climbing Jboss
I am trying to make a data source connection on Jboss, but without success. I saw this tutorial to create my connection. Then the error occurred: Configurationpersistenceexception: Failed to parse…
-
0
votes1
answer430
viewsHow to Get Data from a Java Text File?
I have a text file with some data in the following notation [[name: Ricardo]] and I need a function that identifies this tag in the middle of the file, and returns the string with the name in…
javaasked 9 years, 1 month ago Tacio souza 9 -
0
votes1
answer97
viewsI cannot save a query in the Database. Shows error Unfortunately
I’m almost two weeks with this problem in my android code, I already searched in some forums and nothing, so I’m kind of desperate looking for help. I’m new dealing with android, if anyone can help…
-
0
votes0
answers29
viewsJava client server application updating db mysql and txt file
Thanks for the attention, apparently this is all ok, when localhost use works. On the server side I saw some place I have to do implementations, only it was not very clear, for example, I have to…
javaasked 9 years, 1 month ago Cezar Apulchro. 1 -
0
votes1
answer4030
viewsjava.lang.Nullpointerexception: Attempt to invoke virtual method on a null Object Reference
I’m trying to enter some values in the bank, but you’re always giving exception. My class that inserts in the bank: private String email; private int codigo; private Button btnOkay; private Button…
-
0
votes0
answers785
viewsSql of cities and states of the world
Hello, good night. All right ? I’m doing three Jcombobox in java. One for nationalities, cities and states. I need all the cities and states in the world. I found this list on github…
javaasked 9 years, 1 month ago Jéssica Dias 161 -
0
votes1
answer152
viewsHibernate shows ddl but does not create tables in the database
When starting wildfly I expected the tables to be created in the database but in the console shows a log of create Tables but nothing happens in the database. Below I show it: 14:15:00,462 INFO…
-
0
votes1
answer165
viewsApplication to manage database in Raspberry pi
Hello. I need to develop an application for Android, to extract and delete a mysql database in a pi Raspberry, being in the same network. I thought about doing it per ssh, however, I never developed…
-
0
votes0
answers89
viewsCall the webservice with an XML
I have to develop a web service (Rest) in java that will be called by an excel add-in developed in .NET. This plugin has to send an xml, what I did was turn it into a string only the XML is huge. A…
-
0
votes2
answers586
viewsMaskformatter leaving empty space
In my project, I have an age field, where I want to receive at most 3 number, so I did this : mskIdade = new MaskFormatter("###"); so far so good, but every time I type a number with less than 3…
-
0
votes1
answer84
viewsI can’t write in Jtextarea
have the class: import javax.swing.JTextArea; public class Semantico { private String tipo; private String variavel; public void verificaSem(String stipo, String svariavel, JTextArea txtSemantico){…
-
0
votes1
answer571
viewsUse java to find an image on the screen
How can I make java read an image on the screen, the intention is to make a bot, as soon as I see the img click on it, the img is not in a browser, website, or something from the web, but in a…
-
0
votes1
answer197
viewsRetrieve server data without refresh
I have a script with a list of friends users and next to a box chat. When the user clicks on one of his friends in the list his data ID & NOME are sent to a function openWidChat(de,para,nome)…
-
0
votes1
answer435
viewsHow to minimize Main Frame when opening a new frame
I have a little problem, I created an application in java with a menu that calls several screens. When opening some screen, I wanted my application main screen to be minimized. I tried with…
-
0
votes1
answer1696
viewsjava.io.Filenotfoundexception: /Storage/Emulated/0/mesa.csv: open failed: EISDIR (Is a directory)
I have the following screen: i even asked another question, which was having trouble loading the directory files in the spinner and has already been solved, the problem is now by clicking the Import…
-
0
votes0
answers212
viewsError deploying to Heroku
Trying to deploy to Heroku with Tomcat 7 and Hibernate and this error appears: [ERROR] Failed to execute org.apache.Maven.plugins:Maven-Compiler-plugin:3.1:Compile (default-Compile) on project…
-
0
votes1
answer68
viewsTree Selection Primefaces
I want to make a resource in the application that lists the folders and files of a directory, so I thought about Tree Selection of Primefaces, but I want to expand Tree Selection at the level of the…
-
0
votes2
answers2083
viewsPick selected line from datatable
I have a dataTable with the data in front of each given one button, when I click one button dialog is opened so that I can edit this data, but I cannot take the object that was selected to pass as…
-
0
votes2
answers124
viewsHow to work with converted dates
Greetings to all, I have the following algorithm; import org.joda.time.DateTime; import org.joda.time.Days; public class DataDirenciada { public static void main(String[] args) { DateTime entrada =…
-
0
votes2
answers205
viewsTable does not update correctly after editing
I have a dataTable and in the last column I have an edit button that opens a dialog with a field to be filled. When I click edit the table is updated with the edited data, but if I give an F5 the…
-
0
votes1
answer39
viewsAddition to an autocomplete
I have an autocomplete with the code below. <p:outputLabel styleClass="rotulos" value="Fornecedor:" /> <p:autoComplete id="inputfornecedor" update="msgcontapagar"…
-
0
votes1
answer436
viewsExport Project with Images
So I made a game on Eclipse and I’m trying to export it to a jar file only that unsuccessfully. The export works, but the images don’t go together at all... Here’s an example of how I’m…
-
0
votes1
answer359
viewsDynamic authentication and permissions
I need to provide a number of features in a REST service, but security is dynamic. That is, an administrator can change permissions according to his will. In my research, I only found authentication…
-
0
votes1
answer269
viewsJava mysql JDBC connection
I have a problem following this video lesson: I seem to follow what he tells me to do but the line goes red and wrong: con = DriverManager.getConnection("jdbc:mysql://127.0.0.1/videoAulaJDBC",…
-
0
votes0
answers637
viewsHow to read txt files and put your data into a vector
I’m trying to make a code that reads latitudes and longitudes that are in a txt file. I mean, put what’s in the file in a vector and make a loop for to call everyone inside the Polyline. try { File…
-
0
votes2
answers130
viewsJformattedtextfield is accepting no characters
I have a window where we have a JFomattedTextField called txtQuantia, I applied a mask to him called mskQuantia, and set the valid characters, in this case, 0-9, but this field is not accepting any…
-
0
votes0
answers1073
viewsLoad an Activity inside a Fragment with tabHost
I’m starting with the android studio reading some things and watching some videos on youtube, basically what I intend to do is a calculation program to make my life easier in my service, some simple…
java android android-studio android-fragment android-activityasked 9 years, 12 months ago Túlio Barata 11 -
0
votes1
answer129
viewsAlgorithm resolution error summing Java arguments
I made this algorithm that performs the sum of arguments inserted, but it shows something else. package ExerciciosSintaxe; import java.util.Scanner; public class Ex7 { public static void…
-
0
votes1
answer107
viewsJson Correct format for typeahead?
When I Gero a JSON with the code below : JSONObject jsonObject = new JSONObject(); try { jsonObject.put("Nome", c.getNome_fantasia().trim()); jsonObject.put("Apelido",…
-
0
votes0
answers110
viewsWeb Services with Axis2
I started studying web services now and it’s giving this error This Web axisService has Deployment faults Error: java.lang.ClassCastException: org.apache.axis2.classloader.JarFileClassLoader cannot…
-
0
votes1
answer960
viewsLink two classes
Hello, everybody! I am developing a work of college that is a mini banking system with Java SE and I am using Swing for interface. I have a little difficulty with the OO paradigm and wanted to know…
javaasked 9 years ago leoSandrini 153 -
0
votes1
answer69
viewsExample.java is not found
recorded Example.java in the Documents folder, used cmd in the javac directory, but when running javac it does not find Example.java.
-
0
votes1
answer166
viewsjavax.persistence.Entitymanager.createQuery(Ljava/lang/String;Ljava/lang/Class;)Ljavax/persistence/Typedquery;
I have the following problem in developing my application’s user authentication and password: jun 30, 2016 8:49:27 AM com.sun.faces.lifecycle.InvokeApplicationPhase execute ADVERTÊNCIA:…
-
0
votes1
answer448
viewsHow to Select a table row and display information in another table relative to the table?
I’m using this code, but I’m not connecting it properly... I would like to register Payments (payments) for these to appear only when selecting the partner in the table(socio)... String sql =…
-
0
votes1
answer336
viewsStart all Checkboxes for a selected Jtree
I wonder how I could do to start the class already with all checkboxes checked, I found this class and used: package CustonComponents; import java.awt.BorderLayout; import java.awt.Component; import…
-
0
votes0
answers42
viewsBlock jTree while executing procedure
Good afternoon guys, I would like to know how I could block(not clickable) all of us in the tree while I perform a procedure, after that I would unlock the.. I found the class Jcheckboxtree and I am…
javaasked 9 years ago Ulisses Gimenes 443