Sometime ago early this morning (night), I installed JDK-23 (Java Development Kit version 23) in this Dell OptiPlex computer of mine.
I downloaded the installation binaries from the Oracle website.
The PATH environment variables of the Java compiler were automatically set for me.
So, to test the installation I ran "java -version" command in the command prompt and it showed the Java version correctly meaning that it had successfully installed on my machine.
So, using Notepad of Windows 11, I wrote the following Java source code and saved it with AllahAkbar.java on my Desktop.
import javax.swing.JOptionPane;
public class AllahAkbar
{
public static void main(String [] args)
{
JOptionPane.showMessageDialog(null,"Allah Akbar...Allah is great");
System.exit(0);
}
}
In the command prompt I went to my Desktop and compiled the small program above using the command "javac AllahAkbar.java" and it successfully created the AllahAkbar.class byte code file and I ran the program in the command prompt which displays a dialog box saying "Allah Akbar"...
It worked...
Allah Akbar...Allah is great...
No comments:
Post a Comment