Questions tagged as 'java'

1
answer

What is the problem with this java class that consumes a rest service?

I have a servlet: import br.edu.ifpb.pos.model.Art; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import java.io.IOExcept...
asked by 21.12.2017 / 21:19
2
answers

Collecting data from an array

I have an exercise for college but I'm lost in my logic and how to solve it. I have to collect the results of games and set the score for each result. the winner takes 3 points, a draw guarantees 1 point and the defeat does not get any points....
asked by 05.12.2017 / 10:45
1
answer

Ajax does not return Json

Why am I no return on Ajax? It goes through the alert (over the for), but never enters the FOR. I'm not using any framework. Servlet: @Override protected void doPost(HttpServletRequest request, HttpServletResponse response)...
asked by 25.01.2018 / 23:42
1
answer

How to configure a common java project, host and run on a server [closed]

Oops, good evening, guys, with some questions about java systems running without a server. I and some friends are developing a java integration project (we receive information from a server / service, we treat it in our system and then we pas...
asked by 05.12.2017 / 03:23
1
answer

Error saving JPEG image to bank as string (base64)

I'm developing an application that has a form where the user can attach a photo next to the form. But I'm having trouble implementing this. In my APK I have already captured the image, converted to base 64 and sent via Rest to my service. publ...
asked by 05.01.2018 / 14:58
1
answer

I am creating a game, how to implement a pause menu?

I am creating a game in Android studio using the SurfaceView class that is instantiated in MainActivity and a thread that is instantiated in SurfaceView, the problem is when I turn the screen on and it goes back to the initial state, ie it does...
asked by 05.01.2018 / 18:11
1
answer

How do I allocate more memory in the app execution?

I'm developing an android Currently, when I run the APP, it starts by reserving 36.62 MB of memory. I would like it to start at the top of 50.00 MB or, when it reaches its limit, add more memory. Is there any way to set the i...
asked by 20.02.2018 / 20:58
3
answers

Obtaining a binary file and saving it again

I am doing a test with a simple code, but this one is giving error. I want to simply get the contents of a binary file which is an image (jpg), and save it again with another name. My code is this: String content = null; FileInputS...
asked by 02.12.2017 / 13:06
1
answer

Hashmap overwrites values

I'm trying to generate a hashmap (String, List Exercises) from a json: [ { "grupo":"Joelho", "nome":"joelho_1", "habilitar":"1" }, { "grupo":"Joelho", "nome":"joelho_2", "habilitar":"1" }, {...
asked by 02.12.2017 / 22:29
1
answer

Positioning Labels

I'm having trouble adding labels to different positions, relative to a field (% with%). I'd like to put a JTextField before the field, the left, and a second label below the label . Example: Itriedtousesomelayoutmanagers,...
asked by 02.12.2017 / 15:30