Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (780)
Games in Android Showcase (233)
games submitted by our members
Games in WIP (857)
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 3325 times)
0 Members and 1 Guest are viewing this topic.
Offline neuronich

Junior Devvie

Medals: 5

« Posted 2012-02-29 17: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 Devvie

Medals: 3
Projects: 1

Island Forge

« Reply #1 - Posted 2012-02-29 18: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: 123
Projects: 15


« Reply #2 - Posted 2012-02-29 18: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 Devvie

Medals: 5

« Reply #3 - Posted 2012-02-29 19: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
-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 Devvie

Medals: 5

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

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  

hadezbladez (1099 views)
2018-11-16 13:46:03

hadezbladez (501 views)
2018-11-16 13:41:33

hadezbladez (1091 views)
2018-11-16 13:35:35

hadezbladez (254 views)
2018-11-16 13:32:03

EgonOlsen (2543 views)
2018-06-10 19:43:48

EgonOlsen (2745 views)
2018-06-10 19:43:44

EgonOlsen (1546 views)
2018-06-10 19:43:20

DesertCoockie (2250 views)
2018-05-13 18:23:11

nelsongames (2084 views)
2018-04-24 18:15:36

nelsongames (2780 views)
2018-04-24 18:14:32
Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08

Deployment and Packaging
by gouessej
2018-08-22 08:03:45

Deployment and Packaging
by philfrei
2018-08-20 02:33:38

Deployment and Packaging
by philfrei
2018-08-20 02:29:55

Deployment and Packaging
by philfrei
2018-08-19 23:56:20

Deployment and Packaging
by philfrei
2018-08-19 23:54:46 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‑
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!