473,382 Members | 1,387 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

How to remove content from .jar files

184 100+
Hi,
can anyone please say me how to remove files from .jar file?
For Example:
I have created a sample .jar file with

jar cf sample.jar A.class B.class etc

Now i want to remove all except A.class from sample.jar.

How could i do that?Thanks in Advance.

-Thanks & Regards,
Hamsa
Mar 19 '08 #1
5 50476
r035198x
13,262 8TB
Hi,
can anyone please say me how to remove files from .jar file?
For Example:
I have created a sample .jar file with

jar cf sample.jar A.class B.class etc

Now i want to remove all except A.class from sample.jar.

How could i do that?Thanks in Advance.

-Thanks & Regards,
Hamsa
You have to extract and jar again.
Mar 19 '08 #2
sukatoa
539 512MB
Hi,
can anyone please say me how to remove files from .jar file?
For Example:
I have created a sample .jar file with

jar cf sample.jar A.class B.class etc

Now i want to remove all except A.class from sample.jar.

How could i do that?Thanks in Advance.

-Thanks & Regards,
Hamsa
Use WinRAR.... Open that jar file as WinRAR...
Edit the content...

And save it as .jar again....
Mar 19 '08 #3
JosAH
11,448 Expert 8TB
Hi,
can anyone please say me how to remove files from .jar file?
For Example:
I have created a sample .jar file with

jar cf sample.jar A.class B.class etc

Now i want to remove all except A.class from sample.jar.

How could i do that?Thanks in Advance.

-Thanks & Regards,
Hamsa
There is no command to delete file(s) from a .jar archive but there is hope: the .jar
file format is identical to the .zip file format. There are many .zip file handlers.

kind regards,

Jos

ps. this was a tip ;-)

edit: darn, too slow again ;-)
Mar 19 '08 #4
gaya3
184 100+
There is no command to delete file(s) from a .jar archive but there is hope: the .jar
file format is identical to the .zip file format. There are many .zip file handlers.

kind regards,

Jos

ps. this was a tip ;-)

edit: darn, too slow again ;-)

Thanks for all response..Thank u once again

-Thanks & Regards,
Hamsa
Mar 19 '08 #5
hello all jus use the followin command to delete files from jar

zip -d jarfilename classfilename.class

Thank
May 16 '12 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Doc | last post by:
If you have an old website up and you want to replace it with totally different content, how do you purge the old website files that are still lingering on the host server taking up space? I find...
1
by: Aaron Fleming | last post by:
How can I remove the content in between tags? I have a page that has several custom tags: <!--tag:1--> Content 1 <!--/tag:1--> <br> <!--tag:2--> Content 2 <!--/tag:2-->
1
by: Nathan Bloomfield | last post by:
Is it possible to remove all or individual "recent files" from the "Recent files list" in MS Access XP? It would be preferred to be a programatic method using VBA as the system is locked down...
4
by: Brian Henry | last post by:
Hi, If you have files in your project (like text files and bmp files stuff like that, and config files) and want to have it copied to the bin folder at build (i thought setting the build action...
1
by: Samuel R. Neff | last post by:
Is there a way to copy content files to the build directory in vb.net? In C# you can use build-events but I don't see them anywhere in a VB project. Thanks, Sam B-Line is now hiring one...
0
by: thehercman | last post by:
I am using forms authentication to protect all content as described in the kb article below. http://support.microsoft.com/default.aspx?scid=kb;en-us;893662 This works fine except for files...
5
by: DCDev | last post by:
I have a solution with multiple projects. One project is a windows forms project. I have report files (.rdlc) in a separate project that are built as "Content" with the "Copy Always" option....
2
by: Frank | last post by:
Hi, Originally I was planning to do some code reuse (yeah.. that exists..didn't want to believe it either) with some class library projects that I now want to use in a asp.net 2.0 web app in VS...
1
by: Terry Reedy | last post by:
Dan Stromberg wrote: Since you do not need all 10**6 files sorted, you might also try the heapq module. The entries into the heap would be (time, fileid)
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.