Questions tagged as 'java'

2
answers

How to save images to the database using spring boot?

I'm having trouble saving images to a form. Does anyone know how to save image to mysql database using spring boot? I am now learning this technology, so with this difficulty. Form html:                           Providers             Suppli...
asked by 07.06.2018 / 13:27
1
answer

I can not insert into MongoDB using Java

I'm new to mongo, I'm trying to make an insert in the bank but it's the problem at the time of inserting import com.mongodb.BasicDBObject; import com.mongodb.DB; import com.mongodb.DBCollection; import com.mongodb.MongoClient; public clas...
asked by 20.09.2016 / 04:30
1
answer

Line wrap with br tag causes spacing in generated PDF

When converting html to pdf using flying saucer in java, the following error occurs in the pdf file; A spacing between the last sentences before the paragraph line breaks. This gives the impression that the pdf to be generated is using the fully...
asked by 29.09.2016 / 05:54
2
answers

What happens when we assign a float value to a double variable? [duplicate]

class Test { public static void main (String[] args){ double pi = 3.1415f; System.out.println(pi); } } When compiling and executing the above code, I get the return: 3.1414999961853027 This is not a question for solv...
asked by 29.08.2016 / 17:07
1
answer

Copy and write image launches java.lang.IllegalArgumentException: image == null!

I've created an algorithm to go through a directory tree and mirror its contents. The exception occurs when the program enters a directory with 400 images. It makes the copies of the images until it reaches an image around 320 and throws the fol...
asked by 21.08.2016 / 20:51
1
answer

Check click position on a ListView

I have a screen that has ListView inside it, I need to identify which line was clicked to point to the correct location. How can I do this?     
asked by 12.09.2016 / 13:47
2
answers

Loading libraries at runtime

Is there any contraindication in loading libraries .jar at runtime? I found this code that does this: URLClassLoader sysloader = (URLClassLoader) ClassLoader.getSystemClassLoader(); Class sysclass = URLClassLoader.class; try {...
asked by 28.07.2016 / 19:26
1
answer

How to prevent a certain key being sent to the program several times

I'm making a calculator for year-end activity, which even works normally, as long as it does not exceed typing. For example, if you make the sum of two fractional numbers, it sums all the sum correctly, but if you accidentally enter more than on...
asked by 23.11.2016 / 16:43
1
answer

Treat a word with period

I have a method that takes text as a parameter and makes a .split in the text separating the words with " " . For each word in the text I do a check checking if the word is equal to the item in my list of Enum , if the word is...
asked by 25.11.2016 / 00:40
1
answer

Driver mysql is not found when the application is rotated from a jar

I developed an employee registration system. In this system the persistence of the data is done in a mysql database. When I run the program through the package the system works normally, but when I run an executable jar it does not find the mysq...
asked by 25.11.2016 / 08:59