Questions tagged as 'java-8'

1
answer

How to use Consumer in a variable (Java 8)

I created a data structure of my own for a game Text Adventure, and in it each Action object has a Consumer.  The next step would be to have someone type a word, scroll through the structure, and find an Action containing the String typed in a v...
asked by 01.12.2014 / 00:01
0
answers

External static methods not being recognized in the project

I'm importing a utility library into my main project, the library currently contains a single static method, I can import both manually and maven, but I'm not able to access the static library method. I'm using Spring boot, maven and JDK 1.8 in...
asked by 26.11.2018 / 13:02
0
answers

Print with Java with printer configured by IP

Well I needed to solve a problem that is, as the software will run in the cloud, I was thinking of sending the information to the printer through it configured by IP on the machine, I already configured it in Windows but found no example right o...
asked by 22.02.2018 / 04:50
0
answers

the type of "OBJECT" is erroneous

I'm studying competition, and I was trying to make a code using semaphore , and this error occurred    "the type of ProcessorThread (int, Semaphore) is erroneous" When I tried to run. I'm using NetBeansIDE, and I wonder what this erro...
asked by 18.07.2017 / 02:24
0
answers

Convert docx file to pdf without losing formatting?

I'm doing the conversion from a docx file to pdf using the Docx4J API, however I'm finding it difficult to keep the original text formatting after conversion. Dependencies: <!-- docx4j --> <dependency> <groupId>...
asked by 12.05.2016 / 20:35
2
answers

How to divide a number stored in a string and check if it is divisible by 495?

For example a number that does not fit into a int and I store it in a String . How do I see if it is divisible by 495?     
asked by 09.10.2016 / 12:36
1
answer

How to run a program in java daily at a certain time automatically [duplicate]

Hello, I need to run a program in java daily at a certain time, I found some things about timer.schedule, but I'd like to see some examples, thanks!     
asked by 16.10.2015 / 14:31
2
answers

How to convert json to object and put in a system.out.println?

I have the following code that returns a JSON: import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.net.URL; import java.net.URLConnection; import classes_json.JSONObject; class Connection...
asked by 26.08.2017 / 16:55
2
answers

Stream Manipulation (Java 8)

Hi, I have a String Stream with many lines of a txt, I need to do a split to break the lines in the pipes, but the return as you know is a String vector, to know if this is possible: Stream<String> linhas=Files.lines(caminho,StandardChar...
asked by 02.03.2017 / 15:51
1
answer

Error trying to use ArrayList methods (unrecognized symbol)

IsimplycannotuseanyArrayListclassmethod(italwaysgivescompilationerror)andIhavenoideawhy.AmImakingasyntaxerror?Ididnotgetanyanswersbysearchingtheinternet.Itookpicturestodemonstrateexactlytheproblem.It'sasifhedoesnotrecognizethe"." The commen...
asked by 20.01.2017 / 20:56