Posts by Bruno César • 5,450 points
138 posts
-
3
votes3
answers490
viewsA: Why not use an Application Container like Jboss when using Spring?
It’s a question where the answers will be based on opinions and mine is no different. I am not Shiite and have no problem using one or the other or even both when necessary so I will try to expose…
-
4
votes1
answer1362
viewsA: How to convert from Timestamp to Calendar?
It is possible in Calendar you inform the team, which receives an instance of Date. Like Timestamp is subclass of Date, you can do something like this: public static Calendar…
-
2
votes1
answer1884
viewsA: How to update a Jlabel periodically?
When working with Swing it is more recommended to use javax.swing.Timer than java.util.Timer, this why all the timers of Swing share the same thread already existing for this purpose and such thread…
-
6
votes1
answer411
viewsA: What is the Scala Collection equivalent to Concurrenthashmap?
In addition to the already constant in java, in the package java.util.concurrent, in scala we have a extension for this API, also to work with collections that are thread safe, the package…
-
0
votes1
answer1815
viewsA: Error using Javamail with Office365 account
According to the message: Could not connect to SMTP host: smtp.office365.com, port: 587; nested Exception is: javax.net.ssl.Sslexception: Unrecognized SSL message, plaintext Connection? The problem…
-
1
votes1
answer1128
viewsA: How to automatically create specific files via Maven to deploy from each container?
There are several ways to organize the project with Maven modules in order to do what you need. As already in the comments, you can use Filters, profiles, move specific files by profile, etc. I will…
-
1
votes1
answer390
viewsA: Error switching H2 application to Postgresql
As stated in the comments is still using the dialect Hibernate to the H2, how the log shows: 2015-05-31 10:56:36,415 INFO [org.hibernate.dialect.Dialect] - <HHH000400: Using dialect:…
-
2
votes1
answer588
viewsA: Wildfly - "Netty connector not found in main configuration file"
This error is due to the fact that you are referencing a non-existent Nector. By default there is no netty-connector configured, but others as http-connectors. How are you using the standalone-full,…
-
1
votes2
answers2187
viewsA: Extend findAll with custom filters
One of the ways to modify the default behavior of a Spring Data JPA method is to create another repository base implementation. In the documentation is shown as adds custom behavior to the…
-
2
votes1
answer98
viewsA: Error validating login
It’s a common mistake that you have, I believe that everyone has been through it =) In java when == is used to compare two objects it checks if both objects point to the same memory space. An…
-
12
votes3
answers11171
viewsA: How to return the ID of a record right after it is inserted?
Yes, there is a way to recover. Starting from how you recover the connection it is possible that you are using something like this to build the statement and do the Insert: final String sql =…
-
3
votes1
answer1941
viewsA: What is the setProperty method of the System class for on Android?
When you run a program you "start" a JVM instance and this instance has its own environment variables, some properties being initialized natively (native method initProperties). In the…
-
3
votes1
answer4911
viewsA: Failed to execute Goal org.apache.Maven.plugins:Maven-Compiler-plugin:2.5.1:Compile (default-Compile)
This is because to compile the code requires a JDK, not a JRE, which is what is being used for, or is in the PATH, or is the default set in your IDE. See this excerpt: tools.jar not found: C:…
-
5
votes2
answers1113
viewsA: How to retrieve specific parts/values/os from a string?
How do you need to pick up only the number after codcal a way is by using regular expressions. For example, we can use this pattern: codcal=(\d+). That is, it will "marry" in the string where it…
-
1
votes1
answer6183
viewsA: How to transform JSON into object array of a specific class, where this class has composite attributes?
Starting from the JSON presented by you and the data structure also presented in the question, if we use a standard approach like this: final Gson gson = new Gson(); final Response response =…
-
2
votes2
answers3168
viewsA: Count duplicate values in list
Starting from the posted in your question you know the duplicates so to check the frequency of each value you can use #frequency() of Collections. You said in the comments that you need to store the…
-
1
votes1
answer743
viewsA: API for viewing places on the map
The Google Places has REST Services to query places, as well as other Apis, such as Javascript. It is possible to consult by points (latitude and longitude), address and as you mentioned, to search…
-
2
votes1
answer1125
viewsA: I would like to find the distance in km between two markers how can I do?
As you ask just by the distance between two points, you can use distanceTo class Location. According to the documentation, it returns the approximate distance in meters between the two points. So,…
-
1
votes2
answers603
viewsA: Webservice returns an Array, and I’m unable to insert it into an Array<Minhaclasse>
The answer you are getting is a JSON object and not an array of objects. This error happens because an array is expected at the beginning of JSON (starting with [), once you pass as kind to…
-
4
votes1
answer580
viewsA: How to enumerate page Divs with jquery?
Only one element is listed because it exists id repeated. How are you using the #posicao, only one is returned. To list all, you can use the All Selector. There are a few ways to list, with jQuery,…
-
4
votes1
answer2475
viewsA: How to popular a Jtable using a . txt file?
First thing, avoid code generator, especially this one from Netbeans, it’s sad to work with the code generated by it. If you need some swing interfaces, consider using Window Builder in the eclipse,…
-
1
votes1
answer278
viewsA: How to view posts from a facebook page?
Facebook provides API for you to access this information. In your case, to list the feed of a fan page, there is the service /page/feed in Graph API. In this case everything in the feed is listed,…
-
2
votes1
answer87
viewsA: Error when cleaning and building: "uses unchecked or unsafe Operations."
To start, this is not an error, it is just a warning. The root cause for this warning is due to types Erasure, since ArrayList is a raw type. In your code, in fact, none of these statements are set…
-
1
votes2
answers3201
viewsA: How to display incoming variables in a Jframe?
There are many ways you can do this, apparently your problem is OO, organization of your application. Basically you need the data from mesa, prato and qtd are available on the screen object to be…
-
6
votes1
answer1486
viewsA: Jfreechart - Chart Customization Problems
I will start from what you posted in the question, then the two lines below create the graph and configure its background to the white color: final JFreeChart chart =…
-
2
votes1
answer1251
viewsA: (Eclipse) Jboss never starts
The version you are using (JBoss AS 7.1.1.Final) does not run in Java 8, actually none of the community, is a known issue for a while. See this excerpt from this thread, commented by one of the…
-
4
votes2
answers89
viewsA: Problems printing a JSON table
Your code is only generating this output: <table><tr>. As you can see, only a small part of your code was being assigned to the variable results, this why you start a for (that by itself…
-
2
votes2
answers1112
viewsA: How to select all columns of a row?
Yes, it is possible to select all columns in a row using the * even, the wildcard for all columns of the relation, apparently you are having problems in the assembly of the query. For SELECT * FROM…
-
1
votes1
answer821
viewsA: Zip more than 1 file
To avoid "breaking" the signature of compactarParaZip, you can change the subscription to a varargs, something like that: public static void compactarParaZip(final String arqSaida, final String...…
-
2
votes1
answer184
viewsA: Why is my variable null?
Its variable is null because the regular expression does not "house" anything in the examples, not even 2kb worked around here. It does not match any part of the input because it is not a valid…
-
2
votes1
answer173
viewsA: Problems with new in Java
In this example you are trying to create an instance of PainelNivel and calling to this instance the method setVisible. I’ve done the same procedure in the Netbeans "Jframe Builder" and it worked.…
-
1
votes1
answer76
viewsA: Error importing JDOM
For the package org.jdom you will need an older version of JDOM. See in the image below for the version 2.0.6 there is no package org.jdom, but org.jdom2: The version 1.1.3 was the most recent I…
javaanswered Bruno César 5,450 -
5
votes2
answers400
viewsQ: Compatibility, legality and possible problems with the open source license change
I made Fork of a free code software currently available under the LPG V2. Such a license has some obstacles, so I’m looking for ways to update the fruit of Fork to be more "fair". The fruit product…
licenseasked Bruno César 5,450 -
0
votes1
answer1199
viewsA: When I use an "Endpoint" class to publish a Web Service, where is the WSDL created?
Hence the question: if I can access it, it is physically located somewhere on my computer, but... WHERE? It is not true that if you are accessing some resource it necessarily needs to be physical…
-
2
votes2
answers130
viewsA: What is the equivalent of a functional specification for games?
Like everything in software engineering the answer is depends on rs No silver bullet, as you said Brooks, then there is no "equivalences", why these practices/documents you quoted are not exclusive…
-
6
votes2
answers226
viewsA: Why does Value in Spring MVC need an asterisk?
Well, let’s go by part. Why do I need to put * in value when there’s nothing left? Actually it doesn’t. You can just leave planilha/ OR planilha, for example. A POST call in…
-
5
votes1
answer812
viewsA: Capture Accent Words with Scanner
By instantiating your Scanner you can inform the charset you want to use. So consider using something like this: Scanner sc = new Scanner(System.in, "UTF-8"); The line above is an example, you must…
javaanswered Bruno César 5,450 -
5
votes2
answers3824
viewsA: What is the best way to save files, Bank or File System?
The question seems to be off-topic, because it is too broad and even based on personal opinions, there is nothing "exact". Even so I will share an experience that I had, besides mentioning some…