Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » How to change the code in jar file
How to change the code in jar file [message #229478] Wed, 25 March 2009 01:38 Go to next message
Xia Jun Shi is currently offline Xia Jun ShiFriend
Messages: 15
Registered: July 2009
Junior Member
Hi,

I checked out the package org.eclipse.wst.server.ui, and I want to add
some code in the org.eclipse.debug.ui_3.5.0.v200812050-1330.jar. What is
the regular way to make any changes in the jar file?

Shelley
Re: How to change the code in jar file [message #229507 is a reply to message #229478] Wed, 25 March 2009 11:07 Go to previous messageGo to next message
Konstantin Komissarchik is currently offline Konstantin KomissarchikFriend
Messages: 1077
Registered: July 2009
Senior Member
Shelley,

The answer depends on what exactly you are trying to do. In order to
change any eclipse plugin, you will want to start by loading that plugin's
source code from CVS into your workspace. Of course, unless you are
actually trying to patch an eclipse plugin, there may be an easier answer
for what you are trying to do. If you provide more details, there maybe
people on this or other newsgroup that can help point your in the right
direction.

- Konstantin
Re: How to change the code in jar file [message #229553 is a reply to message #229507] Wed, 25 March 2009 16:20 Go to previous messageGo to next message
Xia Jun Shi is currently offline Xia Jun ShiFriend
Messages: 15
Registered: July 2009
Junior Member
I checked out org.eclipse.wst.server.ui which includes
org.eclipse.debug.ui_3.5.0.v200812050-1330.jar, and this jar file has the
method
eclipse.debug.internal.ui.launchConfigurations.LaunchConfigu rationTabGroupWrapper.setDefaults()
I wanted to make some changes for this setDefaults() method. I am
stucked over here. I am wondering whether it's possible to change the code
which is located in a jar file or not. More information is on
http://xiajunshi.wordpress.com/

Shelley
Re: How to change the code in jar file [message #229673 is a reply to message #229553] Thu, 26 March 2009 13:51 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse-news.rizzoweb.com

On 3/25/2009 12:20 PM, Xia Jun Shi wrote:
> I checked out org.eclipse.wst.server.ui which includes
> org.eclipse.debug.ui_3.5.0.v200812050-1330.jar, and this jar file has
> the method
> eclipse.debug.internal.ui.launchConfigurations.LaunchConfigu rationTabGroupWrapper.setDefaults()
>
> I wanted to make some changes for this setDefaults() method. I am
> stucked over here. I am wondering whether it's possible to change the
> code which is located in a jar file or not.

No, it is not possible to just change the code in a JAR. You have to
have the source code that was used to produce that JAR, change it, and
then re-build it.
honestly, this is a basic Java question and has nothing to do with
Eclipse Web Tools. I think Konstantin already gave you enough
information to proceed, if you understand the basics of how to build
Java code and JARs.

Eric
Re: How to change the code in jar file [message #229681 is a reply to message #229553] Thu, 26 March 2009 14:29 Go to previous messageGo to next message
Mark Hutchinson is currently offline Mark HutchinsonFriend
Messages: 53
Registered: July 2009
Member
You need to check out that plugin from the eclipse CVS repository to
change the source.

:pserver:anonymous@dev.eclipse.org:/cvsroot/eclipse

Xia Jun Shi wrote:
> I checked out org.eclipse.wst.server.ui which includes
> org.eclipse.debug.ui_3.5.0.v200812050-1330.jar, and this jar file has
> the method
> eclipse.debug.internal.ui.launchConfigurations.LaunchConfigu rationTabGroupWrapper.setDefaults()
>
> I wanted to make some changes for this setDefaults() method. I am
> stucked over here. I am wondering whether it's possible to change the
> code which is located in a jar file or not. More information is on
> http://xiajunshi.wordpress.com/
>
> Shelley
>
Re: How to change the code in jar file [message #229689 is a reply to message #229553] Thu, 26 March 2009 14:36 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
Xia Jun Shi wrote:
> I checked out org.eclipse.wst.server.ui which includes
> org.eclipse.debug.ui_3.5.0.v200812050-1330.jar, and this jar file has
> the method
> eclipse.debug.internal.ui.launchConfigurations.LaunchConfigu rationTabGroupWrapper.setDefaults()
>
> I wanted to make some changes for this setDefaults() method. I am
> stucked over here. I am wondering whether it's possible to change the
> code which is located in a jar file or not. More information is on
> http://xiajunshi.wordpress.com/
>
> Shelley
>

Hi Shelley,

Are these changes to org.eclipse.debug.ui for the purposes of
investigating the bug, or for implementing a fix? Note that changing
the jar itself is not necessary when working in a development environment.

If you are working with the Eclipse SDK, or have added the Eclipse
Platform source to your Eclipse, you can use File -> Import -> Plug-in
Development -> Plug-ins and Fragments. On the first wizard page, select
"Projects with source folders" under "Import As" and click Next. On the
next page, select "org.eclipse.debug.ui" (not
org.eclipse.debug.ui.source) in the list and click "Add -->" and then
Finish. This will give you a project suitable for investigating the
problem. It can't be diff'd against CVS, so it's not suitable for
creating patches.

Cheers,
Larry
Re: Thanks specially for Larry [message #229729 is a reply to message #229689] Thu, 26 March 2009 18:11 Go to previous messageGo to next message
Xia Jun Shi is currently offline Xia Jun ShiFriend
Messages: 15
Registered: July 2009
Junior Member
Hi Larry,

Yes, I am taking a try to investigate the bug 137822 which is related with
the web server, that's why I posted the question over here. Thanks for
your nice, encouraging and helpful reply. I hope I can master enough
technology as you to support someone else in this community in the future.

Cheers,
Shelley
Re: Thanks specially for Larry [message #229737 is a reply to message #229729] Thu, 26 March 2009 19:19 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
Xia Jun Shi wrote:
> Hi Larry,
>
> Yes, I am taking a try to investigate the bug 137822 which is related
> with the web server, that's why I posted the question over here. Thanks
> for your nice, encouraging and helpful reply. I hope I can master enough
> technology as you to support someone else in this community in the future.
>
> Cheers,
> Shelley
>

Since it's for investigation getting the source from the SDK is the
simplest way to ensure you have source that corresponds to the version
of Eclipse and/or WTP you are using. However, if this is for inserting
exceptions to capture stack traces, you may find it easier to capture
stack traces by running the plug-in in debug mode and using breakpoints.
Place your breakpoint where you want to view the stack, then start the
plug-in in Debug mode. Once the breakpoint is hit, examine the Debug
view and find the thread that is suspended on the breakpoint. Right
click on that thread and select "Copy Stack". You can then paste this
text where you wish. It will contain the same "stack" as you would get
from an Event Details image with an exception inserted, assuming such an
exception gets logged.

Cheers,
Larry
Re: How to change the code in jar file [message #229784 is a reply to message #229673] Fri, 27 March 2009 22:10 Go to previous messageGo to next message
Tahereh is currently offline TaherehFriend
Messages: 5
Registered: July 2009
Junior Member
WHAT?!?!?!?! How can you talk to someone like this? Your answer is
degrading the question and the attempt being made and is also insulting.
Honestly, this is a very very basic rule in communication and am socked
that you don’t know about this.

People don’t care how much you know about jar files, they do care how much
you know the basic rules in life and communication. If you understand the
meaning of respect you will understand how to answer questions and be a
more valuable contributor to the community. We have *paid* to be able to
take this course and LEARN things.

Just so that you know, this IS the place suggested by IBM committers and
our course instructor to post any questions we have related to the work we
are doing on Eclipse WTP.

We have had very good support from IBM committers so far and it is sad to
see such comments posted in reply to the questions.
Re: Eric Rizzo's comment [message #229807 is a reply to message #229737] Mon, 30 March 2009 11:19 Go to previous messageGo to next message
Davoud Salahi Rad is currently offline Davoud Salahi RadFriend
Messages: 2
Registered: July 2009
Junior Member
http://challenger110.wordpress.com/2009/03/30/how-not-to-com ment-ibm-eclipse-community/
, in response to comment by Eric Rizzo.

It's funny how some people don't see beyond themselves and no wonder they
feel the glass ceiling.
Re: Eric Rizzo's comment [message #229816 is a reply to message #229807] Mon, 30 March 2009 14:34 Go to previous messageGo to next message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3798
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On the other hand, there's no reason to excoriate Eric for his comment.
He surely meant no personal offense and we don't know under what
circumstances or frustrations he made it. At very worst, Eric is like
the rest of us: human.


Davoud Salahi Rad wrote:
>
> http://challenger110.wordpress.com/2009/03/30/how-not-to-com ment-ibm-eclipse-community/
> , in response to comment by Eric Rizzo.
> It's funny how some people don't see beyond themselves and no wonder
> they feel the glass ceiling.
Re: How to change the code in jar file [message #229822 is a reply to message #229784] Mon, 30 March 2009 14:41 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse-news.rizzoweb.com

On 3/27/2009 6:10 PM, Tahereh wrote:
> WHAT?!?!?!?! How can you talk to someone like this? Your answer is
> degrading the question and the attempt being made and is also insulting.
> Honestly, this is a very very basic rule in communication and am socked
> that you don�t know about this.
> People don�t care how much you know about jar files, they do care how
> much you know the basic rules in life and communication. If you
> understand the meaning of respect you will understand how to answer
> questions and be a more valuable contributor to the community.

My contributions to this community stand on their own, as does my
reputation within the community. I dare say that someone new to the
community does not have much perspective on which to judge someone who
has been active for many years.
It's a shame that you misinterpreted one particular message and have
turned that into a personal attack; that is certainly not in the spirit
of this community.
By the way, if you look at the context of this thread, it is obvious
that knowledge of how to modify code in a JAR is exactly the center of
the discussion. The person who asked the original question asked:
"I am wondering whether it's possible to change the code which is
located in a jar file or not."

I stand by my assertion that this is NOT a question about Web Tools or
even Eclipse; it is a basic Java question. Yes, we can answer such
questions on these newsgroups, but we often choose not too because there
are too many Eclipse-specific issues to discuss and too little time
(time that many of us VOLUNTEER, don't get paid for, to help others). So
basic Java questions are usually pointed out so that the asker does not
wonder why he received no answer.


> We have *paid* to be able to take this course and LEARN things.

I think it is very wise that people pay to be trained and learn from
professionals, but that has absolutely no relevance here. Whatever
company is providing the course to you is obligated to provide service
to you. These newsgroups have no such affiliation and are helpful only
because of the many people who give their time.

> Just so that you know, this IS the place suggested by IBM committers and our course instructor to post any questions we have related to the work we are doing on Eclipse WTP.

The committers and instructors are correct; these newsgroups are an
excellent resource for getting help on Eclipse topics. They are even
sometimes useful for learning something general about Java or
programming in general, but that is not their primary purpose. I already
explained why such general questions are often ignored or not discussed
very much. In this particular case, the time it would take to explain to
someone how to extract, modify, and re-build code in a JAR is far too
much for me to spend in this particular forum; consider how many
unanswered questions there are every day that are Eclipse-specific and
you might understand why most of us focus on those rather than on people
asking basic/general questions about Java.

Again, I find it sad that a single message was misinterpreted and taken
to such an extreme; I find it tragic that I have had to take the time to
respond (time that I could have spent helping someone). But I have done
so because I am dedicated to this community and want to make sure
everyone, newcomer and old-timer alike, understands what goes on here
and how to contribute themselves. One of the things that is often
pointed out about these newsgroups is that people who are new and are
still only beginning to contribute (rather than just ask) should be
careful about the stones they throw. I wasn't the first person around
here to say that, but I feel it is worth repeating.

Anyway, I would gladly put my reputation (and the list of people I've
helped) up for judgment at any time. Heck, Google and eclipse.org hide
nothing! Just as my life will be judged by a greater authority when I
die, so are my contributions to this community judged by a greater
authority than you (thank goodness, because clearly in your mind one
single message, open to interpretation, is enough for a damning sentence).

Eric
Re: Eric Rizzo's comment [message #229831 is a reply to message #229816] Mon, 30 March 2009 17:33 Go to previous messageGo to next message
Davoud Salahi Rad is currently offline Davoud Salahi RadFriend
Messages: 2
Registered: July 2009
Junior Member
Windofkeltia wrote:

> On the other hand, there's no reason to excoriate Eric for his comment.
> He surely meant no personal offense and we don't know under what
> circumstances or frustrations he made it. At very worst, Eric is like
> the rest of us: human.


http://challenger110.wordpress.com/2009/03/30/how-not-to-com ment-ibm-eclipse-community/#comment-76
Re: a way to make the contribution to community [message #229839 is a reply to message #229478] Mon, 30 March 2009 17:33 Go to previous messageGo to next message
Xia Jun Shi is currently offline Xia Jun ShiFriend
Messages: 15
Registered: July 2009
Junior Member
As there are so many comments posted under my topic, I feel very
surprised.

The only thing I want to say is that let's focus on the bugs, and that's
the way to make our contribution to our community.

Nobody in the world is perfect. So please forgive all the mistakes which
human may make, even though some mistakes are so "stupid" and
"intolerable" from technical or behavior perspective. That's the way we
are learning.

What I can know from all the comments is that all the people have the same
wish: we hope the eclipse community becomes one of the most powerful and
helpful communities. So let's do something for that.

All the best to everybody,
Shelley
Re: How to change the code in jar file [message #229847 is a reply to message #229822] Mon, 30 March 2009 18:32 Go to previous message
Konstantin Komissarchik is currently offline Konstantin KomissarchikFriend
Messages: 1077
Registered: July 2009
Senior Member
> One of the things that is often
> pointed out about these newsgroups is that people who are new and are
> still only beginning to contribute (rather than just ask) should be
> careful about the stones they throw. I wasn't the first person around
> here to say that, but I feel it is worth repeating.

Let me underscore this point once more with Eric... By choosing to take
offense at a fairly basic comment that indicated that the question was not
appropriate for this forum and by going on a rant rampage you have cast
your entire group in bad light with the very same people that you hope to
work close with as contributors. Not a good start. You talk about basic
communication skills, but I would turn that looking glass on yourself.
What have you accomplished with these comments? Is anyone (including
yourself) better off as the result?

I stand fully behind Eric's tremendous record of community contribution.
The only thing that I wish Eric had added to his message is a pointer to a
forum that would have been more appropriate for the question. In this
case, the Eclipse newcomer newsgroup or the PDE newsgroup would have been
more appropriate for basic questions about modifying Eclipse plugins.

http://www.eclipse.org/newsportal/thread.php?group=eclipse.n ewcomer
http://www.eclipse.org/newsportal/thread.php?group=eclipse.p latform.pde

- Konstantin
Previous Topic:Registering own IDocumentProvider for JavaScriptEditor
Next Topic:Javascript libs not resolved
Goto Forum:
  


Current Time: Tue Mar 19 03:16:57 GMT 2024

Powered by FUDForum. Page generated in 0.03156 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top