Questions tagged as 'java'

1
answer

how to import a play framework project 2.5 for eclipse

Hello, how could I import a lay framework project into eclipse, in previous versions only the eclipse command inside the project was enough, but now the documentation is a bit confusing in that respect.     
asked by 12.03.2016 / 21:53
1
answer

Problem with SUM in NamedQuery

I have the following NamedQuery : @NamedQuery(name = "Controle.listarTotais", query = "SELECT controle.prestador, controle.tipoPrestador, SUM(controle.valorLote), SUM(controle.valorPago), SUM(controle.valorGlosa) FROM Controle controle W...
asked by 10.03.2016 / 18:44
1
answer

Simulate different timezone with Java

I developed a web application (with java) and in it I have a business rule which needs to save the user's subscription time. However I need to save 3 times: user's local timezone, global timezone, and server timezone. My problem is in testing...
asked by 10.03.2016 / 13:00
1
answer

How to call a Service through another application?

I have two applications, application 1 has several CRUDs, application 2 has several services and notifications. When trying to start the Service by application 1, this is happening:    java.lang.SecurityException: Not allowed to start serv...
asked by 07.03.2016 / 14:18
1
answer

When creating an imageView and TextView via code how to remove via code?

Well, create it that way TextView textView = new TextView(this); textView.setText("Alguma coisa"); LinearLayout linear = (LinearLayout)findViewById(R.id.layoutVertical); linear.addView(textView); and to remove I did so linear.removeView(...
asked by 05.03.2016 / 17:20
1
answer

Output Formatting

So guys, I was "futucando" in java, but I had a question. How do I format a number that is in a method? For example: Code snippet: JOptionPane.showMessageDialog(null,brand+ "Saldo atual de " +cliente1.getID()+" :" + "\n"+cliente1.getBala...
asked by 05.03.2016 / 22:42
1
answer

Convert String to Date (request.getParameter)

I have a form in JSP that performs a registration that has a date. <form method="Post" action="InserirCompromisso"> titulo : <input type="text" name="titulo" required="true"> local : <input type="...
asked by 06.03.2016 / 03:56
1
answer

Doubts with business rule between class student and class

I'm having a question in a code, I'm new to programming, if anyone can help me, I'll be grateful. The student class will receive the student's name; The class will receive a collection of students and the class name The whole process is...
asked by 11.05.2016 / 23:22
1
answer

JPA merge / persist

I have the following structure: A.class B.class C.class D.class A.class contains many B.class that contains D.class C.class contains many D.class that contains B.class Being D.class is...
asked by 11.05.2016 / 20:06
1
answer

How to put a layout for each action bar tab

The code shows an application with 2 tabs: List and register, I want to put a listview in one and one form in the other, but how do I make each one have its own xml? package com.example.diego.layoutteste; import android.support.design.wid...
asked by 16.06.2016 / 23:29