Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #20715 > unrolled thread
| Started by | mcheung63@gmail.com |
|---|---|
| First post | 2012-12-26 20:44 -0800 |
| Last post | 2012-12-27 14:15 -0500 |
| Articles | 4 — 4 participants |
Back to article view | Back to comp.lang.java.programmer
how to clean up unused java file in eclipse mcheung63@gmail.com - 2012-12-26 20:44 -0800
Re: how to clean up unused java file in eclipse Joerg Meier <joergmmeier@arcor.de> - 2012-12-27 14:34 +0100
Re: how to clean up unused java file in eclipse Lew <lewbloch@gmail.com> - 2012-12-27 11:07 -0800
Re: how to clean up unused java file in eclipse Arne Vajhøj <arne@vajhoej.dk> - 2012-12-27 14:15 -0500
| From | mcheung63@gmail.com |
|---|---|
| Date | 2012-12-26 20:44 -0800 |
| Subject | how to clean up unused java file in eclipse |
| Message-ID | <7180f798-396e-4b03-b628-2a57cc0a8bd7@googlegroups.com> |
Dear All
I have a project in eclipse, it has many java files, they are taken from an open source project. I will call one single function from one class, how can i clear out all unused classes?
thanks
from Peter (cmk128@hotmail.com)
[toc] | [next] | [standalone]
| From | Joerg Meier <joergmmeier@arcor.de> |
|---|---|
| Date | 2012-12-27 14:34 +0100 |
| Message-ID | <pprtx4y24m21.k6lmco90tfwd$.dlg@40tude.net> |
| In reply to | #20715 |
On Wed, 26 Dec 2012 20:44:51 -0800 (PST), mcheung63@gmail.com wrote: > Dear All > I have a project in eclipse, it has many java files, they are taken from an open source project. I will call one single function from one class, how can i clear out all unused classes? > thanks Select the files you don't want and press the Delete key. There is no automatic way to do what you want. An optimizer/shrinker such as ProGuard can be used to clean away unused classes from your compiled output, but its use is not trivial. Also, just because you only call one function doesn't mean no other classes are needed - the function or the class holding the function itself might reference a multitude of classes, possibly even all of them. Liebe Gruesse, Joerg -- Ich lese meine Emails nicht, replies to Email bleiben also leider ungelesen.
[toc] | [prev] | [next] | [standalone]
| From | Lew <lewbloch@gmail.com> |
|---|---|
| Date | 2012-12-27 11:07 -0800 |
| Message-ID | <5cab4b6f-3d21-41ec-bfb9-42102c2cabce@googlegroups.com> |
| In reply to | #20715 |
mche... > I have a project in eclipse, it has many java [sic] files, they are taken > from an open source project. I will call one single function from one class, > how can i [sic] clear out all unused classes? By not copying them into your project. However, this is both not the right way to do it nearly always, and risks your violation of license terms. Check with a lawyer to ensure that you comply with the open-source license. Your question is rather odd. What one function from what one class is so valuable that you'd lift it, and what open-source project has such a gem yet none of its other functionality will serve? Why not just add the JAR to your libraries? What's the big deal? -- Lew
[toc] | [prev] | [next] | [standalone]
| From | Arne Vajhøj <arne@vajhoej.dk> |
|---|---|
| Date | 2012-12-27 14:15 -0500 |
| Message-ID | <50dc9e3e$0$284$14726298@news.sunsite.dk> |
| In reply to | #20715 |
On 12/26/2012 11:44 PM, mcheung63@gmail.com wrote: > Dear All I have a project in eclipse, it has many java files, they > are taken from an open source project. I will call one single > function from one class, how can i clear out all unused classes? That will become a maintenance burden. I would just have the calling project have the jar file with the binary of the entire open source thing in classpath. That makes upgrade easy (assuming the function you use has not changed). And the jar file will typical just be a few hundred KB. If that is a problem due to unusual constraints then look for one of the obfuscator tools that removes unused binary code. Putting part of the source code of the open source project in your project tree will make it cumbersome to upgrade. Arne
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.java.programmer
csiph-web