Questions tagged as 'java'

3
answers

Collect several exceptions from a try / catch in Java

I have a try/catch in my code. Inside the try I have different validations, each one throws an exception type that in turn extends the "general exception" parent class: GENERAL EXCEPTION public abstract class GeneralException exten...
asked by 04.12.2018 / 15:15
1
answer

Best way to modify (update) an object with Spring and Hibernate in this scenario?

I do not know how to move forward with this, to see if someone gives me a hand:) In the modal that I see in the image several loaded credentials will appear. Each credential can be edited or deleted and I'm having architectural problems...
asked by 03.12.2018 / 15:00
2
answers

Error printing XML created in Java

Good morning, I am developing a program that through classes I can generate an XML, this is my code, which DOES NOT have any error, I do not mark error in any line. (I'm developing with xstream bookstores) Book package ejemplo.xstream; publ...
asked by 29.11.2018 / 18:23
1
answer

Where are the Java Logs stored? How can I choose where?

I imagine that there must be a default route where the Logs are saved when using the Java Logger. My questions are two:    1) What is that default route?       2) How do I specify a different one? I am not using any external library (log...
asked by 08.08.2018 / 22:56
2
answers

How to do to show the accents from a javascript file?

I have a jsp in which it is sent to call a javascript file in the following way <script type="text/javascript" src="<c:url value="/webresorces/js/validacion.js" />"></script> The file js contains the validations...
asked by 12.07.2018 / 06:03
1
answer

"Syntax error on token" else ", delete this token"

Hi, I'm new to java and I've made this code, but in the token else I get the error "Syntax error on token" else ", delete this token", I do not know if someone can help me Code: @EventHandler(priority = EventPriority.HIGH) public boolean on...
asked by 15.07.2018 / 02:06
1
answer

How to read Json from a Java file with JSON Simple library?

I have the following code that throws me an error at runtime and I do not know where the problem is: THE ERROR:    Exception reading configuration file java.lang.ClassCastException: org.json.simple.JSONObject can not be   cast to org.json....
asked by 16.07.2018 / 22:35
2
answers

How to validate Date?

Good morning, The next thing is, I have a Date class that handles day, month, year, as a whole, each one, and in that class, a method that is ValidateDate. The question is that the date is entered by keyboard in the main method and it is rece...
asked by 21.06.2018 / 08:54
3
answers

Delete repeated components java

I am trying to add to a new list the components that are not repeated from the original list. I have made this code but it does not work. If someone can help me ... public static <E> IndexedList<E> deleteRepeated(IndexedList<E&g...
asked by 17.09.2018 / 19:27
1
answer

How to free java memory in a thread

I am working on a Java application, it must transfer information from one database to another in a certain time interval. Currently works with an infinite cycle within a thread, because the user needs to open the application and it does not stop...
asked by 04.07.2018 / 23:51