Questions tagged as 'java'

1
answer

How to use java.String.format in Scala?

I'm trying to use the .format method of a String. But if I put% 1,% 2, etc. in the string, the java.util.UnknownFormatConversionException exception is thrown by pointing to confusing Java code: private void checkText(String s) { in...
asked by 10.08.2014 / 21:14
1
answer

I can not generate the table through Hibernate

I'm trying to create tables automatically by hibernate, but I'm not succeeding. The hibernate libraries are correct. the mysql connector is referenced as well as the hibernate libraries. I believe the problem is in the GeraTabela class. I'...
asked by 12.08.2014 / 01:08
1
answer

JNLP Java Application and Database

I will start developing a client / server application and in my searches I found Java JNLP. I searched in some forums but did not find the answer to this question: Knowing that the application will have multiple clients that will work at the...
asked by 27.08.2014 / 14:16
3
answers

Demoiselle Error while deploying to JBoss

When trying to deploy the demo application, from the Demoiselle tutorials in JBoss, I get the following error: 11:34:16,873 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC00001: Failed to start service jboss.persistenceunit."in...
asked by 05.03.2015 / 15:40
2
answers

String corresponding to real number

I'm trying to check if a String x matches a real number (any). For this I created the following method: public static boolean Real(String s, int i) { boolean resp = false; // if ( i == s.length() ) { resp = true; } else if ( s.ch...
asked by 01.03.2015 / 01:25
1
answer

REST with error could not find resource for full path

I'm trying to create a very simple REST application in Java, using Tomcat 8 as the server. However, when trying to access the application: http://localhost:8080/aplicacao/rest/teste It brings me the following error: Mar 03, 2015 9:18:39 A...
asked by 03.03.2015 / 13:40
4
answers

Consume values from a webservice

I do not have any knowledge of the use of webservice , and I need to use one now to consume data from a database (Usually I would fetch the data direct from the database, but in this case the admin did not authorize, the only way was to ma...
asked by 22.07.2014 / 11:28
4
answers

Bluetooth connection Arduino and Android (Java) - InputStream storing old data

I'm making a very simple Java class just to simulate Android's communication with the Arduino via Bluetooth. The idea is as follows: The Arduino every 5 seconds will turn on and off an LED. If the LED is lit, String "1" will be sent to the se...
asked by 13.07.2014 / 18:48
1
answer

How do I display a layout in the HomeScreen Widget for each day of the week?

I would like to show a particular layout in the HomeScreen Widget for each day of the week. I have the 5 days, and when I identify them, the device should update the layout of the widget. How could I do it?     
asked by 20.02.2014 / 00:30
1
answer

Picking up TimeInMillis and using Timestamp

Doubt: I know two ways and capturing a TimeInMillis() does anyone know the difference and which one is the most efficient? What if there is a third way to capture this value? Option 1: System.out.println(Calendar.getInstance(...
asked by 28.02.2014 / 14:56