Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: .  (Read 6139 times)

0 Members and 1 Guest are viewing this topic.

Helios101

  • Newbie
  • *
  • Posts: 15
    • View Profile
.
« on: December 15, 2014, 07:29:08 pm »
.
« Last Edit: May 03, 2018, 05:21:48 am by Helios101 »

pdinklag

  • Sr. Member
  • ****
  • Posts: 330
  • JSFML Developer
    • View Profile
    • JSFML Website
Re: How to depoly JSFML game?
« Reply #1 on: December 16, 2014, 11:03:37 am »
(First off, note that this is not an Eclipse support forum, and I can't help with Eclipse specific problems at all.)

Quote
Extract required libraries into generated jars
This sounds scary, what exactly does this do?
I recommend not merging contents of other libraries into your own jar. You might run into licensing troubles - not concerning JSFML, but generally this is an issue. Rather set your jar's classpath in the manifest to jsfml.jar and deploy that separately. It's also easier to update if ever necessary.

Quote
the window pops up and the rest of the window is blank white. Then it stops responding.
Is it your game's window? If so, sounds to me like resources can't be found. You share too little information about your project, though, so I cannot really help here.

Make sure that your resources are available in the deployed version. If you load them from the classpath, make sure they're in your jar file. If you load them file-based, you cannot contain them in your jar, but you need to deploy the directory as it is in your development environment.
« Last Edit: December 16, 2014, 11:10:09 am by pdinklag »
JSFML - The Java binding to SFML.

pdinklag

  • Sr. Member
  • ****
  • Posts: 330
  • JSFML Developer
    • View Profile
    • JSFML Website
Re: How to depoly JSFML game?
« Reply #2 on: December 18, 2014, 06:43:09 am »
Well, how are your resources laid out, and how do you load them? Maybe let's know where your background image is located in your project, and how you load it in the game? That might help getting the answer here. :)

Quote
Do you by any chance know how to do this in Eclipse? Where is the manifest supposed to be located
Nope, I'm not using Eclipse myself, but that bit of info should be easy to find out there.
JSFML - The Java binding to SFML.

liesard

  • Newbie
  • *
  • Posts: 8
    • View Profile
    • Email
Re: How to depoly JSFML game?
« Reply #3 on: January 26, 2015, 12:47:56 am »
Well first of all, you shouldn't be putting your resources into the bin/ directory, as that is for binary files (.class files) and not for resources (images and sounds).  Those should be put into the res/ directory for organisation.
Try using the 'Package required libraries into generated JAR' option.  It's what I normally use and it works for me.  Also, make sure that you have put the JAR package into the same directory as the project, as that's where all the resources are.  If that doesn't work, then run it from the command line and tell us what the error message is.
If your class files are in the bin/ directory, then the command will be:
Code: [Select]
java -cp bin/;lib/jsfml.jar com.your.package.name.Main(Main will be replaced with the name off the class with the main method in it.  If you're on OS X, Linux or *BSD, then replace that semicolon with a colon)