Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need help with compiling my program

 
Devin montoya
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok so im having some problems trying to compile my script....... i have already made a path and it works.....So here is what i do on command prompt..... I type java to see if it detects it and it does.....Then i do javac and it pops up everything and it works(: But now i have to compile it and i type javac myapp.java....and i get:


javac: file not found: newapp.java
usage: javac <options> <source files>
use -help for a list of possible options



im new at this programming stuff and i just want to know to fix this problem please help!
People told me about this classpath im not sure what people are talking about but i just know im trying to get .class
 
Sagar Rohankar
Ranch Hand
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Devin montoya wrote:But now i have to compile it and i type javac myapp.java....and i get:

javac: file not found: newapp.java
usage: javac <options> <source files>
use -help for a list of possible options

Is it myapp or newapp.java? Run 'dir' command and see if file is there on current path or not?
 
Campbell Ritchie
Sheriff
Posts: 48917
58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And welcome to the Ranch

Both myapp and newapp are poor names for classes; not only should they have CapitalLetters, but they should tell you what the app is for, which neither name does.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic