How to invoke jar cammand in the java source code?  
Author Message
wangyin





PostPosted: 2004-9-13 11:06:00 Top

java-programmer, How to invoke jar cammand in the java source code? How to invoke jar cammand in the java source code?
I want to click a button that invoke jar command zip selected item to
a .zip package.
Thankx!
 
Paul Lutus





PostPosted: 2004-9-13 12:40:00 Top

java-programmer >> How to invoke jar cammand in the java source code? wangyin wrote:

> How to invoke jar cammand in the java source code?
> I want to click a button that invoke jar command zip selected item to
> a .zip package.

Provide an example of what you want to do, and try for more complete
sentences.

--
Paul Lutus
http://www.arachnoid.com

 
Andrew Thompson





PostPosted: 2004-9-13 13:06:00 Top

java-programmer >> How to invoke jar cammand in the java source code? On Sun, 12 Sep 2004 21:39:54 -0700, Paul Lutus wrote:

> wangyin wrote:
>
>> How to invoke jar cammand in the java source code?
>> I want to click a button that invoke jar command zip selected item to
>> a .zip package.
>
> Provide an example of what you want to do, and try for more complete
> sentences.

It sounds to me as if the OP wants to
make a program similar to the Windows
based WinZip and such.

You want to "Make a zip file", wangyin?

--
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology
 
 
wangyin





PostPosted: 2004-9-13 14:06:00 Top

java-programmer >> How to invoke jar cammand in the java source code? Andrew Thompson wrote:
> On Sun, 12 Sep 2004 21:39:54 -0700, Paul Lutus wrote:
>
>
>>wangyin wrote:
>>
>>
>>>How to invoke jar cammand in the java source code?
>>> I want to click a button that invoke jar command zip selected item to
>>>a .zip package.
>>
>>Provide an example of what you want to do, and try for more complete
>>sentences.
>
>
> It sounds to me as if the OP wants to
> make a program similar to the Windows
> based WinZip and such.
>
> You want to "Make a zip file", wangyin?
>
I want to find a name of direction with a String variable,and use jar
command to zip it!
 
 
Andrew Thompson





PostPosted: 2004-9-13 14:23:00 Top

java-programmer >> How to invoke jar cammand in the java source code? On Mon, 13 Sep 2004 14:05:43 +0800, wangyin wrote:

>> You want to "Make a zip file", wangyin?
>>
> I want to find a name of direction

Is that a directory you mean, with a
lot of files and other directories?

>..with a String variable,and use jar
> command to zip it!

A JFileDialog can return the directory
or file the user wants to zip.

File.list() will give you a file list
for directories.

ZipOutputStream allows you to write the
files and/or directories to the zip file,
and ZipFile allows you to read zip files
and the ZipEntries in them.

HTH

--
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology
 
 
wangyin





PostPosted: 2004-9-13 16:10:00 Top

java-programmer >> How to invoke jar cammand in the java source code? Andrew Thompson wrote:
> On Mon, 13 Sep 2004 14:05:43 +0800, wangyin wrote:
>
>
>>>You want to "Make a zip file", wangyin?
>>>
>>
>>I want to find a name of direction
>
>
> Is that a directory you mean, with a
> lot of files and other directories?
>
>
>>..with a String variable,and use jar
>>command to zip it!
>
>
> A JFileDialog can return the directory
> or file the user wants to zip.
>
> File.list() will give you a file list
> for directories.
>
> ZipOutputStream allows you to write the
> files and/or directories to the zip file,
> and ZipFile allows you to read zip files
> and the ZipEntries in them.
>
> HTH
>
Oh,I can't use JFiledialog.but How to copy a zip file to save local disk?
 
 
Andrew Thompson





PostPosted: 2004-9-13 16:37:00 Top

java-programmer >> How to invoke jar cammand in the java source code? On Mon, 13 Sep 2004 16:10:13 +0800, wangyin wrote:
> Andrew Thompson wrote:
>> On Mon, 13 Sep 2004 14:05:43 +0800, wangyin wrote:
>>
>>>>You want to "Make a zip file", wangyin?
>>>
>>>I want to find a name of direction
>>
>> Is that a directory you mean, with a
>> lot of files and other directories?
>>
>>>..with a String variable,and use jar
>>>command to zip it!
...
> Oh,I can't use JFiledialog.

Why not? Please explain, rather than
leave me to guess.

>..but How to copy a zip file to save local disk?

I do not understand, and when you write
short sentences it does not help.

Explain point by point:
"I want to..
1) ask user for string (file/directory name) to zip.
2) get file/directory, put in zip.
3) if file is directory, zip all other
file/directory in it.
4) close zip."

Note in that simple description, I wrote
more lines than you put in any post so far
wangyin.

If there is confusion over what you want to
do, you need to write more words, not less.

--
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology
 
 
wangyin





PostPosted: 2004-9-13 17:04:00 Top

java-programmer >> How to invoke jar cammand in the java source code? Andrew Thompson wrote:
> On Mon, 13 Sep 2004 16:10:13 +0800, wangyin wrote:
>
>>Andrew Thompson wrote:
>>
>>>On Mon, 13 Sep 2004 14:05:43 +0800, wangyin wrote:
>>>
>>>
>>>>>You want to "Make a zip file", wangyin?
>>>>
>>>>I want to find a name of direction
>>>
>>>Is that a directory you mean, with a
>>>lot of files and other directories?
>>>
>>>
>>>>..with a String variable,and use jar
>>>>command to zip it!
>
> ...
>
>>Oh,I can't use JFiledialog.
>
>
> Why not? Please explain, rather than
> leave me to guess.
>
>
>>..but How to copy a zip file to save local disk?
>
>
> I do not understand, and when you write
> short sentences it does not help.
>
> Explain point by point:
> "I want to..
> 1) ask user for string (file/directory name) to zip.
> 2) get file/directory, put in zip.
> 3) if file is directory, zip all other
> file/directory in it.
> 4) close zip."
>
> Note in that simple description, I wrote
> more lines than you put in any post so far
> wangyin.
>
> If there is confusion over what you want to
> do, you need to write more words, not less.
>
Sorry andrew thompson
I'm newbie to use newsgroup!Sorry!
 
 
KC Wong





PostPosted: 2004-9-13 17:04:00 Top

java-programmer >> How to invoke jar cammand in the java source code? > Note in that simple description, I wrote
> more lines than you put in any post so far
> wangyin.
>
> If there is confusion over what you want to
> do, you need to write more words, not less.

And if you have difficulties in communicating in English, use a translator.

e.g. http://www.systranbox.com/systran/box


 
 
Andrew Thompson





PostPosted: 2004-9-13 18:01:00 Top

java-programmer >> How to invoke jar cammand in the java source code? On Mon, 13 Sep 2004 17:04:10 +0800, KC Wong wrote:

>> If there is confusion over what you want to
>> do, you need to write more words, not less.
>
> And if you have difficulties in communicating in English, use a translator.
>
> e.g. http://www.systranbox.com/systran/box

Good idea. Another suggestion might be to post
in *both* English and your language, you might find
another poster understands and can help translate.

--
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology
 
 
Andrew Thompson





PostPosted: 2004-9-13 18:04:00 Top

java-programmer >> How to invoke jar cammand in the java source code? On Mon, 13 Sep 2004 17:03:47 +0800, wangyin wrote:

> Sorry andrew thompson

I not angry, wangyin.

> I'm newbie to use newsgroup!Sorry!

'Sorry', less. Talk, more. :-)

--
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology