Questions tagged as 'java'

1
answer

java.lang.IllegalArgumentException error in Hibernate when working with enum

Take a look at the error message: jun 02, 2015 5:23:57 PM com.sun.faces.lifecycle.ApplyRequestValuesPhase execute ADVERTÊNCIA: /WEB-INF/template/pedidos/CapaPedido.xhtml @29,99 completeMethod="#{cadastroPedidoBean.completarCliente}": java.lang...
asked by 02.06.2015 / 22:28
1
answer

Identify Java version of JDK

I am creating an IDE and when the user presses to run the code I do the following: try { File file = new File(arquivoSelecionado.nome); try { FileWriter fw = new FileWriter(file); fw.append(code.getText()); fw...
asked by 30.05.2018 / 05:58
1
answer

PUT and DELETE Methods with HttpStream?

Does anyone know if I can use HttpStream with methods PUT and / or DELETE ? HttpStream.Options options = new HttpStream.Options(); options.setCharsetEncoding(HttpStream.Options.CHARSET_UTF8); options.httpType = HttpStream.G...
asked by 16.06.2017 / 21:29
1
answer

Is it possible to know how many clients are connected to ServerSocket?

How do I see how many clients are connected in my ServerSocket in java?     
asked by 28.12.2014 / 16:47
1
answer

How do you evaluate expressions in Java?

Reading some references was possible understand the basics, but not enough to decipher the following code: public class Expression { public static void main(String[] args) { int s = 5; s += s + mx(s) + ++s + s; }...
asked by 29.03.2017 / 02:51
1
answer

It is possible to determine the access path for the file in Function

I have a 'Java WEB' application where I am using a function that opens the .pdf file I determine, however it only opens .pdf that are in the same folder where my project is saved, I have already tried to change my String variable th...
asked by 23.09.2016 / 16:06
1
answer

Problem reading a very large .xlsx file in Java

I'm working on a web application using Java, where I have a method that should read a .xlsx file using apache-poi : public static void xlsx(String arquivo) throws IOException{ try { FileInputStream file = new FileInputStream(n...
asked by 31.07.2014 / 16:56
1
answer

Sorting HashMap by value and assigning a value using java 8

I currently have the following functional scenario: A list of the Studios class with id and name: List<Studios> studios; I count repeated names in List as follows: Map<String, Integer> counts = new HashMap<...
asked by 21.09.2018 / 14:41
2
answers

Error executing the cordova build command

I'm running the command build cordova (after finishing the settings exemplified at this link: PhoneGap The Command-Line Interface ). But Node.js returns this error:    Generating config.xml from defaults for platform "android"   P...
asked by 19.02.2014 / 15:34
1
answer

Draw route above the street on the map

I have a feature that captures gps positions every 10 seconds. Every 30 seconds or if there is a 20-degree change in bearing (I compare the last position with the current one) I store to send to the service. After, the user can vi...
asked by 01.09.2016 / 15:02