Questions tagged as 'java'

1
answer

Doubt on using Socket in java on android

I want to implement data transmission via Socket, I am trying to implement Socket.io but I do not understand the operation. I want to make communication between two android devices. I know it has the server side and the client side. But I can no...
asked by 25.06.2017 / 17:52
1
answer

Add JInternalFrame in another Class

I have JInternalFrame for budget editing, my JDesktopPane is in a class other than the class I call JInternalFrame , how to add JInternalFrame to JDesktopPane . Class Start public class Inicio { JFram...
asked by 25.06.2017 / 15:45
2
answers

Generic DAO with CDI error = can not be cast to java.lang.reflect.ParameterizedType

I'm trying to implement a generic DAO with CDI. Apparently I'm doing it right, however I'm getting the following error:    can not be cast to java.lang.reflect.ParameterizedType This error is pointing me to this line of my Repository clas...
asked by 28.06.2017 / 17:44
2
answers

JSF Redirect

I want to redirect the main page to login page so I configured faces-config.xml together with the main page below my code for you to see Code faces-config.xml <?xml version='1.0' encoding='UTF-8'?> xmlns:xsi="http://www.w3.or...
asked by 20.06.2017 / 20:32
2
answers

How to send via post in java an information for a php page?

I'm facing a problem that at the moment I do not know how to solve. Being straightforward, I'm having trouble sending through a java application the data in json for a page in php. Basically, I have a page in php that receives the data through t...
asked by 20.06.2017 / 21:43
2
answers

Error in DELETE method, to delete a data from a table

I'm trying to make a method to delete an entry from a table with Java and jsp , but it's giving 405 error. I'll append the codes. ProductDao.java: public void remove(Produto produto) { em.getTransaction().begin(); em.remove(bu...
asked by 20.06.2017 / 21:59
1
answer

Know the size of an image on Android

I'm developing an application on Android. I need to get the RGB of a particular image at 5 specific points in the image. as shown below: I am using the following code to capture the RGB of the image: int color = bitmap.getPixel(x,...
asked by 19.08.2017 / 00:29
1
answer

Identify the EOF in a DataInputStream

I'm doing a program that needs to read a binary file and go extracting some information from it, what I have so far is this: public void processarArquivo() throws Exception{ try { FileInputStream fileInputStream = new FileInputStr...
asked by 19.08.2017 / 02:01
1
answer

Web service long implementation period

I'm creating a webservice that queries in a DW these queries because they have aggregation functions and everything takes a bit more time than normal (something around 2 - 5 minutes), but the client does not wait for this query terminating it un...
asked by 22.06.2017 / 21:01
1
answer

How to use an Intent to open a PDF file by the standard android application

I have an android application, and wanted to know how do I open a PDF file that will be in Firebase in my application. I do not need it to download the file, simply an attempt where I pass the file path (in this case the link) and when clicking...
asked by 29.07.2017 / 01:50