Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Lisa Anderson   on Mar 14 In Java Category.

  
Question Answered By: Hattie Howard   on Mar 14

Try this :

if you have this code :

package toppackage;

import......

public class ClassA {
...
public static void main(String[] args)
}

compile it, and run  it (via command line) with java toppackage.ClassA
Don't forget to put the "toppackage" folder under yout classpath.
So, the steps :
1. create a folder which has same name with your package
("toppackage") in your classpath
2. write your codes at "toppackage" folder
3. compile your codes
4. run it

Share: 

 
 
Didn't find what you were looking for? Find more on Package Access Or get search suggestion and latest updates.


Tagged: