Questions tagged as 'java'

1
answer

MergeSort, logic problem

Gentlemen, I'm having a problem with my MergeSort sorting algorithm, I feel the problem is in logic. Merge Code: static void mergesort(int[] x,int inicio,int fim){ if(inicio<fim){ int meio; meio=((inicio+f...
asked by 04.11.2017 / 03:37
1
answer

Run Ubuntu JNLP

My current version of java is as follows: openjdk version "1.8.0_131" OpenJDK Runtime Environment (build 1.8.0_131-8u131-b11-2ubuntu1.16.04.3-b11) OpenJDK 64-Bit Server VM (build 25.131-b11, mixed mode) But I can not execute a file .jnl...
asked by 19.10.2017 / 14:31
1
answer

onSpinWait Java 9

I'm porting a Java 8 to 9 application, I have some processes that use the Watchdog concept, which use something similar to: public synchronized void run() { until = System.currentTimeMillis() + watchdogParam.getTimeout(); while (!can...
asked by 24.10.2017 / 19:15
2
answers

When adding system function does not compile [closed]

I have the following class: package br.com.xti.ouvidoria.helper; import java.util.Collection; /** * @author Samuel Correia Guimarães */ public class ValidacaoHelper { /** * @param obj * objeto a ser validado...
asked by 15.09.2017 / 20:28
1
answer

How to calculate the use of a football team in a championship?

I want to do a calculation of average use of a football team in a certain championship, for example, my team played two matches and won one. He would have 3 points from 6 points and a 50% advantage. public final class Time { private String...
asked by 11.08.2017 / 00:02
1
answer

How does the process of accessing a database work?

I started to study database and to access a certain database with JDBC you need a driver for each DBMS (MySQL, SQL Server, Oracle), and access is done on disk, but since this process is done? Does DBMS work constantly or only activated when a qu...
asked by 09.08.2017 / 00:57
2
answers

Save a page from an HTMLPage (java)

I have a method that generates an HtmlPage, I would like to save to disk. public void gerarPaginaIndex() { try { final HtmlPage paginaIndex = WebClientFactory.getInstance().getPage(URL_INICIAL); this.criarPaginaEmDisco(pagi...
asked by 25.09.2017 / 13:58
2
answers

Put vectors in order. JAVA

I need to put 5 pesos in order from the smallest to the largest. Defining numbers first, for example: int vet [] = {3,4,2,8,7,1}; it runs right, but I need to do it this way: int vet [] = new int [5]; this way he is only taking 3 numbers as show...
asked by 13.08.2017 / 06:43
2
answers

How to restart an Activity?

I want to restart my activity without the help of buttons, I want it to restart automatically in a while. How do I do this?     
asked by 15.08.2017 / 07:27
1
answer

Java program does not find jasper report path

I did a small program in java to generate budget reports, I used jasper Ireport to do so, I did, I tested, it generated budgets everything working on my computer. When I installed it on a friend's computer it worked fine except for the reports,...
asked by 16.08.2017 / 05:21