aspose file tools*
The moose likes Java in General and the fly likes Packages Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Packages" Watch "Packages" New topic
Author

Packages

deepikakasi kasi
Greenhorn

Joined: Oct 08, 2006
Posts: 7
Packages:

I have a doubt like how to run & compile a package source code.


As creating a new folder named package & under that source file is stored.

If I compile that, it is displaying as System cann't find that file.

How to run & compile that package ??


with regards,
Deepika.K.
Chetan Parekh
Ranch Hand

Joined: Sep 16, 2004
Posts: 3636
Deepika, if you are new to Java, then please read this section- it will help you to understand the concept of package.
[ October 17, 2006: Message edited by: Chetan Parekh ]

My blood is tested +ve for Java.
GS Chidam
Ranch Hand

Joined: Jul 07, 2006
Posts: 34
hi

refer this url

http://www.jarticles.com/package/package_eng.html

thanks
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968
    
    1

When you use pacakges, you are esseintally telling the complier that you are going to be placing and organizeing your code into sub-directories. A package is really nothing more than a directory on the filesystem. However, since Java is cross platform, you can't really use a normal directory notation, as Linux slashes are different from PC DOS slashes. So, Java uses a dot notation, and coins the cute little term 'package'

Getting packaged code to compile can definitely be annoyting. I put together a short multimedia tutorial that shows you exactly where a java source file should go when you want to package compile it, and how to run the source code generated by the compilation:

Using Packages with the JDK

JDK Tutorials for Compiling Packaged Code - Even Some Classpath Switches in there Too!!!


Working with the SDK is important, but eventually, you'll want to move to an IDE like Eclipse or use NetBeans or something.

Cheers!

-Cameron McKenzie
deepikakasi kasi
Greenhorn

Joined: Oct 08, 2006
Posts: 7
Thanks for the immediate reply..


thanks & regards,
Deepika.K.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Packages