NetBeans 12.0: “Class does not have a main method” (but it does)

NetBeans 12.0 Jdk 15 I cannot launch my program, clicking the green run button doesn’t do anything, and right click + run file on MainFrame gives the error “Class does not have a main method”…

input arabic characters with scanner in maven project

i work on netbeans 8.2 and i create a java maven project, i want just take an input with arabic characters and display it and that don’t work properly : Scanner sc = new Scanner(System.in); …

Why is my random number generator becoming an unused assignment when using it to input values for 2d array?

I have been making a basic game of battleship and to get the CPU to choose ship locations on a 2d array I am making two random number generators to pick values from 1 to 8 on a separate method. For …

How to calculate time difference using h format Java Netbeans

I am currently experimenting with a Self-Check in Airport Project. What I would like to do is enter the Time of Departure using the format (hour)h(minute) Example(14h40) I would have to validate this, …

Problem at calling a constructor if the java class is in a different path

I want to save the java classes in a folder called Classes, so on NetBeans, I have created that folder, and then I have saved it the class called Jugadores.java but after doing that i am having issues …

How to Insert Data To Array

I want to save a “AromaNorm” into NormalisasiT1 array, but i had a error : AWT-EventQueue-0 java.lang.NullPointerException Can you help me? Here the Code double[] normalisasiT1 = null; …

Read from one text file and write into two text files

I need to read from one text file(carsAndBikes.txt) and the write in either cars.txt or bikes.txt carsAndBikes contains a list of cars and bikes and the first character of each name is C or B (C for …

Netbeans is not getting installed in my Mac, it says JDK not found, though JDK is installed in the same

Error: Failure while executing the commands mentioned below:- /usr/bin/sudo -E — env LOGNAME=ajaygautam USER=ajaygautam USERNAME=ajaygautam /usr/sbin/installer -pkg /usr/local/Caskroom/netbeans/8.2/…

why the getter method goes null when i call in another class?

but in the set method on another class when i got the value is exist,, so i have 3 classes the first class is getter setter class , second is the class to fill the set and the last is class to get the …

netbeans dist folder jar not running [closed]

I have a java program to insert from textfields data to an ms access database. I am using Netbeans 7.4 java 1.7. The program runs in the Netbeans but not in the dist folder(before some time it was …