Questions tagged as 'java'

2
answers

Place default value in column

I need to leave a default value in this table column, I'm mapping the persistencies with Hibernate (summarizing the database is created according to the HQL / JPA that I define in domains. How do I set a default value for the column? @NotEm...
asked by 18.10.2016 / 18:17
1
answer

Working with associative tables

I want to add to a table the users who have registered a team. So that in future you can list all the teams of a certain user. But I have the following problem: In my persona_time table I can not get the id of who is creating the team nor the...
asked by 04.07.2016 / 18:20
1
answer

How in the xhtml commandButton to identify that an error was generated in Dao and keep navigation on the same page?

In the xhtml page on a commandButton I call the action confirm () to confirm the recording of an object. The return of this method is a string directing to a new page. <p:commandButton id="botaoSalvar" value="Confirma" update="msgs" action=...
asked by 04.07.2016 / 15:12
1
answer

Error assigning object to another class

In the code it moves the values of the employees with the first value entered and ignores the others. for(int i=0; i<3; i++) { Empregados f = new Empregados(); System.out.println("Qual é o salario do " + (i+1) + " e...
asked by 05.07.2016 / 01:25
1
answer

Example.java is not found [closed]

I saved the Example.java in the Documents folder, I used the cmd in the javac directory, but when running javac it does not find Example.java     
asked by 30.06.2016 / 12:34
1
answer

Link two classes

Hello, everyone! I'm developing a college job which is a mini banking system with Java SE and I'm using Swing for interface. I have a bit of trouble with the OO paradigm and wanted to know how I can relate a client class to a class account. I...
asked by 30.06.2016 / 00:35
1
answer

Error in code for popular JList with file names of a folder

I can not pass a method to get the name of the files in a folder. I have the following code: inicializar.addWindowListener(new WindowListener(){ @Override public void windowOpened(WindowEvent arg0){ DefaultListMod...
asked by 29.06.2016 / 07:18
1
answer

Uploading Websocket file

I need to create a conversation channel for a system, this channel should allow receiving and sending files (docs, xls, png, etc ...), I searched a lot on the internet and did not find many examples, but I found one that I'm trying implement, wh...
asked by 08.08.2016 / 13:28
1
answer

JDBC connection to the AZURE server with SSL encryption

I'm having trouble connecting via JDBC to AZURE's SQLServer database using encryption. My connection string is as follows: jdbc:sqlserver://servidor.database.windows.net:1433; Database=BASE_DE_DADOS; User=Usuario@servidor; password=senha; T...
asked by 01.07.2016 / 20:50
1
answer

Go back to another activity and pass parameters

I'm having a problem adding items to a ListView , I have a activity main that calls another to add the met package com.example.jonathan.agendaonline; import android.content.Intent; import android.support.v7.app.AppCompatActivity; impor...
asked by 24.11.2016 / 01:19