Questions tagged as 'java'

2
answers

Control of high demand stock with firebird and / or mongodb

I'm thinking of migrating my ERP (currently in Java) from a relational database (currently in Firebird) to a NoSQL (probably MongoDB). I am planning and trying to anticipate possible problems. The goal is to build a control that will never let t...
asked by 15.01.2018 / 16:30
1
answer

FileUpload does not load the listener in JSF 2.2

I am migrating a project to JEE7 from PrimeFaces 3.5 to 5.0 and I have a problem with FileUpload. It does not load the file in the JSF 2.2 event listener. Follow the xhtml code: <p:fileUpload id="import" value="#{fileBean.file}" mode="si...
asked by 08.05.2017 / 22:21
2
answers

Replace part of string with drawable or image

I get the database a string in formarto "text text text ??? text text" and I need to transform the "???" in an image or some character, the ideal would be an image or drawable that I can customize better. From what I've seen, replace only works...
asked by 15.01.2018 / 13:17
3
answers

javac command with more than one packaged class

I have 3 classes in the com\scja\exam\planetas package. I also have a class with method main in package com\scja\exam\teste , responsible to print the name of the planets. I need to compile this code via the command line,...
asked by 22.02.2017 / 10:09
1
answer

JDBC - Execute a query and use its return as a parameter to another query

I am learning to program in java, alone with the help of tutorials and I am trying to do a procedure where the result of a query will be a where clause for a second query. In the example below, I have a connection that performs a query...
asked by 14.02.2017 / 22:40
1
answer

Stackoverflow in quick sort

I'm having a problem here in this code. These are functions for an array of objects using the quick sort algorithm, and I'm having the Stackoverflow error, and I can not identify the source. Someone help me to identify the source of the error?...
asked by 06.07.2017 / 01:40
1
answer

How to calculate the logarithm of a number in any base in java?

I would like to know how to calculate the logarithm of a number in base 2 and on any other basis. I know that in java you can calculate the logarithm of a number in base 10 using the Math.log10 function, but I do not know how to calculate...
asked by 06.07.2017 / 22:11
1
answer

How to find out the JVM port in linux?

I have linux server running a JRE 1.7 and I need to use VisualVM to monitor the performance of the applications running on it. VisualVM uses JMX to connect to the linux host but it expects something like <hostname>:<port> At...
asked by 05.07.2017 / 14:18
1
answer

How to group similar objects

I hit my head and could not find a logic to do that. Well, I have a list of objects (Police): List and these objects have several properties, such as: organization, year, context and others. What I need is to pass this list by one method and...
asked by 19.10.2015 / 06:30
1
answer

Create JFrame with label?

How to create a JFrame , which contains a JLabel with text, and can be positioned anywhere in the frame. I need this label to stay anywhere in the frame area.     
asked by 31.10.2016 / 01:31