Advertise Here

Author Topic: [JavaTutorial] Packaging  (Read 3304 times)

0 Members and 1 Guest are viewing this topic.

Offline Marsada

  • SMF For Free Newbie
  • *
  • Posts: 4
  • Java Assistant
    • View Profile

  • Total Badges: 9
    Badges: (View All)
    Topic Starter Combination Level 2 Level 1 First Post
[JavaTutorial] Packaging
« on: February 09, 2009, 08:35:49 pm »
[JavaTutorial] Packaging

Requirements: Folders(Not many)

Benifits:
*You will be able to acess java files a lot quicker than before.
*Your Java Project will look a lot cleaner than before.
_________________________________________________________

The main code for packaging is package.

How to locate java files with packaging?
If your java file is located in the, lets say myfolder1, your package code will look like this(package myfolder1;)
_________________________________________________________

Example of a package:
Code: [Select]
package packaging.myfolder1;

/*packaging.myfolder1; is the same as (folder)packaging>(folder)myfolder1;
 *so basically your java file should be located in myfolder1
 */

public class HelloPackage {

public static void main(String[] args) {
System.out.println("Hello Package!");
}
}
_________________________________________________________

Running the packaged file.
You can compile and run, but thankfully i have provided you with the package of my own which you can download.
(It has a compiled java HelloPackage.java file with a successful runner.)
http://uppit.com/YI6LXP
http://uppit.com/MN7U1L
(Any of them are fine)

Thats about it for this tutorial.Thank you for visiting it.

/*
*Copyright Marsada(c)
*(c)2007-2009(c)
*/






 

Related Topics

  Subject / Started by Replies Last post
4 Replies
1933 Views
Last post October 11, 2005, 12:03:25 am
by Prasad007
1 Replies
4963 Views
Last post February 09, 2009, 04:51:01 pm
by Colette Brunel
0 Replies
2881 Views
Last post February 09, 2009, 07:57:56 pm
by Marsada