Questions tagged as 'java'

1
answer

Know if Activity is open (BroadcastReceiver or service) [duplicate]

I would like to implement a function that can check if Activity is open, because when I receive the notification through GCM (Google Cloud Messaging) if the activity has opened it will only loads the information in it, if it has closed notify...
asked by 28.09.2016 / 22:13
1
answer

Treat InputMismatchException Calculator

I'm doing a calculator in java oo, and would like to handle this exception but I do not know how. This is the main class. public class Principal { public static void main(String[] args) { Calculadora calc = null; int...
asked by 17.11.2016 / 13:12
1
answer

How do I close a dialog when the condition is true?

How can I make a custom alertDialog close after the user activates gps? The dialog box tbm can not close while the gps condition is false, ie while it is disabled the alertDialog has to remain, but when activated the gps dialog box still remains...
asked by 05.10.2016 / 22:08
2
answers

Access JAVA web application from other machines

I'm using JAVA, JPA, with Wildfly, and primefaces. I have the link from my application link I would like other machines to access this application, I have already modified the localhost for the IP of my machine but it did not work, is there so...
asked by 07.10.2016 / 15:24
1
answer

Error com.google.android.gms in ': app: processDebugGoogleServices'

My code is giving this error:    Error: Execution failed for task ': app: processDebugGoogleServices'.   Please fix the version conflict either by updating the version of the   google-services plugin (information about the latest version is  ...
asked by 07.10.2016 / 02:59
1
answer

Android consuming web service soap

I'm developing an application to fetch on the response server, I send the ticket number and its type. But when I send the data he does not send me a return, what can I be doing wrong? package br.com.testes.webservicesoapxml; import android.os...
asked by 26.09.2016 / 21:23
1
answer

Hibernate returns many queries and overwrites my changes

Good afternoon, I'm trying to make a change in a datatable, when I click on rowEditor, the value is sent correctly, but I do not know why, many queries are being performed with hibernate. I do not know if I could explain myself correctly, but I...
asked by 12.10.2016 / 20:10
1
answer

How to update a h: form every 30 seconds JAVA WEB

I'm trying to create a dashboard showing the sellers' results on a big screen in my company. I need to timer the panel every 30 seconds so the results are always up to date. I have no idea how to do it, all help is welcome.     
asked by 26.08.2016 / 16:03
1
answer

Number of repetitions within an array

I'm trying to count how many times an element appears inside an array. ' public static void main(String[] args) { Scanner scan = new Scanner(System.in); int[] array = new int[4]; int a; for(int i = 0; i < arr...
asked by 25.08.2016 / 03:31
1
answer

Error starting Android Studio after update

Hello, I was using Android Studio normally until the IDE asked me to upgrade and that's what I did. But after the update I got the following error: " No JDK found. ". So I tried to add the following line to the aruive "studio.sh": " JAVA_HOME="...
asked by 25.08.2016 / 21:31