09.09.2019
Posted by 

I am learning java using notepad(solo runner).is it possible to run all java program using notepad?

Running a Java Program from the Command Prompt. Create a simple Java program like the one below using Notepad or another text editor. Make sure to save the file with the extension “.java” rather than “.txt.”.

ex:applet,inheritance .

when we need to use package?

(I know IDE are available , but i recommend notepad due to some critical circumstances).

Questions are bit silly, but i am learning by my own. so i am using online help.

Suresh Atta
106k30 gold badges150 silver badges246 bronze badges
KeerthanaKeerthana

closed as off-topic by Wooble, cheffe, Nicolas R, Jasper de Vries, VicFeb 1 '18 at 13:10

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • 'Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.' – cheffe, Nicolas R
If this question can be reworded to fit the rules in the help center, please edit the question.

4 Answers

You can not run java program using notepad. However you can use command prompt if dont intend to use IDE.

e.g.

Turing85
6,6863 gold badges19 silver badges42 bronze badges
AbhiNAbhiN
Run Java From Notepad++

Just trying to be a little bit clearer than all the comments to your question: notepad is a simple text editor. To effectively run a Java program, you need to first compile the code you wrote in plain text, which will generate the corresponding Java bytecode, and then execute that bytecode using the JVM (Java Virtual Machine). I'd recommend you read about these 2 components, the Java compiler and the virtual machine.

Run Java Code From Notepad++

Regarding the part about packages, they're usually used to group similar or related classes, and to avoid naming conflicts (e.g. you can have class A in package X and class A in package Y, and so you'd reference each one as X.A and Y.A, respectively).

coshcosh

First of all, you need Notepad to just write the code and Java to compile/run.IMHO, I think if you just do a search on your own you should be able to find lots of tutorials for getting started with Java :)

I recommend you to go through some good tutorials/books so that you get a good understanding of the language.But just to answer your question, you can go through the below link to create a program in Notepad, compile and run it:

You can create simple Java programs using Notepad if you are just getting started or trying things. But it's recommended to use a good IDE like IntelliJ, Eclipse, etc if you are into serious programming as they provide you tons of features.

RahulRahul

Create a program in notepad and save file as .java extension. e.g as hello.java. Use compiler to run the program from console. e.g javac hello.java and to run use java e.g. java hello.

ZF007
2,0213 gold badges13 silver badges32 bronze badges
ACTACT

Run Java From Notepad Pdf

Not the answer you're looking for? Browse other questions tagged java or ask your own question.