Questions tagged as 'java'

1
answer

Get selected value of JComboBox populated with Enum

I have in my window a JComboBox with items from an enum, and a JLabel to show the value of the selected item in the combo. So far so good, I can do this, but I'm a little unsure if I'm doing it right, because I do not know if th...
asked by 02.04.2016 / 16:39
1
answer

How to create JPA class from a N to N relationship

I have two tables where the relationship is ManyToMany, so I went to the database, I created a third table with the key of the other two, but at the time of generating the entities through the bank data, does not work, could anyone give me a help...
asked by 02.04.2016 / 20:20
1
answer

How to deploy a web application manually in wildfly9?

I have already deployed a web application manually in tomcat, I know it is not a complete container, but now I would like to deploy manually in wildfly9. I would like to deploy the web application manually in wildflyjá because I already tried to...
asked by 02.04.2016 / 17:12
1
answer

What would be equivalent to these two properties of persistence.xml in hibernate?

I have these two properties in eclipselink: <property name="eclipselink.logging.level.sql" value="FINE"/> <property name="eclipselink.logging.parameters" value="true"/> But I would like to see the same using hibernate ....
asked by 04.04.2016 / 01:45
1
answer

Fill textview android studio / sql server [closed]

Good malt, I'm not able to populate a textview using a sql server database. Can someone help me? Here's what I have in onCreate: connectionClass = new MainActivity(); text = (TextView) findViewById(R.id.textView4); Connection con = connection...
asked by 20.09.2016 / 22:38
2
answers

Return information from a String

I'm trying to return information from a String. What I need is to pass a String parameter and return the information it has in the indicated places. Eg: String FraseParametro = "<R1> casou com <R2>, e traiu ela com <R3>...
asked by 16.05.2016 / 17:21
1
answer

.properties file in java code

My JSF application I'm using a .properties file to store the texts, etc. I already use calling the keys inside the .xhtml file. How do I call the keys in the .java code? My Util Class: package br.com.pokemax.util; import java.util.Locale;...
asked by 21.09.2016 / 02:33
1
answer

Error connecting to MySQL

I took an example from the internet to connect with MySQL private static final String USUARIO = "root"; private static final String SENHA = "123456"; private static final String URL = "jdbc:mysql://127.0.0.1:3306/aulas"; private static final S...
asked by 17.05.2016 / 15:59
1
answer

Direct printing in Java

During execution, the below error is displayed when sending a string to printer. sun.print.PrintJobFlavorException: invalid flavor at sun.print.Win32PrintJob.print(Unknown Source) Complete code PrintService[] printServices = Pr...
asked by 20.05.2016 / 03:50
2
answers

How to receive by parameter an array of objects of another class in Java?

Hello everyone, my question is that I am trying to get an array of objects from another class, by parameter, to the class I want to put the array by parameter. The classes are: Course and Costs I have to get by parameter an array of obje...
asked by 19.03.2016 / 04:21