• Post Reply Bookmark Topic Watch Topic
  • New Topic

What are the steps involved in complilation of the program?  RSS feed

 
deepak prashad
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • 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.








 
Anayonkar Shivalkar
Bartender
Posts: 1558
5
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • 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.
 
fred rosenberger
lowercase baba
Bartender
Posts: 12565
49
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • 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.

 
Randall Twede
Ranch Hand
Posts: 4696
8
Java Scala
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!