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
answer76
viewsHow to handle a JSON with fasterXML in java?
I have a json that comes from the bank Mongodb, I have to take and manipulate the json using fasterXml. I will have to take the names of the json properties and separate them with dot(.) instead of…
-
0
votes1
answer361
viewsHow to pass the value of a variable from one local class to another class (outside its scope and with public visibility)?
Good night. I’m having a hard time using the value of a variable in a local class and passing it to another class that will be loaded on Intent. The value of the string is exiting null and gives…
-
0
votes1
answer48
viewsDeploy to Heroku after reinstalling Ubuntu
Good afternoon! I had to reinstall Ubuntu on my machine, and that’s why I was deploying it to Heroku. But now that I’ve reinstalled everything I can’t deploy anymore. I cloned the git project and…
-
0
votes2
answers1239
viewsPagination with spring date
I have a list of clients per seller and am trying to create a pagination to show 10 and 10 clients in my modal in PHP. If anyone can help me thank you, because I’m still not good at spring date.…
-
0
votes1
answer119
viewsFind current location
I am developing an application where I need to remove the current location of the user, the problem is that the code I developed returnsme the last coordinates existing on the device and I only…
-
0
votes1
answer129
viewsHow to use an arithmetic signal to separate one value from another in a mathematical string?
I’m developing a calculator that, at the end of the code, performs a function called mostrarResultado(), this function receives the campoTexto from the screen, Ex:("2+3"), and I want whatever the…
-
0
votes1
answer27
viewsDo not add to database when some value is null
How do I not add to the database when the String dia is null ? Code : public boolean insertData(String disciplina,String sala,String dia,String hora){ ContentValues values = new ContentValues();…
-
0
votes1
answer79
viewsPermanent service in background
How to run a permanent service in the background. For example I want my app to run this method over and over again : public void addToCalendar(){ myDB = CustomApplication.getDatabaseHelper();…
-
0
votes1
answer120
viewsWhy does the app close when I start Activity?
I have in my onClick method the button to open the Activity within the Registersreadyoactivity, as follows. Bundle args = new Bundle(); Intent i = new Intent(CadastroProntuarioActivity.this,…
-
0
votes0
answers229
viewsAutomatically update an object on other pages without reloading
Good afternoon! I would like to know how I can update an object in my view without having to reload the page. For example, on the main page of the system, I have 3 panels that shows the amount of…
-
0
votes0
answers270
viewsAngularjs + (Spring MVC or Specification)
Galley, I’m starting the development of a system (java), and I’m having doubts about the technology. The system is totally restricted (login/password) and will be made available on the internet, so…
-
0
votes0
answers282
viewsEclipse run problem
I was trying to fix a problem in my Java, in Run. When I tried to run Run again (since I hadn’t changed anything yet, I had only opened the Run settings) gave the following problem:…
-
0
votes1
answer93
viewsHow to include several Radiobutton?
I was interested in making an APP with 30 personality profile questions, where each question will have two choices. I thought of using the RadioButton, but as there are 30 questions I would not like…
-
0
votes0
answers122
viewsPerform action by clicking a button on another tab
I have two tabbed activity,I need a program to execute a code snippet whenever a button is clicked on another tab, but this excerpt cannot be Static! How do I do it? Here is the code that has to be…
-
0
votes2
answers161
viewsJava - parseint()
public void OK(View v) { EditText editTextView = (EditText) findViewById(R.id.editTextView); String myEditValue = editTextView.getText().toString(); int equação = Integer.parseInt(myEditValue);…
-
0
votes1
answer77
viewsTransform Curl http://IP:PORT/sendLocalEvent? eventName=_event into Javafx
I would like to make an app in javafx , when you press a button sends a command like: curl http://IP:PORTA/sendLocalEvent?eventName=_evento to a server on the same network to start the _event event.…
-
0
votes1
answer144
viewsJavax/persistence/Persistence problem using JPA with CXF
I am facing an error when I try to consume a web service that is using JPA(Eclipse-link) to insert data into the database. Classes Entity : @Entity @Table(name = "gato") public class GatoPersistente…
-
0
votes1
answer79
viewsNullpointerexception/ Button findViewById
Guys I have a problem with this code: every time I put: 'Button botao = (Button) findViewById(R.id.botao_id);' It stops working, no longer runs on my phone. And if I take this code ( and the things…
-
0
votes0
answers30
viewsHow to use JSON in Java
Hello, I wanted to know how to use JSON files, in the Java language, because I need to use them as a database. I just wanted to know how to read and write, that’s all.
-
0
votes2
answers161
viewsHow to create an ID to be used in other classes
My app will get to the first screen of the user ID, how do I use it in other activities unseen intent ?
-
0
votes1
answer374
viewsHow to change the blue/red color of an edited field
I have the following screen : https://snag.gy/wmPBpM.jpg How can I change the field of the list, previsao1 so that it turns red or blue as I edit it and save by changing its value. Follow the xhtml.…
-
0
votes1
answer103
viewsHow to stop Handler inside an asynctask
I have the following asynctask, which contains an Handler inside it, but when I leave Activity I close the async but sometimes Handler keeps calling the async after it’s closed. No crash in the…
-
0
votes1
answer581
viewsDeserialize JSON with dynamic field names
I have a Json like this, and within the entity "purchase", I receive an object with the purchase id, and then the information I need to access, I have already generated the classes, however my…
-
0
votes1
answer2564
viewsDoes anyone know how I can Scroll in Selenium Webdriver in JAVA
Code: WebElement emailsecundario = driver.findElement(By.id("RecoveryEmailAddress")); emailsecundario.sendKeys(" [email protected]"); WebElement gravar = driver.findElement(By.id("submitbutton"));…
-
0
votes0
answers223
viewsForm inside modal window does not align + Thymeleaf + Spring Boot
Good afternoon! I’m having trouble rendering a modal window using Thymeleaf. The purpose of Modal is simply to show a form with the details of the Service, without having to redirect the user to…
-
0
votes1
answer436
viewsExtract information from a text using regular expression
Good afternoon, everyone. I am developing a regular expression to extract information from a text. I want to get just one paragraph. The pattern of the text I’m extracting is: it always starts with…
javaasked 8 years, 8 months ago helciodasilva 118 -
0
votes1
answer216
viewsInsert with "for" into a chained list
I have a question, the teacher asked to insert elements in the chained list using the "for" but I’m having difficulty, the Class that creates the node is already working perfectly and the part that…
-
0
votes1
answer330
viewsJobscheduler to run every x hours
I need to run an api access in an interval of hours, for example every 3 hours. I was looking for ways to do this, I read about Alarmmanager and about this Jobscheduler that seems to be the latest.…
-
0
votes1
answer90
viewsListview lines disappear when scrolling
I’m wearing a listview and populate it with a cursoradapter. When scrolling up and down the lines disappear. If I start with 30 elements, as I scroll up and down I get less... until I get more or…
-
0
votes1
answer124
viewsError generating jar project
I wanted to generate a JAR of the project I made in Maven(simple). But it generates this error. Why generated this error? [INFO] --- maven-war-plugin:2.2:war (default-war) @ teste-MODEL --- [INFO]…
-
0
votes2
answers29
views(Java, Android) Button - Set Click’s limit
Good, can someone tell me how to set a limit to the number of clicks on a button, and when you reach that limit, prevent the button from being clicked again? Here it is: public void N1(View v) {…
-
0
votes1
answer2008
viewsRecover WSDL from Webservice Nfe ASMX
How I recover the WSDL from this service: https://nfe.fazenda.sp.gov.br/ws/recepcaoevento.asmx I need the WSDL to add it through Netbeans, there I can only add the WSDL and this is final asmx. EDIT:…
-
0
votes0
answers40
viewsHow to remove accents in Java
I have a text (paragraph) that contains some words to use accents, for example: ne ebé, oinsá, ne ebá toallã, liña,etc. How can I remove these accents in the Java language?
-
0
votes1
answer732
viewsMemory reserved for Tomcat
My system is on a server that has several Tomcats, I need to disable the Tomcat that has more memory reserved for it. How I see the memory reserved for each Tomcat on the server?
-
0
votes1
answer43
viewsBest Language/Library for manipulating impressions
Here in the company I work, we have a system in Clipper+PCL that makes the monthly impressions, with it we manage tray and control front and back. However it is becoming more difficult to maintain…
-
0
votes1
answer348
viewsForbbiden 403 - Redirect
To display an error message when I receive a 403 error, I would like the error message to be set via an HTML page created by me. Do you have a way to redirect? Using Angularjs or Spring itself? I’m…
-
0
votes1
answer2105
viewsPass more than one parameter through the URL
I have the following code: public interface service { @GET("?acao=R&tipo_refeicao={tipo}&data={data}") public void getCardapio( Callback<List<Cardapio>>…
-
0
votes1
answer104
viewsHow do I write the external data entry command in Java?
I migrated from C to Java and would like to know which command allows the user to enter external data and what would this command look like in code. In language in C use the code below:…
-
0
votes1
answer1023
views -
0
votes1
answer263
viewsError in file upload to Java Controller using Angular
Opa, I am implementing a file upload, in a form, I can already select the file, pass to Angularjs that recognizes it (even without ng-model) and when I pass to my java controller gives the following…
-
0
votes1
answer177
viewsAndroid Studio Scrollview - Is there any way to modify the size via code?
The question is this... I have a Vertical Scrollview with 20 buttons positioned in 5x2 view, when I use the scroll I see the other 10 buttons that are hidden, but these buttons are invisible if I do…
-
0
votes0
answers31
viewsError using javac in command prompt
I did the procedures in the environment variables but the javac command does not work.…
javaasked 7 years, 2 months ago Lucas Chaves 1 -
0
votes1
answer70
viewsjava.lang.Unsupportedoperationexception: Can’t Convert to Dimension: type=0x12
<?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" …
-
0
votes1
answer238
viewsAdd a lower menu
I would like to do a lower menu in my java application, to put time and run time or even some part of configuration even. I already have one JMenuBar at the top. that’s my code. package tela; import…
-
0
votes2
answers339
viewsSwipe Refresh in Textview
I wonder if there is any way to implement a refresh Swipe in android studio to update only a textview when triggering? I’m using android studio, Activity has only a two text view at the top static…
-
0
votes1
answer50
viewsSSL failure on GET request with Httpbuilder Groovy
I can’t make a requisition GET on the following link using Httpbuilder from Groovy: https://sistema.planassiste.mpu.mp.br/producao/login.aspx I have tested the method below: ignoreSSLIssues() But…
-
0
votes1
answer46
viewsAndroid and Stream Java 8
Gentlemen I made a simple code to filter a list by passing the id and the goal would be to return an object. To make use of the stream configured the libs annimon:stream and retrolamba, I would like…
-
0
votes0
answers118
viewsHow to call a class via a Menu
I have the following class below, where the side menu calls are, only what I want to do, if I implement all the menus in this class the project will get too big, and I wanted each menu to call a…
-
0
votes0
answers85
viewsJava EE server error on Jboss server
Hello. I did a project in Netbeans on a computer and it works fine, but when I try to run the same project on another computer it returns this error: Implantando…
-
0
votes0
answers93
viewsIs it possible to use the SDK and NDK with Android Studio?
Good night! I have an app I made using the SDK. However, there was a need to use NDK in order to be able to use some ready-made functions already existing in C/C++. How does it work in this case? I…