Questions tagged as 'java'

3
answers

Error: Your JAVA_HOME is invalid: C: \ Program Files \ Java \ jdk1.8.0_73

I have an error trying to compile my apk using the command ionic build android The error I think was generated when java sent the update today and stayed as half installed, the error is this: Error: Failed to run "java -version",...
asked by 28.07.2016 / 05:27
2
answers

How can I save the image of a fingerprint reader in Mysql?

I would like to save the image, (NOT the template) of a fingerprint image, the code to convert it according to the DigitalPersona manual is this: public Image CrearImagenHuella(DPFPSample sample) { return DPFPGlobal.getSampleConversionFac...
asked by 23.08.2016 / 18:43
2
answers

Using String

import java.util.Scanner; public class String { public static void main(String[] args) { Scanner sc = new Scanner (System.in); String cadena; System.out.println("Introcuce un nombre"); cadena = sc.n...
asked by 08.10.2016 / 10:30
2
answers

JSON Parser check integer is Null in Java Android

I get a JSON that sometimes the numeric fields have value or null : { duration: null } Right in the sentence: jArray.getJSONObject(id).getInt("duration"); The error occurs: W/System.err: org.json.JSONException: Value null at...
asked by 21.01.2016 / 15:53
2
answers

Calculate age using EditText and not using Calendar

How can I calculate the age (including day and month) using an EditText? Right now I do it using a Calendar, but I would like to write the date 23/01/2017 (Example) in the EditText to calculate the age. EditText that I want to use to calculat...
asked by 23.01.2017 / 16:38
2
answers

How can I take a break when writing a file on Android?

I have been having problems with writing files on Android, I need to fill out a form and then store it in a PDF or txt file, for the moment I am trying it in txt but I can not write more than one line in it, due to that when trying to write on i...
asked by 05.01.2017 / 20:31
1
answer

random numbers every so often

Does anyone know how to generate random numbers every minute? Right now I only have one for where it sends 3 data just for nothing, but it sends them instantly, and I need every minute to throw a random number at me. for(int i =0; i<3; i...
asked by 05.11.2018 / 07:02
1
answer

No Find the JDK in Ubuntu 14.04

I have a problem trying to install android Studio on Ubuntu 14.04. I get the following error:    ERROR: Cannont start Android Studio   No JDK found. Please validate either STUDIO_JDK, JDK_HOME or JAVA_HOME environment variable points to vali...
asked by 26.12.2015 / 04:25
4
answers

Copy files, change the name and move it to another folder in java

I'm doing a program in java where I want to have an order of the images that I'm working with and I want to have a copy of it, change the name and have it in a specific folder. I have the following code. JFileChooser fc = new JFileChooser();...
asked by 16.02.2017 / 20:52
1
answer

Convert int a Short

I have the code: int x: ArrayList < Short> lista; How do I convert x to Short to be able to add it to the dynamic array list by using the statement list.add     
asked by 14.02.2017 / 01:11