• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

compiling package problem

 
Rob Petterson
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't understand where I'm going wrong here.
I've got 2 classes in the same package, one of which (DBAccess.java) accesses the other class Coins.java
In the dos prompt I change the working directory to where the java files are located and then type this command:
javac -classpath .com/project/databases/DBAccess.java
When I hit enter, it executes the command and gives the impression that it has compiled both java files. When I do dir, it hasn't created any class files??
Any ideas???
 
Charles Rector
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe the .class files will have been created in the com/project/databases/ folder.
 
Rob Petterson
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm afraid not.
 
Sangeeta Murthy
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why do you have a dot before com?
If you are compling the java files from the folder where they are then they shouldn't they be compiled like this:
javac com.abc.folder.*.java ?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic