Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (538)
Games in Android Showcase (132)
games submitted by our members
Games in WIP (601)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1] 2
  ignore  |  Print  
  Question about bundling custom OpenJDK  (Read 7939 times)
0 Members and 1 Guest are viewing this topic.
Offline mojo
« Posted 2013-03-23 09:36:23 »

Last week I have finally decided to upgrade to Java7. I downloaded the small online installation package, but it was unable to download anything. OK, so I downloaded the offline version. Ever since I can’t run ANY applets (it's not security policy, they just crash).
After the big anti Java news campaign these last months, many security issues, recommendation of uninstalling Java and the permanent “it's slow” dogma this last fail made me really worried.

So I started to look around on bundling my own OpenJDK JRE. I have come across some Cas' posts on couple of sites and basically did the same as he did with OpenJDK. The JRE is now only 6MB. The performance level is little lower but otherwise my pet project runs nicely (true I tested it only on my machine).

My question is:  is it OK to bundle such modified JRE? I know that Cas claims no one cares, and he is doing it with the Oracle/Sun JRE for years. Still, is it a gray area or is it 100% legit?

Thanks.
Offline ReBirth
« Reply #1 - Posted 2013-03-23 12:21:01 »

I want to know the answer too. Near on future I want to release desktop game.

I am on linux and compile my libgdx projects with openJDK. Bundling JRE seems good, many people uninstall it after that java exploit issue.

Offline Cero
« Reply #2 - Posted 2013-03-23 12:37:37 »

its certainly legal to package a non-modified openjdk jre - the other stuff might too

shrinking the jre isnt necessary anyway...

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline mojo
« Reply #3 - Posted 2013-03-23 14:11:44 »

shrinking the jre isnt necessary anyway...

I think that ~80MB is still a lot. Recently I got Legend Of Grimrock and the whole installation is 400MB, and that is a pretty popular game with lot of content. Netbeans is 80MB (Java SE only).
So if I want someone to try just a demo or an alpha, requiring them to download additional 90MB could make a difference. I know that I would raise eyebrows.
In my current situation it would by 7MB vs 90MB.

Offline nsigma
« Reply #4 - Posted 2013-03-23 14:16:40 »

its certainly legal to package a non-modified openjdk jre

You can modify OpenJDK as much as you want! You can also redistribute the Oracle build, and can remove certain things - there's a document available somewhere. On my phone so you'll have to Google it!  Wink

The Oracle JRE is probably the way to go on Windows, as it's not easy finding an up to date OpenJDK. More sceptical of need for bundling on Linux - just distribute as a package with dependencies.

Praxis LIVE - open-source intermedia toolkit and live interactive visual editor
Digital Prisoners - interactive spaces and projections
Offline mojo
« Reply #5 - Posted 2013-03-24 07:37:53 »

I did some research on this topic. Following this document  it is OK to exclude some parts of Oracle JRE when you are redistributing it as a private application runtime. But modifying the jars (rt.jar) is prohibited. I'm using this for my conclusion.

Quote
...
(i) you distribute the  Redistributables  complete and
unmodified,  and only bundled as part of Programs,  (ii) the  Programs
add  significant and primary  functionality  to the  Redistributables,
(iii) you do not distribute  additional software intended to supersede
any component(s) of the  Redistributables  (unless otherwise specified
in the  applicable README file), (iv) you do not remove or alter any
proprietary    legends   or   notices   contained   in   or   on   the
Redistributables,
...

On other hand OpenJDK is GPL v2 with Class path exception which means if I modify the source and build a smaller binary, I just have to provide the modified source. But It is hard to find anything about modifying the binaries. I suppose that by providing information that this is a derivative work, made by removing stuff it should be legit (maybe providing scripts used in the process).

Still if anyone have some interesting links or real life experience, please share Smiley.
Offline gouessej
« Reply #6 - Posted 2013-03-24 12:33:49 »

Hi

You can use OpenJDK under Windows, some developers provide unofficial builds on Github. I was very sceptical in the past but nsigma is right. You can remove what you want from OpenJDK. Some members of the JogAmp Foundation and of other organizations are still discussing about distributing OpenJDK + missing features to make it work in desktop and embedded environments. For example, it is possible to use NetX under Windows as OpenJDK itself doesn't contain Java Web Start. OpenJDK under GNU Linux relies on Icedtea-web which provides Icedtea Web Start.

Offline Cero
« Reply #7 - Posted 2013-03-24 12:44:56 »


First of all: No. We talked about this a lot on this forum, and 5 years ago maybe, but today, no.

Secondly after you package it into an exe setup file or whatever archive, it shrinks to ~20mb

Offline nsigma
« Reply #8 - Posted 2013-03-24 15:02:39 »

You can use OpenJDK under Windows, some developers provide unofficial builds on Github.

Ah, interesting!  https://github.com/alexkasko/openjdk-unofficial-builds  When I last looked (~9 months ago) it was hard to find any actual up-to-date builds.

I was very sceptical in the past but nsigma is right.

I should frame that!  Wink  For someone so avid a proponent of GPL on here, I was somewhat surprised at your scepticism about the rights it gives you.

Mind you, a credit on bug 698 for all the nagging and links I had to furnish you with would have been nice!  Grin

Praxis LIVE - open-source intermedia toolkit and live interactive visual editor
Digital Prisoners - interactive spaces and projections
Offline gouessej
« Reply #9 - Posted 2013-03-24 17:58:38 »

Mind you, a credit on bug 698 for all the nagging and links I had to furnish you with would have been nice!  Grin
Done:
https://jogamp.org/bugzilla/show_bug.cgi?id=698#c6

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline mojo
« Reply #10 - Posted 2013-03-25 07:17:46 »

Thank you, really appreciate it. I'm happy to see such good responses on this topic.

Quote
First of all: No. We talked about this a lot on this forum, and 5 years ago maybe, but today, no.

As for the “size doesn't matter" issue, there are stores that will charge you for the size of your content (they are paying the 3G traffic) and you have to scale your price (and still be able to compete). So this will be another place where this myth doesn’t apply Wink.
Offline nsigma
« Reply #11 - Posted 2013-03-25 11:10:29 »


That was meant as a tongue-in-cheek dig, but thank you. Smiley

Praxis LIVE - open-source intermedia toolkit and live interactive visual editor
Digital Prisoners - interactive spaces and projections
Offline Nate

« JGO Bitwise Duke »


Medals: 158
Projects: 4
Exp: 14 years


Esoteric Software


« Reply #12 - Posted 2013-03-25 11:56:09 »

Some info I put together:
https://code.google.com/p/libgdx/wiki/BundlingJRE

Offline nsigma
« Reply #13 - Posted 2013-03-25 12:31:53 »


Looks great!  Unfortunately, I fear this may cause an issue soon - https://github.com/blog/1302-goodbye-uploads

Praxis LIVE - open-source intermedia toolkit and live interactive visual editor
Digital Prisoners - interactive spaces and projections
Offline Roquen
« Reply #14 - Posted 2013-03-25 13:02:30 »

JDK8 has a new tool "jdeps" (dependency checker, which I've never used) which is part of the new (and in progress) profile based builds which should spew out a minimal list of classes...other than those that can't be statically determined...dynamically loaded/generated.

http://mail.openjdk.java.net/pipermail/core-libs-dev/2012-November/012485.html
Offline gouessej
« Reply #15 - Posted 2013-03-25 16:34:56 »

That was meant as a tongue-in-cheek dig, but thank you. Smiley
I don't know what a tongue-in-cheek dig is, I will have to translate that into my mother tongue.

Offline nsigma
« Reply #16 - Posted 2013-03-25 16:58:52 »

That was meant as a tongue-in-cheek dig, but thank you. Smiley
I don't know what a tongue-in-cheek dig is, I will have to translate that into my mother tongue.

Ah, yes, sorry - a very English phrase.  Done in a joking way - hence the big smiley.  I wasn't that bothered about it!  Cheesy

Praxis LIVE - open-source intermedia toolkit and live interactive visual editor
Digital Prisoners - interactive spaces and projections
Offline Sublixt

Senior Newbie





« Reply #17 - Posted 2013-03-27 00:56:55 »


Will you be adding the Mac and Linux examples for packaging the jre with an app soon? Also you link to launch4j for windows, is there any similar program for Mac and Linux?
Offline Z-Man
« Reply #18 - Posted 2013-03-27 01:15:55 »


Will you be adding the Mac and Linux examples for packaging the jre with an app soon? Also you link to launch4j for windows, is there any similar program for Mac and Linux?
If you mean Launch4j that runs on Macs and Linux, yes Launch4j has versions for Mac in Linux. If you mean a program that creates executables for Mac and Linux, not that I'm aware of. However creating an executable for Macs is as simple as copying a jar into a .app structure (which is basically just a folder with executables and resources in it). For Linux a shell script is usually used to launch a .jar, as has been mentioned in this thread. For example, I simply use an ant build script to create a runnable .jar (this is just generic and will run on any OS that supports Java), then run Launch4j on that jar to get a Windows .exe, and finally copy the jar into a prebuilt .app file structure.
Offline Nate

« JGO Bitwise Duke »


Medals: 158
Projects: 4
Exp: 14 years


Esoteric Software


« Reply #19 - Posted 2013-03-27 01:44:22 »

Will you be adding the Mac and Linux examples for packaging the jre with an app soon? Also you link to launch4j for windows, is there any similar program for Mac and Linux?
Not sure what the best place is to host them. For Mac you create a .app directory and put a bunch of files in just the right place. For Linux you include a .sh script and tell them to figure it out on their own. Wink You can look at Spine or Droid Assault and even steal the .app and .sh files.

Offline ReBirth
« Reply #20 - Posted 2013-03-27 02:16:44 »

Geez we need real example here!

Offline princec

« JGO Spiffy Duke »


Medals: 429
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #21 - Posted 2013-03-27 08:50:18 »

My C++ launcher for Windows

My NSIS install builder for Windows

Mac and Linux versions are obviously just a case of take a peek and change what you will. I may actually get around to compiling the launcher for those two OSes as well but... meh.

Cas Smiley

Offline ReBirth
« Reply #22 - Posted 2013-03-27 11:22:12 »

So the exe needs to be compiled? Cry

Offline princec

« JGO Spiffy Duke »


Medals: 429
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #23 - Posted 2013-03-27 11:51:28 »

Well, yeah, but you can do it with free tools, obviously.

Cas Smiley

Offline ReBirth
« Reply #24 - Posted 2013-03-27 11:59:06 »

To make sure it,

Windows target can be targeted with launch4j running on all OS (not counting Solaris or Haiku Tongue)

Offline Roquen
« Reply #25 - Posted 2013-03-27 14:06:38 »

I'm surprised not to see zeroing out of environment variables.
Offline princec

« JGO Spiffy Duke »


Medals: 429
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #26 - Posted 2013-03-27 14:07:24 »

How does one do that?

Cas Smiley

Offline Roquen
« Reply #27 - Posted 2013-03-27 14:43:17 »

Under windows if you want to nuke all (to be sure none will effect HotSpot) GetEnvironmentStrings returns a list of all.  Then SetEnvironmentVariable to clear.
Offline Cero
« Reply #28 - Posted 2013-03-27 16:17:05 »

I would be interested too in how to make mac and linux deployments.

like I have a structure, a private jre, a shell script or whatever and I want to make a  DMG on mac / app whatever
and on linux, to me personally, a .deb would be the greatest - with dependencies... then maybe you can even leave out the jre

so:
- How to make a DMG / APP on mac
- how to make a .deb

On windows I personally dont use launchj4, I always had problems, I export using Eclipse, create a batch which uses my private jre and calls my game and then use a batch to exe tool - and lastly NSIS for installer

Offline princec

« JGO Spiffy Duke »


Medals: 429
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #29 - Posted 2013-03-27 17:36:49 »

Under windows if you want to nuke all (to be sure none will effect HotSpot) GetEnvironmentStrings returns a list of all.  Then SetEnvironmentVariable to clear.
Doh! I searched high and low on the internet for something to do exactly this, but failed. The answer is of course completely obvious now you point it out. Thanks! I'm going to update my code asap. There are a bunch of annoying crazy bugs caused by this.

Cas Smiley

Pages: [1] 2
  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.

rwatson462 (29 views)
2014-12-15 09:26:44

Mr.CodeIt (20 views)
2014-12-14 19:50:38

BurntPizza (42 views)
2014-12-09 22:41:13

BurntPizza (76 views)
2014-12-08 04:46:31

JscottyBieshaar (37 views)
2014-12-05 12:39:02

SHC (50 views)
2014-12-03 16:27:13

CopyableCougar4 (47 views)
2014-11-29 21:32:03

toopeicgaming1999 (114 views)
2014-11-26 15:22:04

toopeicgaming1999 (102 views)
2014-11-26 15:20:36

toopeicgaming1999 (30 views)
2014-11-26 15:20:08
Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50
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!