Friday, October 26, 2012

package in Java/eclipse

  1. Source is located in src directory and build result is located in bin directory
  2. In source code you don’t have to located the source file following package. For example, you have Hello.java, you don’t have to create directory abc and put the java source code it it when your package name is abc
  3. After the compilation, the created class is located in bin/abc/Hello.class,
  4. When executing the class in the package you need to specify the package with ‘.’, for example, java abc.Hello for executing it.

MacJournal

No comments:

Post a Comment