Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (593)
Games in Android Showcase (168)
games submitted by our members
Games in WIP (646)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Game Development / Shared Code / Re: Adding jars at runtime on: 2011-06-27 10:36:46
Thank you for this post!

I've been fighting with getting JavaFX apps to run from a JAR and this hack works perfectly. I added a few modifications so it is easier to use for loading JAR's at runtime. My problem was that I need JavaFX, MySQL, and Java EE support, but I can't expect the end user to play with their configuration settings to get the application to run.

As for the other responses there is a HUGE difference between this method and creating a new class loader. My first attempt was to load everything via class loaders but JavaFX will not work properly when loaded from a class loader since classes built by different loaders aren't compatible.

Using this method I can search the users computer for their installation of JavaFX in the standard install folders. For the MySQL driver I include it inside the jar (jar within a jar). I save the mysql driver to the users home directory. After that loading it with the above method is trivial!
Pages: [1]
 
deepthought (35 views)
2015-06-30 15:39:44

deepthought (39 views)
2015-06-30 15:39:09

deepthought (51 views)
2015-06-30 15:36:52

Za\'Anzabar (21 views)
2015-06-29 05:44:54

TritonDreyja (38 views)
2015-06-24 17:10:40

CopyableCougar4 (35 views)
2015-06-23 00:34:45

BurntPizza (40 views)
2015-06-21 20:36:46

cookiecompiler (83 views)
2015-06-11 15:42:53

cookiecompiler (45 views)
2015-06-11 15:41:14

NegativeZero (75 views)
2015-06-11 09:49:18
How Do I Expand My Game?
by bashfrog
2015-06-14 11:34:43

List of Learning Resources
by PocketCrafter7
2015-05-31 05:37:30

Intersection Methods
by Roquen
2015-05-29 08:19:33

List of Learning Resources
by SilverTiger
2015-05-05 10:20:32

How to: JGO Wiki
by Mac70
2015-02-17 20:56:16

2D Dynamic Lighting
by ThePixelPony
2015-01-01 20:25:42

How do I start Java Game Development?
by gouessej
2014-12-27 19:41:21

Resources for WIP games
by kpars
2014-12-18 10:26:14
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!