Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (757)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (843)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Removing unused classes  (Read 2593 times)
0 Members and 1 Guest are viewing this topic.
Offline princec

« JGO Spiffy Duke »

Medals: 1033
Projects: 3
Exp: 20 years

Eh? Who? What? ... Me?

« Posted 2004-05-06 13:16:49 »

What tools are available to remove unused classes and even methods from a set of jars? I'm sick of shipping all my util classes and methods with my game when 50% of the code is not actually loaded or executed.

Cas Smiley

Offline Herkules

Senior Devvie

Friendly fire isn't friendly!

« Reply #1 - Posted 2004-05-06 13:18:53 »

hm, not sure, maybe RefactorIt?

HARDCODE    --     DRTS/FlyingGuns/JPilot/JXInput  --    skype me: joerg.plewe
Offline desertrock

Senior Newbie

« Reply #2 - Posted 2004-05-06 14:19:52 »

just a thought:
if you run your app with the vm argument -verbose:class it outputs the classname as soon a specific class is loaded. save this output in a textfile, parse it an check all required jars against this file.
now it is possible to write new jars which only include the required classfiles.
i've written a little tool which is capable doing this. just a hack, but it worked for me.
the only problem is for classes which get loaded later on execution...
it was actually possible to hack the rt.jar, which size dropped dramatically (but i think it's not legal to distribute such a hacked rt.jar  Grin)
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline NVaidya

Junior Devvie

Java games rock!

« Reply #3 - Posted 2004-05-06 14:33:12 »

A jar file "shrinker" maybe ! Obfuscators (typically) can do this but with the obvious side-effect. May have to actually give it a go shortly.

Gravity Sucks !
Offline ryanm

Senior Devvie

Projects: 1
Exp: 15 years

Used to be bleb

« Reply #4 - Posted 2004-05-07 07:48:42 »

Could this be what you're after? Or perhaps this?

Yay for Ant!
Pages: [1]
  ignore  |  Print  

EgonOlsen (42 views)
2018-06-10 19:43:48

EgonOlsen (22 views)
2018-06-10 19:43:44

EgonOlsen (43 views)
2018-06-10 19:43:20

DesertCoockie (197 views)
2018-05-13 18:23:11

nelsongames (124 views)
2018-04-24 18:15:36

nelsongames (123 views)
2018-04-24 18:14:32

ivj94 (863 views)
2018-03-24 14:47:39

ivj94 (124 views)
2018-03-24 14:46:31

ivj94 (768 views)
2018-03-24 14:43:53

Solater (140 views)
2018-03-17 05:04:08
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!