File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes The ridiculous Problem 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 » Beginning Java
Bookmark "The ridiculous Problem" Watch "The ridiculous Problem" New topic
Author

The ridiculous Problem

Soni Mitesh
Ranch Hand

Joined: Sep 02, 2007
Posts: 33
Hi all, I am facing problem, with packages and classpath...

1. How to set and remove classpath...
2. How to use package declaration in the java file...(give me one example)
3. How to import package in another java file...

i ve tried all these in many ways...
ever since i ve set the classpath... to the package/folder
whatever java file i m creating is getting duplicated with the extension .000, .001
like abc.java, as soon as i m saving it, it becomes abc.000, if i m again compiling it bocomes abc.001 like...
also i am unable to save that file.. and open
the error msg it displays
Access denied. ...

i ve to save my programs in to drive's root only, can not in any directory/folder/package ..
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336


1. How to set and remove classpath...

Have a read of our FAQ about this. Hopefully that will help. Let us know if you are still stuck.


2. How to use package declaration in the java file...(give me one example)




3. How to import package in another java file...

...with the import keyword:


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Soni Mitesh
Ranch Hand

Joined: Sep 02, 2007
Posts: 33
@Paul

Thnx paul but the main concern here is the file extension is
getting changed, and getting corrupted...
What to do for that?
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

Originally posted by Soni Mitesh:
...whatever java file i m creating is getting duplicated with the extension .000, .001
like abc.java, as soon as i m saving it, it becomes abc.000, if i m again compiling it bocomes abc.001 like...
also i am unable to save that file.. and open
the error msg it displays
Access denied. ...

i ve to save my programs in to drive's root only, can not in any directory/folder/package ..

Weird... Are you using an IDE with its own compiler? Or are you using Sun's javac compiler? Also, what operating system are you running?


"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: The ridiculous Problem