Questions tagged as 'java'

1
answer

Set timeout on thread execution and save return value

Hello, I have a web service, with a backend in java 7. At some point, the backend makes an RPC call in broadcast to N servers that are listening. But there is no pre-defined timeout on the call, I have no way to control the response time of...
asked by 12.10.2017 / 00:04
2
answers

bootstrapValidator.js with jsf does not work

My validation script using bootstrapValidator.js <h:outputScript library="primefaces" name="jquery/jquery.js" target="head" /> <h:outputScript library="primefaces" name="jquery/jquery-plugins.js" target="head" /> <script ty...
asked by 08.11.2016 / 15:10
1
answer

How to create TableCellRenderer for strings?

I wanted to know how to do a TableCellRenderer for strings. in this topic here:
asked by 05.11.2016 / 18:17
2
answers

LinearLayout dimensions, defined in java, do not maintain proportionality between resolutions

I have a View in which I am programmatically defining its width and width in this way: LinearLayout.LayoutParams params = (LinearLayout.LayoutParams) linear.getLayoutParams(); params.height = 50; params.width = 50; linear.setLayoutParam...
asked by 25.11.2016 / 01:52
2
answers

Save Image with better resolution

Hello, I'm saving images to the database. But the resolution is very bad. I'm using the following: btncamera.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { tirarfoto();...
asked by 29.11.2016 / 05:31
1
answer

How to access variables of another class of objects by array?

I have 2 Classes, which are: Path and Costs . Path : public double getKmPercorrida() { return kmPercorrida; } public void setKmPercorrida(double kmPercorrida) { this.kmPercorrida = kmPercorrida; } public double getValorCombustiv...
asked by 09.12.2016 / 02:47
1
answer

Setting up port on tomcat

I'm developing various services and these run on port 8080 by tomcat. As the next services to be generated are not related to the services that have already been generated, the port was requested to be modified. I found the class Tomcat...
asked by 11.10.2016 / 16:58
1
answer

NullPointerException when trying to get Java compiler instance

Next, I'm trying to get a Java compiler instance through the following code: JavaCompiler compiler = ToolProvider.getSystemJavaCompiler(); if (compiler == null) { System.out.println("No compiler"); return; } The problem is that it...
asked by 05.10.2016 / 00:43
1
answer

What is the Java stack class growth policy?

I'm doing work on different stacks and what I'm studying, increases its size to double when we introduce the (2 ^ n +) 1 element. But what is the growth policy of java.util.Stack and java.util.Array?     
asked by 14.04.2017 / 17:24
1
answer

How to read objects from an XML?

I have an XML like this: <?xml version="1.0" encoding="UTF-8"?> <java version="1.8.0_101" class="java.beans.XMLDecoder"> <object class="java.util.ArrayList"> <void method="add"> <object class="modelo.Aluno">...
asked by 09.11.2016 / 22:58