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
answer375
viewsHttpresponse java
how to handle the server’s json response? HttpResponse responsePOST = client.execute(post); String responseBody = EntityUtils.toString(responsePOST.getEntity()); String "responseBody" comes from php…
-
1
votes1
answer379
viewsHow to make connections to a php work in the background on Android
I have a little app of chat who logs in and sends messages to the server through php + JSON, but each query crashes the app for a half second, which is really boring. I heard something called…
-
1
votes1
answer3881
viewsManage back button between Ragments
I’m working on an app for the college where I’m using Fragments for all my screens, for reuse purposes. The problem is that I cannot control the behavior of the back button between the Fragments.…
-
1
votes1
answer114
viewsAsynctask canceled during execution does not call any of the post-InBackground() methods
When I cancel my AsyncTask running, it does not update the flag mAsyncTaskEstaFinalizada. Does anyone know what it might be? When I put breakpoints in the methods onCancelled(),…
-
1
votes1
answer869
viewsChange Method using Java and SQL
I need to make a change in SQL using Java, but I ended up getting lost in logic when making the call and the return to change. Follow the outline of the code. Here is the Main, where the user…
-
1
votes1
answer605
viewsValue sent to JSP via Spring Model does not appear
I’m developing a project using Maven, Spring framework(mvc module), and database searches through JDBC. I have the following code in my controller: @RequestMapping("/authors/edit") public String…
-
1
votes2
answers236
viewsBeginner Error with Onclicklistener
I’m starting now in development for android. I’m trying to implement an onclicklistener on a button and it doesn’t work at all, I’ve followed step by step the videos lessons here, youtube, and…
-
1
votes1
answer412
viewsHow to manipulate Labels using a loop
How can I use these Abels using a loop instead of creating 40 lines of repeated code? jLabel1.setIcon(new ImageIcon(getClass().getResource("/cards/"+cards.get(1)+".png"))); jLabel2.setIcon(new…
-
1
votes1
answer271
viewsMaking web service calls separately
I need to finish an application I’m doing on Android, in the login step I’m doing, and for that, I have two webservices to perform it, one is the Identifier and the second is the Loginsamba. I’d…
-
1
votes1
answer87
viewsJava Bounceball Bubble Movement - Error
I’m doing a Bounceball game, using iteration with the mouse pointer. But I’ve come across a problem I’m having trouble solving. The general idea is that, the bubbles move around the screen, and when…
-
1
votes1
answer692
viewsProblems sending data from one Listview to another Activity
Questionadapter public class Questionaadapter extends Basepter Implements Onclicklistener { private List<Pergunta> lista; private Context context; public PerguntaAdapter(Context context,…
-
1
votes0
answers834
viewsCustomize the Ckeditor taskbar (Java Version)
I am using the lib Ckeditor integration with JSF (ck-jsf-editor-0.9.4.jar) and is working properly, but the Toolbar that is appearing is the default and I would like to set this up. Would anyone…
-
1
votes1
answer215
viewsGiving permission to another application to access my package
I have an application that has a certain audio file, which is in /data/data/meu_pacote/audio_anexo/audio.mp3, so far so good, the problem is that the Mediaplayer class of Android fails to run the…
-
1
votes2
answers382
viewsClick on the button does nothing
I put a button on activity_main and I made a second canvas. The idea was, by clicking the button, to press this other screen. And in the class MainActivity.java I put that when I hit the button, I…
-
1
votes1
answer1351
viewsHow to save objects list in Android
I want to save this list (List) after exiting the application, and when running again I want to recover the instance from the list that was previously saved. private List<BluetoothDevice>…
-
1
votes1
answer157
viewsSax parser xml string Java Android
I’d like some help on a problem I’m having at Java Android. First I read a String XML to get the values of each tag. When getting the values reads well the tags, only 9 in 9 Strings received reads…
-
1
votes1
answer307
viewsAdd attributes in file creation
I am developing a Java application that creates files in the user directory. So while creating the files I needed to add some attributes in their properties, so that I can identify from where…
-
1
votes1
answer213
viewsData modeling problems with Persistence.xml
I created a college application to create automatic tables by Hibernate with JPA however it gave error in some tables, that were these; Catalogued Orderly Commodity but this generating the following…
-
1
votes1
answer299
viewsObject counter
I’m starting to study about Java, and I was in need of an object counter, that is, I need to paste a text, and in it he has to identify certain variables in this text, and from there count the…
javaasked 10 years, 2 months ago Fernando Hugo 11 -
1
votes1
answer1534
viewsEclipse for Java EE does not start
My Eclipse for Java EE does not start, and gives a first-line error: java was Started but not returned Exit code=13 64-bit operating system (x64).
-
1
votes1
answer113
viewsGOTO and ACTION table generator
Regarding LR Parser, I fear the following Wiki: http://pt.wikipedia.org/wiki/Analisador_sint%C3%A1tico_lr#Algorithm There is a canonical algorithm to generate the GOTO and ACTION tables. I searched,…
-
1
votes1
answer722
viewsSearch database using JSF
I am programming an application in JSF, my application can do the function of Record and Change without any problem, but as I am using Java web technology now I am finding a certain difficulty in…
-
1
votes1
answer336
viewsDebug/running non-stop server
It is possible to stop an execution that is in debug at the time of breakpoint without stopping the server? I don’t want the debug continue because I know you’re wrong, for example I want you to…
-
1
votes1
answer344
viewsHow to change only checkboxes visible from a datatable?
Problem situation, suppose we have a datatable on the first faces with the following features: The first column instead of the title has a checkbox with the label all. All rows in this first column…
-
1
votes2
answers202
viewsChange class vector size
I have to use vector public static String vetor[] = new String [15]; in the class... but this class is used in a Servlet. And the size I need the vector is what the user chooses... how can I pass…
-
1
votes2
answers1734
viewsHow to pass data from a Pager/Fragment to another Activity?
I’m creating an Activity that possesses Swipe Views (Viewpager) and I would like to know how to pass data from Ragment to another Activity, since static methods are always requested. For example,…
-
1
votes2
answers439
viewsJAAS - request.isUserInRole always returning false
I am implementing a JAAS with only 2 types of users, one type will be an Administrator and another will be a Collaborator. Instead of creating separate directories for administrator and…
-
1
votes1
answer611
viewsHow to access data from a Hashmap in another class
How can I access data from a Hashmap in another class? Example: Class1: Hashmap<String,String> teste = new Hashmap<>(); teste.put("TESTE", "exemplo"); Class2: How can I access Hashmap…
-
1
votes1
answer5228
viewsDifficulties with rounding using Bigdecimal
I wrote the following method: public static double round(double value, int scale) { BigDecimal bd = new BigDecimal(value); bd.setScale(scale, BigDecimal.ROUND_HALF_UP); return bd.doubleValue(); } I…
-
1
votes1
answer72
viewsReplace files with izpack
I have an installer that plays some files in a folder, but I wanted to use the same installer to update the application, so there are some files that cannot be overwritten. This way I thought of…
-
1
votes2
answers1732
views -
1
votes1
answer77
viewsHow to take parameter from inside the popup?
I have a screen where I select the pages, and when I clicked on the page opens a pop up where I can type the value of the pages instead of going by. (In case I have 60) the page is nothing more than…
-
1
votes1
answer606
viewsSelecting data in Java Curl
I would like to know how to select data using gson library. BufferedReader reader = null; URL endereco = new…
-
1
votes1
answer4140
viewsReturn an address using Google Maps API
I’m finishing an application where I need to use the Google Maps API for two things: select an address from the user’s choice (example: user navigates to the desired address and chooses it) and…
-
1
votes2
answers1131
viewsGenexus X Ev3 and Tomcat error 7.0.54
I’m using Genexus X Ev3 to generate a web application with Java and I am using SDK 7 Update 55. I recently upgraded my Tomcat to version 7.0.54 and I started having the following error in the Tomcat…
-
1
votes2
answers524
viewsHow to know the remaining time for the alarm to ring
I am developing an alarm clock. Below I have a function to set the alarm. But I want to know how to find the remaining time for Alarmmanager to trigger Pendingintent. For example, it’s now 11:00,…
-
1
votes1
answer1274
viewsAdd buttons to the bar action when using Listactivity?
Well I have an application that would like to keep the standard format on all screens, i have a quick access menu with some items in the action bar, and other complete in the menu option. The…
-
1
votes2
answers1393
viewsMacro, Capture MOUSE and KEYBOARD
I need to do a macro, capturing mouse and keyboard. How should I proceed in JAVA? I need some specific API ?
javaasked 10 years ago user17270 -
1
votes0
answers133
viewsTomcat7 cluster does not replicate session
I have an Ubuntu with 2 Tomcat7 with the following cluster settings: The balancer is Apache MOD_JK. SERVER.XML: <Engine name="Catalina" defaultHost="localhost" jvmRoute="no0"> <Cluster…
-
1
votes1
answer1150
viewsReturn data from Java to Ajax using Json
I have a Java application, and a module that inserts products into the base using REST. At the base the product id is autoincremental, and as soon as I add the same at the base, I need the id for…
-
1
votes1
answer101
viewsHow to prevent moving the cursor on a jFormattedTextfield with a mask?
I have a field formatted as follows: '### ### ###' When I click on the field that contains that mask sometimes the cursor gets me in the middle or where I click. Example: '##|# ### ###' Is there any…
-
1
votes0
answers154
viewsBind de Collection with Spring 4 and Thymeleaf
How do I submit a list when the Submit event fires in the form? The Bind of the selected value is being done correctly, but I need the list as well. HTML <select id="banks" th:field="*{bankID}"…
-
1
votes1
answer935
viewsJoin two Arraylist
I made a ArrayList (nomeTimes) which receives a number of team names as per the for down below: for(int i = 0; i<numeroTimes;i++){ String nomeTime=entrada.next(); nomeTimes.add(nomeTime); } My…
-
1
votes1
answer60
viewsError: Using 1.7 requires compiling with Android 4.4(Kitkat); Current using API 16
Using a switch case with a string. Eclipse made a mistake and offered to switch to compiling 1.7. I accepted, now it’s a mistake and I can’t go back. How do I fix it? I want to change the language…
-
1
votes0
answers133
viewsError generating Dynamic Report - No query execute Factory Registered for the 'sql' language
When I report using Dynamic report through the IDE, the report is generated perfectly. But when I report outside the IDE there is an error in the generation of it.…
-
1
votes1
answer918
viewsReturn Exception Java to Ajax
all right? I’m working on a project, and the back-end (java), is totally separated from the front-end, and they communicate through REST. I have a big question about the exceptions. For example, an…
-
1
votes2
answers156
viewsIntegrate Java application with Nagios
I am developing an application that monitors assets (air conditioners, lamps, etc.) in a certain room and the floor plan of this room is illustrated in Nagios with the assets in their proper places.…
-
1
votes1
answer1525
viewsMap columns of separate tables into a single object and vice versa
Situation 1 I have the following tables, very simple: ....................... And I have the following classes: Client: @Entity public class Cliente implements Serializable { private static final…
-
1
votes1
answer450
viewsHow to build a jar even if the project has a build error?
I am starting the process of automating the builds of our application, and in the project there are some classes with compilation error. Despite some build errors, the application is working fine. I…
-
1
votes1
answer46
viewsError in converting text file with nodes into AVL to be used in graphical interface
The idea of generating the graphical interface will be through a python file so I have to generate a text file in the following format: 4 [2] [6] 2 [1] [3] 6 [5] [8] 1 [] [] 3 [] [] 5 [] [] 8 [7]…
javaasked 10 years ago crislanio_macedo 11