Questions tagged as 'java'

1
answer

How do I open a password-protected Word document?

I can usually open a .docx file in Word using desktop.open fault of java, but there is a case where I need to open the document that is password protected and Word opens asking for the same. Is there any way I can enter the password still in t...
asked by 06.01.2016 / 22:38
1
answer

Java + Database - Add Role to existing user, through Java

Use MongoDB with Java and need, through Java execute the following command in mongoDB: db.grantRolesToUser( "joao", [ {role:"dbOwner",db:"loja"} ] ) That is, I need to add a role to an existing user, and I need to specify the database. Afte...
asked by 06.01.2016 / 16:24
1
answer

Aggregation relation and class attribute

Does aggregation only occur when a A, class that aggregates a B class has an attribute of type B ? Can aggregation exist without necessarily having one attribute having the type of the other? For example, if I instantia...
asked by 16.12.2015 / 21:57
1
answer

Stop notification (ringtone)

I have an Android application that wakes up with the standard notification system ringtone. The problem is that when it clicks the notification the alarm does not stop. I use a class for notification and one with BroadcastReceiver public cl...
asked by 31.12.2015 / 11:00
1
answer

How to open JInternalFrame window after login?

I'm new to desktop java and am doing a program with swing , and would like to know how to JInternalFrame open after login is done, follow the code for analysis. if(usuarioText.getText().equals(objConexao.rs.getString("nome"))...
asked by 13.12.2015 / 16:00
1
answer

Criteria do grails

Somebody please tell me what this $ {result [0] [0]} means, why did they put two pair of brackets? def criteria = Person.createCriteria() def result = criteria.list { projections { max('age') min('age') } } println "The maximum age i...
asked by 01.01.2016 / 21:21
1
answer

Data Truncation with Hibernate

Good Night. I have a problem with persisting an object, hibernate throws an exception saying that the data is too long for the "street" column, of type String. Follow Pojos and DAO. Address @Embeddable public class Endereco implements...
asked by 07.12.2015 / 03:10
1
answer

Code review: Simple MVC

Hello world! I tried to make a very simple MVC in JavaFX. My model is a Pessoa class that has nome and idade (the idade field in case it does not get used). Two text fields represent two views. For simplicity bot...
asked by 05.06.2018 / 16:21
1
answer

Socket Multi Thread Server and its Clients talking to each other

I have a question that is killing me and I would like to share it with you, maybe someone has the answer or a way to heal that doubt. I have good experience with Web / Desktop development, API / REST connections and Socket. But all these conn...
asked by 24.05.2016 / 05:03
3
answers

Is there any way to run batch files during the build of a Maven project?

I have a .bat file that performs some prerequisites during the build of my Maven project. I want to run this .bat file automatically when I build the project I developed Is there any way to accomplish this task with Maven?     
asked by 18.02.2014 / 15:10