How do I run my Java program in command prompt, my project was created in Intellij, and I am having difficulties running it in the command prompt...without using the Intelli
From intellij, open your project structure, and click on Modules. You'll be able to see the output path. Usually, it's something like (if on mac):
~/../out/production/{context}.
Back to your example in windows. The path you gave is, C:\myjava\sampl1\src\com\myexample\test>, so you have your project in :
C:\myjava directory where your context (or project name) is sampl1.
That means that your output (*.class files) will be in
C:\myjava\sampl1\out\production\sampl1
Navigate into the folder and then run the command:
java com.myexample.test.myjava