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
answer224
viewsPaging using Demoiselle 2.5.0
I started testing the system today with the most current version of Démoiselle (2.5), however, paging is no longer working. When entering the page the content is listed, but by the time you change…
-
0
votes1
answer44
viewsMavem project error warning
I formatted my PC and imported my Maven project, only it keeps appearing the warning: "This project has the JPA Facet, but no JPA project could be created. See the error log for more Details." The…
javaasked 9 years, 6 months ago Cleber Souza 1 -
0
votes1
answer58
viewsHow to create a variable that stores a value even if you restart the application or change scenes on Android?
How to create a variable that stores a value even if it restarts or changes application scene, I don’t know if it would be a database or if there is something simple
-
0
votes1
answer33
viewsProblems importing with LWJGL
Hi, I followed in the footsteps of that video, and I took the sample code from website. Trying to matter says method is undefined:…
-
0
votes1
answer31
viewsError when compiling LWJGL
When trying to compile a code LWJGL gave the following error:…
-
0
votes2
answers120
views(Business rule) -Repeated registration
How do I make this business rule that prevents the user from registering an account with the same number and agency ? Main class public class Main { public static void main(String[] args) { menu();…
-
0
votes1
answer94
viewsUtf-8 Server Issues with Mysql
Good afternoon, I have an accents problem with my application running Ubuntu server 14.04 VPS American. All the application running on my development machine are registering normally at the base…
-
0
votes0
answers270
views(Business rule) - Update balance
I am developing a business rule in which the user when typing the number and agency from the bank account, he has two options: 1-Credit: The user will type char 'c' through Jtextfield credit…
-
0
votes1
answer158
viewsHow to create a Listview with Random items? (Android)
I’m having trouble with my Listview. I would like him to display his items in an Random way, but not to repeat the items, as is happening now. Here is the code: public class AdapterConteudo extends…
-
0
votes0
answers58
viewsError publishing project in War format on Amazon server
I’m having difficulty publishing project on an Amazon server. Whenever I publish the file war in Tomcat the service does not start and returns me the following error: Jan 15, 2016 9:01:05 PM…
-
0
votes2
answers1861
viewsHow to place a button that performs a Alertdialog.Builder action?
I have this method where it displays a message. public void mensagenExebir(String titulo, String texto){ AlertDialog.Builder mensagem = new AlertDialog.Builder(Activity.this);…
-
0
votes1
answer1038
viewsSqlite android query() / like with accents and without
How to make a query in Sqlite for Android that searches both accented and not accented words? For example: String[]ARGUMENTOS = {"%"+argumento+"%"} query(TABELA_CIDADES, COLUNA_NOME, NOME + " like…
-
0
votes0
answers409
viewsHow to upload files to my server using Java Servlets
How to upload files to my server using Java Servlets, and after uploading the file return the url the file is in, where the name originates from the date and time the file was uploaded so that no…
-
0
votes0
answers140
viewsIcon and Text in Actionbar menu
How can I always display the text icon on a button in Actionbar? I did so: <menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto">…
-
0
votes0
answers420
viewsUpload image + parameters Httpurlconnection
I have a Rest server and I need to upload images and also send parameters. I’ve done a lot of research, but I still can’t get the client to work. By the browser works right, via code I can send the…
-
0
votes0
answers73
viewsSuggestions for updating JSE application to J2EE
Already for more than three years I do not work with Java for real, I have worked with PHP, learned and liked a lot. In my opinion, all two languages have many legal advantages to be incorporated…
-
0
votes1
answer47
viewsError compiling Dagger 2 in Eclipse
I am studying the project example of the official website of Dagger, which can be accessed in this link: https://github.com/google/dagger/tree/master/examples/simple/src/main/java/coffee. I am using…
-
0
votes1
answer461
viewsTextfield Javafx catching the event
I would like to know which event that when leaving the object TextField of JavaFx, changes a value of another object. if (textFieldC1.getText().equals("50")) {…
-
0
votes1
answer530
viewsCreate Xpath manually
I’m testing a site that runs only and exclusively in Internet Explorer, so I can’t use Firebug, someone knows how to create an Xpath of an element manually or knows some tool for IE that identifies…
-
0
votes1
answer205
viewsError handling in Google maps Android API
I’m running a register of people with addresses to show on the map where a person lives. When I type the correct address everything works normally, but when I error the address, it is not valid for…
-
0
votes2
answers320
viewsHow to create Exception
I am trying to make an exception but I am not getting it. I would like your help to solve this problem. I am since yesterday trying to validate a field but this difficult... Thanks already to all!…
javaasked 10 years, 2 months ago Carlos Leandro Ferreira de Alm 339 -
0
votes0
answers398
viewsImageview on Android is it possible to zoom in?
In the ImageView can zoom in on the image within the ImageView definite. <ImageView android:id="@+id/imageView1" android:layout_width="fill_parent" android:layout_height="fill_parent"…
-
0
votes0
answers110
viewsDoubt about data distribution between classes
I have a class called Socio who asks for his name, phone number... and I devised methods getters and setters. And another class called DadosDoUsuario who will ask for the information to fill out the…
-
0
votes1
answer39
viewsLoad and set bitmap asincrona
It is possible to load a Bitmap image asynchronously, but set it to an imageview before finishing? Thus : imageView.setImageBitmap(bitmap); new Thread( ()->{ //carregar bitmap }).start();…
-
0
votes1
answer39
viewsProblems with array printing
Matriz Principal: public static String [][] matrizPrincipal(){ String [] [] matriz = new String [2] [6]; matriz[0][0] = "Robin Arryn"; matriz[0][1] = "Lino Facioli"; matriz[0][2] = "145";…
-
0
votes0
answers44
viewsHow to separate the DAO layer from the data entered by the user?
I am trying to take this DAO layer and put it in another class to receive the data typed by the user. Someone could give a hand? That is, this piece of code would have to receive the data in another…
javaasked 10 years, 1 month ago Carlos Leandro Ferreira de Alm 339 -
0
votes1
answer130
viewsLimit anagram hits - Java
I have a code that checks if the user has typed an existing word in the anagram, but if he enters the same word 10 times it counts as 10 hits, I would like to limit this to 1 time only. The code…
javaasked 10 years, 1 month ago Mateus Rocha 23 -
0
votes1
answer1930
viewsOpen the MEGA app when a website link is clicked on the webview
I am developing an app for my site and I want that when a certain user clicks on the download link, which in this case is in the mega, open the mega APP automatically, as well as is done in Chrome…
-
0
votes1
answer56
viewsHow to create a template on Android?
Regarding that answer of this question, I asked the author the question If he chose to store in an Object Array, this question had an image what could be done. his answer you can create a template…
-
0
votes0
answers370
viewsError accessing Websphere database
This error appears after installing the project(it installs everything normal and even runs and opened the project, but when it will access a page that makes the request to the error database):…
-
0
votes1
answer124
viewsList Adapter duplicating positions in Listview
I have a class called "Adapterlistplayers" that extends the class Basedapter and in it I inflate a layout that contains a Checkbox and an Imageview. Class Adapterlistplayers public class…
-
0
votes0
answers64
viewsInflate Toolbar in Stepper
I need to create a Stepper in my application that I got the library on Github https://github.com/shivasurya/materialsteppers I managed to implement the application, however I want to put a Toolbar…
java android android-layout android-fragmentasked 9 years, 5 months ago Joel Messias Do Nascimento 103 -
0
votes1
answer208
viewsHow do I send a data source list to a sub report and call that sub report in my main report
Good morning guys, I’m having a little problem. I’m trying to pass a lista as data source for my sub report. I already have the main report which is also filled in by a list. My question is this,…
-
0
votes1
answer522
viewsHow to run a . jar using java jdbc on another machine
I’m a beginner in java, I made an application using the netbeans native database. Gero the file jar, and in the machine I made the application the jar runs normally, but when I put this jar on…
-
0
votes2
answers990
viewsJoptionpane - Error cancel button
I’m developing an ATM system by JFrame, however when I use a JOptionPane, when I click the button cancel it appears some errors in the Eclipse console. Follow the mistakes below: Exception in thread…
javaasked 10 years, 1 month ago Paulo Henrique Gallo 105 -
0
votes1
answer288
viewsApplication for when I pass a List per parameter to a Sub report
I am trying to pass a List by parameter to my Sub Report, but when it arrives in a certain part the application to and the report is not generated. Never get out of it: I’m passing the list that…
-
0
votes1
answer326
viewsRun method when initialize class
I have a class called ligacao and when I initialize it (inside a button) I want another method that is within that class( that is started in a third class) to re-export and change from…
-
0
votes2
answers432
viewsMerge using Hibernate without erasing other Java data
I use Hibernate in my Java application for database interaction using a controller class created even by Netbeans, but the problem I have is this: when making an edit in some field and only pass…
-
0
votes0
answers375
viewsJSF Session: login module
I’m having a problem, with my Session,hj I make 2 connections , one in my manager database to grab the client’s ip and database location, and another in the client’s database with the ip and…
-
0
votes1
answer309
viewsJava: Filereader reading number not in the file
I have this TXT: 1,2,4,8,7 45,18,27,35,44 17,45,2,8,6 And I want to read this matrix to a Java array. Here’s the code: public static void main(String[] args){ double[][] pesos = null; String…
-
0
votes0
answers2228
viewsjava.lang.Runtimeexception: Can’t create Handler Inside thread that has not called Looper.prepare();
What I must do to solve this problem ? private void callServer(final String method, final String data){ new Thread(){ public void run(){ asw =…
-
0
votes2
answers822
viewsHow to store images in an Android vector?
I have images inside the drawable and to access it simply R.drawable.myimage. How to store this image in a vetor?
-
0
votes1
answer25
viewsHow to Execute a Method in Completing the Section?
I need to execute a certain method when the section is closed (when the user clicks to close the browser). I’m working with JSP and I don’t know how I can do it.
-
0
votes1
answer56
viewsIs it possible to cancel a JDBC connection?
I’m using the following code in a Thread: try { Class.forName("org.postgresql.Driver"); DriverManager.setLoginTimeout(60); conexao = DriverManager.getConnection(url,usuario,senha); }catch(Exception…
-
0
votes1
answer56
viewsException Jtattoo main
Good afternoon, you guys, Me and a friend are servicing a system and we’re trying to generate a system jar. So far so good, the system compiles normal and all, but when we open the generated jar…
-
0
votes1
answer523
viewsProblem with Splashscreen on IONIC
someone already had some error similar to this of the image when trying to give Build in the application? I thought it was the Spalshscreen plugin that gets installed automatically... I upgraded…
-
0
votes1
answer102
viewsWhy do I only see the last one when I insert three objects?
I need to create a class carro. The program must contain a collection of cars of the type ArrayList. Your program should allow you to add, delete and query cars to ArrayList. I implemented two…
-
0
votes0
answers85
viewsHow to go through the whole loop
I’m in a little trouble so that the whole radio be filled with everything that is in the according array. I’m trying to do the following, example: 1 - Quanto é 1+1? A) 1 B) 2 C) 3 D) 4 E) 5 2 -…
-
0
votes2
answers2260
viewsStore customers inside an Arraylist
Taking into account the classes below, how can I - within the Bank class - store within the Arraylist all my customers? Bench public class Banco { private ArrayList<Conta> contas; public…
-
0
votes1
answer284
viewsHow to center an imageView on the screen via code?
I created a imageViewvia code and would like to know how to center it on the screen