Questions tagged as 'java'

2
answers

Discover numbers in sequence that multiplied is a result

Today I helped my cousin solve a math exercise. The exercise called for two numbers in sequence which when multiplied the result is 16512 (128 * 129). I would like to know a code that solves this with any number.     
asked by 12.03.2017 / 23:47
1
answer

Can not find string inside an array with BufferedReader

I'm developing an application that allows the user to enter two cities and then check in an array with the existing "Cities", if the ones you enter exist. The problem is when I try to read the city that the user wants to search with the Buffe...
asked by 11.01.2017 / 13:26
2
answers

Java Spring Extender @Scheduled to read a file

I have tasks to do as soon as I upload my application, they are executed repeatedly like this: @Scheduled(fixedRate = 10000) public void scheduleFixedRateTask() { System.out.println("Fixed rate task - " + System.currentTimeMillis...
asked by 02.07.2016 / 14:35
1
answer

Integration between R and Java

I'm working on a project and I have to integrate the language R with Java . Could you help me by indicating a good library or a Hello World code that does this integration?     
asked by 12.07.2016 / 21:04
2
answers

Problem with EntityManager and JPA

I have a problem here that says entitymanager is closed ... I took a look at the net to follow the same model, but here it is wrong ... this is my entitymanager method private EntityManager getEntityManager(){ EntityManagerFactory factory...
asked by 07.07.2016 / 20:17
1
answer

No bean corresponds to the point of injection CDI

I want to implement CDI. However when I use the @Inject annotation I am notified with this warning "No bean matches the injection point" Line of code I'm notified @Inject private LancamentoDadosDao lancamentoDadosDao; DAO Class...
asked by 13.07.2016 / 19:24
2
answers

I have an error that I can not identify in println

These are my classes but the error occurs:    Exception in thread "main" java.lang.NullPointerException       at official.20.main.main (Principal.java:16)   /home/lucas/.cache/netbeans/8.1/executor-snippets/run.xml:53: Java returned: 1   BUIL...
asked by 17.11.2016 / 23:15
1
answer

Upload file inside the webapp folder

I have a Rest API with Jersey where I upload files. If I set the path to somewhere else, ex: C:\uploads works, but I would like to save these files to a directory in webapp: I'm currently doing this: @POST @Path("/anexoClient...
asked by 22.12.2016 / 19:09
1
answer

How to read from a file and save on variables in Java

I'm having a hard time, because in an exercise of manipulating files in Java, the teacher asked us to create a program that takes the name and note 1 and note 2 of two tests and store in a txt file of the following form: name, note1, nota2 only...
asked by 18.11.2016 / 13:19
1
answer

Error emulating AVD in android studio

errortryingtoemulateadeviceinandroidstudio It lets you create the device, but at the time of emulating this error, I already searched, but did not get anything related.     
asked by 19.12.2016 / 02:34