Java Editors


To write your Java program to use the text editor. Before writing the java program to use one of the text editors. For examples of text editors such as Windows Notepad, TextPad and etc

 

Write Java program in notepad and save as extension ".java".

 

 

notepad

Java class name and java source file name should be the same.


To saving the java source file inside the "Java\jdk\bin" directory, the path is not required.

 

If your saving the java source file outside the "Java\jdk\bin" directory, in that situation it is required to set the path for JDK.

 

To get the latest version of JDK version Click here.


How to set the path of Java in windows ?

The simple way to set the path of java.

  • Go to start menu then Open the command prompt.
  • To check the installed path of "java\jdk\bin" directory then copy the path.
  • Write on command prompt to set path="C:\Program Files\Java\jdk1.8.0_121\bin" (copied_path).

Command Prompt


To set a permanent path of java.

Step 1: Right-click on the 'This PC /My Computer' then select the 'Properties'.

Properties

Step 2: Click the 'Advanced' tab.

Advanced

Step 3: Click on the environment variables.

 environment variables

Step 4: Click the new tab on user variables.

user variables

Step 5: To write the variable name as 'path'.

Step 6: To write the variable value as 'c:\Program Files\java\jdk\bin'.

variable value

Step 7: Now your path is set as permanent. You can now execute any program of java.


To set the path for Linux, UNIX, Solaris.

export PATH=$PATH:/home/jdk1.6.01/bin/ 



OnlineTpoint is a website that is meant to offer basic knowledge, practice and learning materials. Though all the examples have been tested and verified, we cannot ensure the correctness or completeness of all the information on our website. All contents published on this website are subject to copyright and are owned by OnlineTpoint. By using this website, you agree that you have read and understood our Terms of Use, Cookie Policy and Privacy Policy.