Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (578)
games submitted by our members
Games in WIP (498)
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  
  Bundling Stripped Java 1.5 + Molebox?  (Read 2607 times)
0 Members and 1 Guest are viewing this topic.
Offline Evanstaul

Senior Newbie





« Posted 2005-10-22 23:01:27 »

I hope what I'm asking for isn't wrong.  I've read many, many posts on this topic already, so I have an idea of the controversy.  Anyway I am making a game where I can go the new JET 4.0 or try to "condense" the JRE.  JET is now Java 1.5 certified so thats good, but the final install will be about 20+ megs.  I want to experiment with the Java 1.5 JRE to get the game at least half-size.  I was wondering if there was a solid tutorial (step by step) on where/how/which parts to take out and what must be left in.  I know about "rt.jar" but is there anything else?   Also specific Molebox settings to get it working properly.  It didn't seem like Molebox could put any folders, so how do I add all those JRE subfolders?

My game is all software rendered, with 3rd party Joystick (JStick I think) and GAGETimer.  It goes fullscreen and windowed (needs AWT?).

Any help or advice is appreciated.  Thanks!
Offline tom
« Reply #1 - Posted 2005-10-22 23:28:45 »

You would save alot of space if you ditch AWT and use LWJGL instead. The only problem is that it will require OpenLG drivers to run a software rendered game.

Offline Riven
« League of Dukes »

JGO Overlord


Medals: 605
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #2 - Posted 2005-10-23 02:39:57 »

I managed to squeeze the JRE into 1.4MB (floppy!! Grin) after compressing. It was still able to launch a LWJGL 3d-engine. Just for fun.

Can't use it, until I find money somewhere to buy MoleBox.


But you really have to get rid of AWT/Swing in your game to squeeze the last air out of the JRE, don't forget to buy MoleBox. Molebox molebox molebox. grrr.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Evanstaul

Senior Newbie





« Reply #3 - Posted 2005-10-23 03:39:02 »

Is there an un-moleboxed, stripped JRE game out there where I can pry into.  Also can someone post instructions on exactly what to take out and leave in, and anything else that needs to be known to do it?
Offline Vorax

Senior Member


Projects: 1


System shutting down in 5..4..3...


« Reply #4 - Posted 2005-10-23 03:44:50 »

The game I am working on has a trimmed down JRE and it's not moleboxed (yet).

You can download it here: here

Under the install directory you will fined it in java\jre

Edit: It's not 1.5 though, it's 1.4.2.

Warning though:  I have been told this breaks the license agreement, so it won't be able to stay this way.

Offline Evanstaul

Senior Newbie





« Reply #5 - Posted 2005-10-27 03:26:32 »

Thanks for the info.  Its hard to know what to take out of the JAR file.  Nice game!
Offline Riven
« League of Dukes »

JGO Overlord


Medals: 605
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #6 - Posted 2005-10-27 10:48:01 »

You can automate that process making smart use of certain java.exe arguments... Wink Just check out which options there are, and pick the one you think will give you the right information Lips Sealed

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline princec

JGO Kernel


Medals: 282
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #7 - Posted 2005-10-27 11:09:27 »

I took out almost everything outside of java.lang, java.net, and java.io - and I specially left in RMI too which is useful for so many things. The way I did it was run the game with verbose class load on, and then painstakingly went through rt.jar removing all the classes that weren't in the list it printed out.

Cas Smiley

Offline Riven
« League of Dukes »

JGO Overlord


Medals: 605
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #8 - Posted 2005-10-27 11:53:47 »

Really?

I parsed output of the -verbose:class argument, made an app that reads rt.jar, and stores all 'matches' from the parsed output in new_rt.jar

Job done in 8 seconds.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline Evanstaul

Senior Newbie





« Reply #9 - Posted 2005-10-27 19:24:17 »

Okay the verbose:class will definitely work out, so thats how its done!  And the automated program to read the verbose:class output file, sounds like something to make public domain, hint hint.   Wink
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Riven
« League of Dukes »

JGO Overlord


Medals: 605
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #10 - Posted 2005-10-27 22:17:22 »

make sure you add quite a few packages, which are loaded before it starts printing to screen

such as

sun.misc
java.lang
java.lang.reflect
java.util

find out by trial and error.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline princec

JGO Kernel


Medals: 282
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #11 - Posted 2005-10-28 00:40:50 »

Ahh, there's a bit more to it than that... there were some extra classes required by different locales which you don't pick up doing it that way - so bang! It crashes in a Spanish locale. And I wanted a VM I could reuse a bit without having to do it for every game (at the expense of a few hundred kb) with a few things I didn't always directly use.

Cas Smiley

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (27 views)
2014-04-15 18:08:23

BurntPizza (22 views)
2014-04-15 03:46:01

UprightPath (38 views)
2014-04-14 17:39:50

UprightPath (20 views)
2014-04-14 17:35:47

Porlus (36 views)
2014-04-14 15:48:38

tom_mai78101 (61 views)
2014-04-10 04:04:31

BurntPizza (119 views)
2014-04-08 23:06:04

tom_mai78101 (219 views)
2014-04-05 13:34:39

trollwarrior1 (186 views)
2014-04-04 12:06:45

CJLetsGame (193 views)
2014-04-01 02:16:10
List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:05:20
java-gaming.org 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‑gaming.org
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!