All Questions
313 questions
0
votes
0
answers
13
views
Runnable jar file "A Java exception has occurred" [duplicate]
I recently got back into Java. Just installed Eclipse 2024-03 as well as 1.8.0_411. Coded a simple program that just opens a 500x500 pixels JFrame and closes when that frame is closed. Using JRE 17.
...
-1
votes
1
answer
61
views
Error inserting image icon in java - IllegalArgumentException
I'm developing a java project for a university exam. The project involves the creation of an application with the JDBC methodology. The project is almost finished, I was dedicating myself to the ...
0
votes
1
answer
70
views
Eclipse/Java not stopping on exception, not showing stacktrace
For some reason, Eclipse for Java stopped showing the stacktrace on exceptions nor is Eclipse stopping on exceptions while in debug. I installed (not upgrade) the latest Eclipse 2023-03 (4.27.0) and ...
-1
votes
3
answers
102
views
Unreachble catch block java exercise
I'm doing some java exercise for an exam and I have a problem in some of them, like this:
This is the code:
public class A1 {
public static void main(String [] argv)
throws Exception {
...
0
votes
1
answer
72
views
How do I resolve an inputmismatchexception from user whilst using the java try with resources feature
I've found that if I use the try with resources feature java provides which will automatically close of resources, I then can't use a boolean flag (or recursion) to resolve an InputMismatchException ...
0
votes
1
answer
840
views
IntelliJ is breaking my project when exporting to Eclipse - com.intellij cannot be resolved to a type
OS: Windows 10 x64
SDK: JDK 16.0.2
Platforms: IntelliJ IDEA Ultimate 2021.3.2 and Eclipse 2021-12 (4.22.0)
I have a strange problem that has me utterly confused and I'm not really sure how to get ...
0
votes
0
answers
45
views
Eclipse stops generating new serialVersionUID numbers after introducing either inheritance or generics to the class. Is there a fix?
I have a custom exception class that extends a parent exception class. I also use generics in my constructor, but not on my exceptions, because exceptions cannot be generic. Ever since I did the ...
0
votes
1
answer
1k
views
Class does not exist and exists
I am getting a NoClassDefFoundError exception I don't know Why because my class is imported and there are no errors in the compiler but when I run the plugin the error is. I even checked if the .class ...
0
votes
0
answers
18
views
The exception "NoSuchMethodError" appears in a multi module project of maven [duplicate]
I'm developing a client server application. For that matter I created a maven project "mydbapp" which consists of the sub modules: core, client, server. In the core project I placed java ...
0
votes
0
answers
630
views
Try-catch printing stack trace
I'm coding a Java project using Eclipse.
I have a method which throws a custom exception if a file is formatted the wrong way and it should be caught by a "parent" method and handled ...
-1
votes
1
answer
462
views
nextDouble() don't accept points, just commas [duplicate]
The input is this:
185.50
250.36
163.45
535.20
950.22
450.38
-1
it throws me this:
Exception in thread "main" java.util.InputMismatchException<br>
at java.base/java.util.Scanner....
0
votes
1
answer
40
views
Edureka - Handle exceptions in Selenium Web Driver - no print out
I am a total noob at Automation Testing and i am trying to learn through Youtube how to do it.
https://youtu.be/FRn5J31eAMw?t=12405
On this course from Edureka there is an example where they are ...
0
votes
1
answer
357
views
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1
I am trying to use Allure report in my Selenium TestNG project in Eclipse IDE. But when I build my project in through command prompt using 'mvn clean test -X' I get above error. This is all new for me....
2
votes
1
answer
42
views
List of all methods that throw an specific exception in a package
I need a way to get a list of all methods that throw an specific exception in a package in java.
Preferably in eclipse but I'm open minded so any ide or text editor is fine, i was going to write a ...
0
votes
1
answer
316
views
Eclipse does not recognize .java files
Short Version:
Couldn't start eclipse
Deleted some snap and tree files
Can open eclipse but it can't find my files “Cannot determine URI for [project-name]/[file-path]/[file-name]”
Can't reimport ...