Questions tagged as 'java'

1
answer

How to display items from an ArrayList by a vector?

I loaded a code here, it looks like this: class Main { Lista lista = new Lista(); public static void main(String[] args) { i = 0; String[] vetorExibir; lista.exibicao(vetorExibir = new String[lista.lista.size()]...
asked by 12.04.2014 / 21:45
1
answer

Problems with Android Studio [closed]

Today I migrated to Android Studio, I was using Eclipse + ADT to develop for Android today. So I gave run in the application and gave this error:    the module can not be android library I do not understand what it is.     
asked by 21.04.2014 / 06:23
1
answer

Eventually occurs java.lang.ArrayIndexOutOfBoundsException [closed]

I made a simple algorithm for a book and there are two possible results. To test these results I have to run the program several times until Math.random () manages the possible numbers and displays the two possible results. The strange thing was...
asked by 06.04.2015 / 14:43
1
answer

Add months to a calendar without modifying the original instance

I'm implementing a system in which I wrap a specific date in a variable of type Calendar and then I need to manipulate it. I would like to take the value of a few months added: Calendar calendar = Calendar.getInstance(); calendar.add...
asked by 29.12.2018 / 04:16
1
answer

Open / Close Disk Reader (Vbs)

I'm using a code to "open / close the disk drawer" however it creates a file on the desktop and would like to sort out some other way to resolve it. package controller; import java.awt.Desktop; import java.io.File; import java.io.PrintWriter;...
asked by 31.03.2015 / 16:37
1
answer

Problem in scheduling for email notifications Spring and JavaMailSender

Good morning, I'm using spring with Scheduled, before using the quartz but as I uploaded the spring version I decided to abandon the quartz since the first option was enough to meet my need. In short, I have a task that sends emails, this...
asked by 02.01.2019 / 14:09
1
answer

Open activity when clicking on an item in a custom listview

I created a custom listview, it's all right, I've tried it here but it's not right, I wanted to implement the click on an item, but since it's custom listview maybe it's something different, public class artilheiros extends AppCompatActivity {...
asked by 27.12.2018 / 21:36
2
answers

Selected item in p: selectOneMenu gets null in listener

I have a p: selectOneMenu, with data coming from the database, inside a p: dialog, along with a p: messages and other fields. I want to execute an action (Display some messages) when selecting certain option in p: selectOneMenu, but I get a null...
asked by 02.01.2019 / 20:04
1
answer

Define JRE construction project input path for 'JavaSE-1.7'

I'm trying to make a connection to MySQL database, but when I use PreparedStatement , eclipse returns: Definir projeto de construção JRE entrada caminho para 'JavaSE-1.7 Yes, I've changed the compiler version to 1.7, but only works...
asked by 04.02.2014 / 21:23
1
answer

Is there something like fluent nhibernate for java hibernate?

I know that fluent nhibernate (hibernate version for .net) uses lambdas and that java only implemented now in version 8. But is there any way to set hibernate of java through code? and not through xml...
asked by 01.04.2014 / 20:20