Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (580)
games submitted by our members
Games in WIP (499)
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  
  Packaging a Java3D app (with library) in one file  (Read 2606 times)
0 Members and 1 Guest are viewing this topic.
Offline Malohkan

Senior Member




while (true) System.out.println("WOO!!!!");


« Posted 2006-11-17 16:36:33 »

Is it possible to create a self-executable Jar file for a Java3D app with all of the Java3D libraries (for mac/win/linux) all in the same jar file?  I feel like I've seen this done before but now that I actually want to do it myself I can't find any examples of it Sad  I'm hoping to be able to do this as an alternative to Webstart.  Can this be done?

Admin and Game Developer at
GameLizard.com
Play Rimscape!    |    Play Conquer!
Online Riven
« League of Dukes »

JGO Overlord


Medals: 605
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #1 - Posted 2006-11-18 15:21:44 »

AFAIK Java3D installs its stuff in java.ext.dirs by default.

Something tells me that it should 'just work' when the files are copied into the
directory of the game, with proper classpath references.


One exception to this was the Java Comm API, which had the paths hardcoded
into the classes in the JAR.
I decompiled the class and changed it - yes, I know that's illegal.

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

Senior Member




for great justice!


« Reply #2 - Posted 2006-11-19 23:00:48 »

I've done it in a way that packed the whole JRE and all of J3D into one package, but it wasn't small. Fine if you're handing out CDs, not great for downloads.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Herkules

Senior Member




Friendly fire isn't friendly!


« Reply #3 - Posted 2006-11-25 11:24:31 »

For FlyingGuns I used JSmooth to create a binary distribution including Java3D. Just it is platform dependent.
Check out the FG download to see wether you like it.

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

JGO Knight


Medals: 11
Projects: 5
Exp: 10 years


Java games rock!


« Reply #4 - Posted 2006-11-27 01:22:13 »

Back in 2005 I made a utility (bJAR) which re-compressed Executable Jar files using more advanced compression algorithms instead of Deflate.

The output Jar is fully complient with java 1.4 1.5 and 1.6 and i believe that it is complient with 1.3 and 1.2.

By using the LZMA option I could achieve pretty decent reduction in size. e.g.

The jude-community.jar in the community version of JUDE is 4,614,701 bytes when compressed using Deflate, but when compressed using bJAR and LZMA option 3 I am able to reduce the size of the JAR to 2,323,990 bytes.

The JAR works as before. The only change is that there is a slight ( almost unoticable) pause before the java ap loads.

I have attached the utility to this post... you will have to remove the pdf extension.

This may make the option of including all of your libraries in a single executable JAR more viable. If you do add your libraries into one JAR, make sure you either decompress these library jars into your project structure if including the library JARs inside another JAR make sure the library JARs are uncompressed JARs. In this way you will achieve maximum compression using the bJAR utility.

Offline Herkules

Senior Member




Friendly fire isn't friendly!


« Reply #5 - Posted 2006-11-27 09:00:53 »

Interesting ... can bJAR be used in the context of webstart as well?

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

JGO Knight


Medals: 11
Projects: 5
Exp: 10 years


Java games rock!


« Reply #6 - Posted 2006-11-27 11:27:55 »

I have not tried it in a webstart environment... I dont see why it should not...

hmm

actually it might complain about security as it does funky things with classloaders substituting the default classloader with that of one generated by the java process.
Offline lieperik

Junior Newbie





« Reply #7 - Posted 2007-03-29 16:50:20 »

For FlyingGuns I used JSmooth to create a binary distribution including Java3D. Just it is platform dependent.
Check out the FG download to see wether you like it.

I am much interest to know how you included Java3D into the distribution using JSmooth. I just downloaded your game and that worked really well (very nicely done!!). Our product is now in Beta release (see also www.sudoku-ball.com) but the most difficult part is the deployment. Could you provide more details on how you included java3D?

Thanks, Marcel
Offline Herkules

Senior Member




Friendly fire isn't friendly!


« Reply #8 - Posted 2007-03-31 22:26:12 »

Hi!

Here is my jsmooth config file ... does this help already?

http://drts.cvs.sourceforge.net/drts/projects/flyingguns/etc/FlyingGunsClient.jsmooth?view=log


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

Junior Newbie





« Reply #9 - Posted 2007-04-03 08:39:40 »

Hi Herkules,

Thank you.

Marcel
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 (43 views)
2014-04-15 18:08:23

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

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

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

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

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

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

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

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

CJLetsGame (204 views)
2014-04-01 02:16:10
List of Learning Resources
by SHC
2014-04-18 03:17:39

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
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!