Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

So I Got This Game, See...

 
Noah Faust
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I made a processing applet game with the program eclipse. I would greatly appreciate it if anyone had a suggestion for turning it from a large folder into a single file that I could upload to free game hosting sites and the like.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you familiar with jar files? They let you package not just class files, but also other resources needed by the code (like images, sounds, other files) all in one file.
 
Noah Faust
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I exported it into a .jar file, but when I tried to upload it to Kongregate, it said it was an invalid file type.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure what Kongregate is or does, but jar files are definitely the way to distribute applets (or Java desktop apps).

If that's a hosting companies then I think it's none of their business what kind of files you upload, particularly when they're such common formats as jar. Sounds like something is misconfigured.
 
Noah Faust
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I see, I think this is less a java question than a game development question. Are there any good programs to run jar files with? I can't run the jar I made.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does your jar file have a manifest with a proper "Main-Class" entry?

This page has (and links to) information about making a jar file executable: http://faq.javaranch.com/java/JarFiles
 
Noah Faust
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks!
 
Steve Luke
Bartender
Posts: 4181
22
IntelliJ IDE Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Noah Faust wrote:I exported it into a .jar file, but when I tried to upload it to Kongregate, it said it was an invalid file type.


From Kongregate's FAQ:
What format of games can I upload?

We support Flash (swf) files as well as Shockwave. ...


It looks like that particular site doesn't support uploading Applet-based games.
 
Noah Faust
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for the link, I was trying to find more information but couldn't seem to find a details page.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic