• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

What are the steps involved in complilation of the program?

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi i am new to java give me the steps to compile and run the program shown below while compiling i am getting error please help me out from this. i am saving class protection in file protection.java, derived in derived.java,samepackage in samepackage.java and demo in file demo.java and storing these class files within package p1. when i am compiling these classes protection get compiled successfully using path c:\java\javac p1/protection.java while classes derived using path c:\java\javac p1/derived.java, samepackage using path c:\java\javac p1/samepackage.java and demo using path c:java\javac p1/demo.java resulting compile time error.please suggest me.








 
Bartender
Posts: 1558
5
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello deepak prashad,

Welcome to CodeRanch!

Few suggestions:
1) Please use appropriate grammar. Without it, the text is difficult to read and understand.
2) Please UseCodeTags. You can still edit your post.
3) Please TellTheDetails. 'Program does not work' does not give a slightest idea about what is going on. Is it that code throws an exception? Or is it compile time error? Or is it that you don't know how to compile the code itself(as per your question)? In last case, a better question would've been - 'how to compile java code' ; for which you'd get much more info if you simply search it over the web.

I hope this helps.
 
lowercase baba
Posts: 13089
67
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Your question is like me asking you "How to I get to Beijing?" you need a lot more information before you can answer that. Where am I now? Do I own a plane? Am I going to walk? Do I need to get a visa in my passport?

There are WAY to many unknowns here. Folks have learned that it does no good to try. They don't want to spend 15 minutes writing up how to set your CLASSPATH, only to find out you don't have the JRE installed.

So...

Tell us what EXACTLY you are doing.
Tell us what EXACTLY the error is - cut and paste it, in it's entirety. Don't just paraphrase.
Tell us what EXACTLY you are expecting to happen.

 
Ranch Hand
Posts: 4716
9
Scala Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
just some probably unwanted advice....as a beginner i would avoid packages(package statements) it makes it harder to compile and run
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic