Questions tagged as 'java'

1
answer

Put local Maven project as dependency on Gradle project

I have this Maven project that has all application domain classes and logic. From there I created an external Gradle test project where I do system tests with Selenium WebDriver. To not need to add all the domain classes in my gradle project,...
asked by 13.06.2018 / 21:08
1
answer

How to read a JSON file that is inside a package?

I need to give a file in the *.JSON case. I understand that there is a library for this in case I use json-simple-1.1.1 . As it is necessary to read the file first and then work with it. My question is as follows: I keep the...
asked by 17.02.2014 / 18:35
1
answer

Unwrapping can not return an empty element?

Code taken from a Data Structure workbook. public class PilhaContig { private Item [] info; private int topo; public PilhaContig(int qte){ this.topo = 0; this.info = new Item [qte]; }...
asked by 15.05.2018 / 21:21
1
answer

JAVA - Create an instance of an object of a class?

So, I have a class called "GeraForm" that I need it to return a string in the HTML style form with some information contained in a note. I got the code to work when I pass a particular class to it, but I'd like the code, before returning the...
asked by 25.05.2018 / 16:29
4
answers

Convert Int to String

I'm trying to make a button to register the bank but I'm having trouble converting the int to String. Follow my line of code: private void jBtnCadastroActionPerformed(java.awt.event.ActionEvent evt) {...
asked by 30.05.2018 / 20:32
1
answer

You are not creating with "persist"

SEVERE: Servlet.service() for servlet [Spring MVC Dispatcher Servlet] in context with path [/cq] threw exception [Request processing failed; nested exception is javax.persistence.TransactionRequiredException: No EntityManager with actual transact...
asked by 01.06.2018 / 22:46
1
answer

Hold the image and send it to the link in Android Studio

Hold the image and send it to the link in Android Studio I use an ImageView that when it clicks it performs a function, but I would like that when the image was pressed, another action was taken, which would be different than just a simple touch...
asked by 14.09.2018 / 16:17
1
answer

TableView bring date, from the mysql database

I have a Table View, which receives the data from a table in my Bank, until then I was able to bring the data normally, but the date is coming different from the one registered at the bank, For example: The bank is: 2018-09-06 In my TableVi...
asked by 13.09.2018 / 20:02
2
answers

How to put a wait time for the code to execute?

I'm playing a little game of memory, more like learning in Java myself. I'll introduce the code and then explain the question. private void testar (ImageView img, int resultado1, int resultado2) { if(resultado1 != resultado2 && r...
asked by 10.11.2018 / 17:40
3
answers

JavaFX: Location is required

This is the main code, I'm having problems with FXMLLoader, since I tried several ways and the path is never found. package com.quixada.ufc.fbd.main; import java.util.ArrayList; import com.quixada.ufc.fbd.viewFXController.OnChangeScreen; im...
asked by 10.11.2018 / 15:51