Questions tagged as 'java'

0
answers

Read Java file with delimiter

I have the following txt file: 38461; Rui Brito; 34561; Rui Brito; 10 31231; Rui Brito; 6 And the following code: ArrayList<Aluno> listaAlunos = new ArrayList<Aluno>(); public void lerFicheiroPauta(String nomeFicheiro) {...
asked by 05.06.2016 / 16:16
1
answer

How can I check if a variable has been declared (development of a Java compiler)

I'm having trouble implementing a demonstration of a semantic analysis of the project. of a compiler in Java. I have a JTextArea and get by. ex write: int x; x = 'a', it should accuse error because x is an integer and not a char. I can even get...
asked by 05.06.2016 / 06:33
1
answer

How to call a class through another class using JMenuItem? [closed]

I have two classes in the same package, one called Calc, which is a simple calculator, whose code is below: public Calc(){ super("Calculadora"); Container tela = getContentPane(); setLayout(null); JLabel rotulo1 = new JLabel("1 numero: "); JL...
asked by 05.06.2016 / 23:48
1
answer

Problem with using Jaybird

I can not connect to my database using firebird jdbc. the bank is very old and I can not discard it yet, I need to at least download the list of clients and save in sqlite. The problem happens well at first, when I use: Class.forName("org.f...
asked by 02.06.2016 / 23:32
0
answers

OutOfMemoryError x loadAd (adRequest) x AdActivity

Good evening. Does anyone know the AdActivity class? And does anyone know if I can use it seamlessly with finish() ? Context acontext = null; AdActivity adActivity = (AdActivity) acontext; adActivity.finish(); I'm having...
asked by 11.07.2016 / 03:02
2
answers

Insert record in the bank inside a for using hibernate

I need help, I'm trying to create a fixed expense post. I have to insert for example 12 records in the database, through a loop inside the for. To insert the data I am using hibernate, but it only inserts a line, the 11 lines that it should i...
asked by 02.06.2016 / 22:43
0
answers

How to select a runtime class based on a RequestParam using Spring MVC?

Let's say I have the following @RestController in my code that uses Spring MVC: @RestController public class Exemplo { @RequestMapping(value = "exemplo", method = RequestMethod.GET) public InterfaceDeExemplo exemplo(@RequestParam String escol...
asked by 02.06.2016 / 12:18
0
answers

Task with parameter in vraptor-tasks

Hello, I'm using vraptor-tasks and vraptor 4 to schedule some tasks with manual scheduling. schedule.schedule(MyTask.class, trigger, "report"); Is there a way to pass a parameter to the MyTask class? Or even get the JobExecutionContext...
asked by 02.06.2016 / 16:19
0
answers

Simple error when trying to use Hibernate + JPA

Good morning, I'm starting to create a simple Hibernate database. I have the following classes Link.java link hibernate.cfg.xml link Form Action link And when you run the save it returns the following: INFO: HHH00004...
asked by 13.06.2016 / 14:40
0
answers

Two JBoss servers. It starts and the other does not. Same configuration

I have two servers that run JBoss with the same parameters for the same application. Although the log clearly states the error, I do not understand why one server works and the other does not. It starts without problems, sets the beans, but when...
asked by 23.07.2016 / 05:01