• 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

help me..................can't able to compile simple application

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have written my 1st first "HelloWorld" Application. Also the Path is set. Now i am trying to compile the program at the dos prompt with command javac HelloWorldApp.Java. But it is prompting that HelloWorldApp.Java is anb invalid option or argument. Then i tried compiling the same program in C:\JDK1.2.2\Bin directory. Again it was the same error message.
Please let me know how to Proceed further.................
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there, could you post your code and what you are exactly typing to try to compile it?
(ie "javac HelloWorldApp" as opposed to "javac HelloWorldApp.java" )
Thanks,
-Brooks
 
Trailboss
Posts: 23778
IntelliJ IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Look at www.javaranch.com/drive and read the part at the beginning about getting your compiler to work.
 
bharati
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks bduncan and paul.
I had already taken care of the path variables. Now i had resolve the problem of compiling the source code thru DOS prompt. Actually the problem was instead of command javac HelloWorldApp.java i was issuing the command javac HelloWorldApp.Java and this J vs j was making the difference.
Also the problem which i am facing right now is that even though i being able to compile the program thru DOS prompt i could not able to make thru TEXTPAD. What i am doing in textpad, opening the same source file(which i able to compile successfully thru DOS prompt) and then trying to compile thru <Compile Java> option which is available in the Textpad itself. but textpad also assuming this as an JAVA extension and giving the same error. Please tell me how to resolve this problem.
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
check the path and class path.

------------------
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
TextPad is not compiling because even though your saving the file as HelloWorldApp.java, TextPad automaticlly is adding a .txt extenison (even though you don't see it). In order to prevent this put "" marks around the file name, like so, "HelloWorldApp.java". You should be able to compile away.
Hey your writing is hard to understand, I hope I addressed your issue. Good Luck!

Originally posted by bharati:
Thanks bduncan and paul.
I had already taken care of the path variables. Now i had resolve the problem of compiling the source code thru DOS prompt. Actually the problem was instead of command javac HelloWorldApp.java i was issuing the command javac HelloWorldApp.Java and this J vs j was making the difference.
Also the problem which i am facing right now is that even though i being able to compile the program thru DOS prompt i could not able to make thru TEXTPAD. What i am doing in textpad, opening the same source file(which i able to compile successfully thru DOS prompt) and then trying to compile thru <Compile Java> option which is available in the Textpad itself. but textpad also assuming this as an JAVA extension and giving the same error. Please tell me how to resolve this problem.


 
reply
    Bookmark Topic Watch Topic
  • New Topic