Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (106)
games submitted by our members
Games in WIP (533)
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  
  [SOLVED] Problems with executables  (Read 1709 times)
0 Members and 1 Guest are viewing this topic.
Offline neuronich

Junior Member


Medals: 5



« Posted 2012-02-29 18:28:47 »

Hello once again!
I'm working in Eclipse with LibGDX.
I can't transform my Game into an Executable jar. Actually it does exports the jar. But I have a black screen and it quickly goes away. All three export options do not work (Packing libraries, attaching libraries and so on.) I don't have any errors or warnings during Export.
Googling hints that I might have problems with META-INF. But playing with it resulted in nothing so far.

-What should I do?
-Can you also suggest some infromation on applets.

Thanks in advance.
Offline Nyhm

Senior Member


Medals: 3
Projects: 1


Island Forge


« Reply #1 - Posted 2012-02-29 19:00:14 »

I don't use Eclipse (gasp) but you need to include a "Main-Class" Manifest entry in your Jar. Google for that.

My advice on Applets for Beginners: Don't. Learn to create an executable jar (as you're doing) first. That's just my opinion; applets have too much baggage to start learning from.

Island Forge: Create Islands with Stories for Others to Explore!
Free-to-Play with Membership and Upgrade options!
Offline kappa
« League of Dukes »

JGO Kernel


Medals: 74
Projects: 15


★★★★★


« Reply #2 - Posted 2012-02-29 19:29:12 »

You could give the JarSplice tool a try, it'll create an executable Jar for you. Its a simple GUI to use aimed at new java developers.

From Eclipse export as a normal jar just your project (classes and any resources such as images, sounds, etc). No need to include any libraries or anything at this point, then in the JarSplice GUI, add your jar and all the library jars that you are using on the jars tab. On the natives tab add all the natives (*.dll, etc) you are using, add the main class on the main class tab and it'll create a single executable jar for you.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline neuronich

Junior Member


Medals: 5



« Reply #3 - Posted 2012-02-29 20:03:57 »

I read the Java tutorial and tried slicer it didn't work.
Slicer just makes something unexecutable (corrupt jar).
In tutorial it is written that you need to define Main-Class: Mymainclass
My main class is DesktopStarter
There's Some Rsrc-Main-Class in the default export manifest though.
If I try to make Main-Class: com.abstractgames.DesktopStarter it says it doesn't see it.
 
In my jar I have
-My.classes
-GDX.jars
-resources(pics etc)
-som folder containing eclipse classes
-Manifest folder

Here what I have in Manifest file
Manifest-Version: 1.0
Rsrc-Class-Path: ./ gdx-natives.jar gdx.jar gdx-sources.jar gdx-backen
d-lwjgl.jar gdx-backend-lwjgl-natives.jar
Class-Path: .
Rsrc-Main-Class: com.abstractgames.DesktopStarter
Main-Class: org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader
Offline neuronich

Junior Member


Medals: 5



« Reply #4 - Posted 2012-02-29 20:13:06 »

SOLVED
The problem was that my resourses lied in the root folder by default.
I should have placed them into the res folder as in my project!
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.

pw (26 views)
2014-07-24 01:59:36

Riven (25 views)
2014-07-23 21:16:32

Riven (20 views)
2014-07-23 21:07:15

Riven (22 views)
2014-07-23 20:56:16

ctomni231 (51 views)
2014-07-18 06:55:21

Zero Volt (46 views)
2014-07-17 23:47:54

danieldean (37 views)
2014-07-17 23:41:23

MustardPeter (40 views)
2014-07-16 23:30:00

Cero (57 views)
2014-07-16 00:42:17

Riven (55 views)
2014-07-14 18:02:53
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
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!