Questions tagged as 'java'

1
answer

How do I connect a program in java with oracle 10g?

I've tried the code below but it did not work, I'm using Oracle 10g. import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.Statement; public class AcessoBanco...
asked by 11.06.2014 / 03:17
2
answers

Java - MySQL Export and Import DB

Good afternoon. I created a DB in MySQL with Pizzaria name. I've tried several ways to create DB backup but I did not succeed. The last code I tried was: try { File file = new File("Backup"); file.mkdir(); String nomeBkp = tf...
asked by 17.06.2014 / 17:33
2
answers

Reading properties file

How do I read data from a properties file on Android? Here's my code for onCreate : protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); File...
asked by 13.06.2014 / 22:46
1
answer

How do I get foreign key values in a JFrame form

I'm creating a form in JFrame to insert data into a table that contains two foreign keys (these keys are not automatically generated). What do I have to put in the insert to get the foreign keys? public void inserir(Tratamento tratamento) {...
asked by 25.05.2014 / 16:47
1
answer

ADmob - Problems with APP Ads

I did everything as the tutorial of the ADMOB website, I placed the layout in the XML, imported the path of Google Play Sevices and added the lines of code of the tutorial, my application compiles but does not open on the smartphone, a message a...
asked by 26.05.2014 / 15:50
1
answer

Daughter entity does not receive its id after merge of the parent entity via @CascadeType

I have a problem when I add an entity to the database via Cascade. After the update of entity Aluno the Daughter entity NivelAlunoLinguaEstrangeira does not work correctly. @Entity @Table(name = "ed44_aluno") @SequenceGenerator...
asked by 24.05.2014 / 20:51
1
answer

How to add a new Runnable to an ExecutorService?

This is the first time I work with threads ...    The method below runs every 15 seconds by EJB.    I would like if in case there is an SMS list in the database it would add to a new SMS trigger thread But you are returning the following erro...
asked by 15.10.2014 / 15:44
1
answer

How to compose a Linear Layout in Activity using JAVA only

In my application it has a vertical linear layout with id: @+id/items In this layout for each item contained in a list, I would like to create another Horizontal Linear Layout called, Row containing 2 ImageButton and an EditText, an ImageBu...
asked by 16.10.2014 / 06:08
1
answer

Find value of a non-static method of the class itself, in a jfieldtextFocusLost

I have a method created by me that returns a boolean: public boolean ValidaNumero() { long valor; if(NIPCC.isFocusable()){ if (NIPCC.getText().length() != 0 ) { try { valor = Long.parseLong(NIPCC.getText());...
asked by 16.10.2014 / 11:13
1
answer

Find data from a particular column and display it in a Spinner

I'm looking for the Sqlite database records and displaying in a Spinner, however the Spinner is displaying all records in the table, and I need to display only the records of a particular column. I tried changing the query: From: String...
asked by 23.09.2014 / 17:21