• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

Need a right place to learn execution of Java through command line

 
Ranch Hand
Posts: 59
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

could anyone spot me a place where i can learn everything about compiling and excecuting a java program(with package ,without package, ...etc) through command prompt?

thank you
 
Ranch Hand
Posts: 386
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

s sivaraman wrote:Hi,

could anyone spot me a place where i can learn everything about compiling and excecuting a java program(with package ,without package, ...etc) through command prompt?

thank you



*shudder* i'm having a look now, because I spent days on this, but i can't seem to find the website I liked.

I would just google and experiment. You'll run into problems with classpaths and running the compiler from the wrong root directory, then you can google that too. I would do this over using the oracle tutorials on the subject. I personally think they are poor.

Let me go and have a quick look for you, but regardless, if you work on it yourself it would help me too if you post your problems here. I've *mastered* it twice now, but because I'm not doing it daily it often catches me out, so I could do with the practise.

nick

*edit: here you go, I liked this explanation: http://kevinboone.net/classpath.html (although it's more about the classpath than the basics, which relates to packages)

 
s sivaraman
Ranch Hand
Posts: 59
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I would just google and experiment. You'll run into problems with classpaths and running the compiler from the wrong root directory, then you can google that too.



sounds exactly like me.


Let me go and have a quick look for you,


i'm counting on it....

but regardless, if you work on it yourself it would help me too if you post your problems here.


i do.


I liked this explanation: http://kevinboone.net/classpath.html (although it's more about the classpath than the basics, which relates to packages)


i'm on it...
 
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

s sivaraman wrote:could anyone spot me a place where i can learn everything about compiling and excecuting a java program(with package ,without package, ...etc) through command prompt?


When it comes down to compiling source code files and running class files from the command line, you'll definitely need a good understanding of packages. So have a look at the lesson about packages of Oracle's Java tutorials, especially the Managing Source and Class Files section.

In the The "Hello World!" Application lesson provides detailed instructions for compiling and running a simple "Hello World!" application. And this article has a good explanation about the basics of compiling and running using a more complex example.

These pages could be useful as well some time: javac and java. Don't be intimidated by the gazillion options you can use for both commands. You'll probably only need to know the option -cp (or -classpath).

Finally, most study guides for the OCA exam will have basic coverage about javac and java as well, because it's recommended to prepare for the OCA exam not using an IDE but only your favourite text editor, javac and java. (And it's an exam objective for the OCA8 exam as well)

If you are experiencing any problem/issue when compiling or running an application, just create a new topic in this forum and ask your question. CodeRanch is really packed with friendly ranchers who will definitely help you to solve your problems.

Hope it helps!
Kind regards,
Roel
 
Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic