Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / January 2007

Tip: Looking for answers? Try searching our database.

How to recompile a .jar file?

Thread view: 
Adam Jiang - 29 Jan 2007 09:04 GMT
This is the situation.
I got a two .jar files, one of which contained the classes and another
one contained the source code related with certain class. When I put
them in an eclipse project, and add source code for the class-jar file
with source-jar file, I can view the code without modifying.
Is this source read-only?
How can I modify these code and then recompile this .jar file?
Andrew Thompson - 29 Jan 2007 09:12 GMT
> This is the situation.
> I got a two .jar files, one of which contained the classes and another
[quoted text clipped - 3 lines]
> Is this source read-only?
> How can I modify these code and then recompile this .jar file?

I imagine the IDE will *not* be able to edit the
source files while they are in an *archive*.

If you expand the archive out to 'loose files' on
the local file system, and check they do not
have the 'read only' attribute set (it is uncommon),
the IDE should be able to edit them.

You will probably need to reconfigure the project
to work with the new arrangement, but that is a
matter between you and your IDE.

Andrew T.
ceasaro - 29 Jan 2007 20:59 GMT
> > This is the situation.
> > I got a two .jar files, one of which contained the classes and another
[quoted text clipped - 9 lines]
> have the 'read only' attribute set (it is uncommon),
> the IDE should be able to edit them.
To expand them you can use any program which understand the zip format
cause a jar file is simply a zip archive.

> You will probably need to reconfigure the project
> to work with the new arrangement, but that is a
> matter between you and your IDE.
>
> Andrew T.
Andrew Thompson - 30 Jan 2007 03:59 GMT
...
> To expand them you can use any program which understand the zip format
> cause a jar file is simply a zip archive.

But note that it is dangerous to *make* jar's using
'any old' zip tool.  A lot of them have non-standard
compression, and the way they write the zip
archives is much less stringent than the format
used by the jar tool, and Java.

Andrew T.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.