This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes regarding JAR files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "regarding JAR files" Watch "regarding JAR files" New topic
Author

regarding JAR files

Bala Raju Mandala
Ranch Hand

Joined: Sep 21, 2006
Posts: 40
Hi Folks,

I am sorry if i am posting my question in wrong area.

I am creating a jar file using a batch file. It will create the jar files


it is creating "afile.jar". I need to unjar this file in a UNIX meshine.
I copied it to UNIX meshine and unjared it. It is creating 2 folders in UNIX meshine named "c:" folder and "datafiles" folder and coping all XML and doc files there.

What i need to do, to have the files in the same folder where i unjar them or move to some specified folder of UNIX meshine?
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19723
    
  20

Go to either C:\ (if you want the datafiles folder to be created) or C:\datafiles (if you just want the *.xml and *.doc files) and then execute the command with relative paths:



SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Ove Lindström
Ranch Hand

Joined: Mar 10, 2008
Posts: 326

The question is acctually: Why do you want to un-jar-them in exact the same place? Are they going to be edited?
Bala Raju Mandala
Ranch Hand

Joined: Sep 21, 2006
Posts: 40
Thank you verymuch Rob. I am sorry for not clearly writing my problem.

I am doing this from a batch file. This batch file should be in the c:\upload folder. Thatsway i clearly mentioned the path names.

As unjaring will be done at server side. Can i do something while unjaring, so that the specified files can be moved to particular folder?
Bala Raju Mandala
Ranch Hand

Joined: Sep 21, 2006
Posts: 40
yes Ove, i need to read them from a java program. So the location is a central location to all the files.
[ September 29, 2008: Message edited by: Bala Raju Mandala ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: regarding JAR files