Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (494)
Games in Android Showcase (113)
games submitted by our members
Games in WIP (562)
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  
  yet another could not find or load main class...  (Read 898 times)
0 Members and 1 Guest are viewing this topic.
Offline lcass
« Posted 2014-08-20 00:41:13 »

So , for some reason this error likes following me , laptop to laptop , project to project I get the error Could not find or load mainclass when I export it as a runnable jar. I follow the standard exporting , I goto export , I press runnable jar , save it and make sure that the librarys are included. BAM could not find or load main class. I am lost and frustrated with this error.
Offline CopyableCougar4

Senior Member


Medals: 8
Exp: 1 year



« Reply #1 - Posted 2014-08-20 00:45:43 »

Check the Manifest.MF.

CopyableCougar4 Smiley

Either wandering the forum or programming. Most likely the latter Smiley

Github: http://github.com/CopyableCougar4
Offline Longarmx
« Reply #2 - Posted 2014-08-20 00:53:14 »

Are you choosing the right launch configuration to match with your main method?


Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Online Rayvolution

JGO Kernel


Medals: 197
Projects: 2
Exp: 1 year


Resident Crazyman


« Reply #3 - Posted 2014-08-20 02:04:30 »

Are you choosing the right launch configuration to match with your main method?

That's a lot of projects you got there. Shocked

- Raymond "Rayvolution" Doerr.
Retro-Pixel Castles - Survival Sim/Builder/Roguelike!
LIVE-STREAMING DEVELOPMENT: http://www.twitch.tv/SG_Rayvolution
Offline Longarmx
« Reply #4 - Posted 2014-08-20 02:22:11 »

Unfortunately most of them are unfinished.  Emo They're playable, but not entertaining for very long.

Offline basil_
« Reply #5 - Posted 2014-08-20 08:40:53 »

how do you "export" the jar ?

gradle, maven, ant, something else ?
Offline lcass
« Reply #6 - Posted 2014-08-20 10:22:23 »

I think I shall use the gyazo magic to aid with this .

then I open the mystical file options and I open up the luxurious export options pane.

I then export it after inspecting the drop down then gently pressing the finish button.

Now I open up the dark black command prompt and enter the file location .
Offline basil_
« Reply #7 - Posted 2014-08-20 10:41:43 »

arrr. eclipse. not familiar with, sorry for not helping.
Offline tkausl

Junior Member


Medals: 3
Exp: 5 years



« Reply #8 - Posted 2014-08-20 10:56:06 »

"java solis.jar" is looking for a class "jar" in the package "solis".
You are looking for "java -jar SOLIS.jar"

My English isnt that great. Correct me, if you want, im still learning this Language Smiley
Offline lcass
« Reply #9 - Posted 2014-08-20 12:36:15 »

Aha that helped and now for this...
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Quaker762

Junior Newbie


Exp: 3 years



« Reply #10 - Posted 2014-08-20 13:45:53 »

Make sure your Jar can find the lwjgl library (e. it's located where you're games loading it.). There should be now help for this one on the lwjgl website.
Offline Longarmx
« Reply #11 - Posted 2014-08-20 18:50:23 »

I always click the option to package the libraries instead of extract them. Don't know if it makes a difference though.

Offline lcass
« Reply #12 - Posted 2014-08-22 09:40:08 »

I always click the option to package the libraries instead of extract them. Don't know if it makes a difference though.
Its the natives that it uses , so I will have to plonk it all together and make a launcher for it , which is not too difficult I can do that in python.
Pages: [1]
  ignore  |  Print  
 
 

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Dwinin (15 views)
2014-09-12 09:08:26

Norakomi (45 views)
2014-09-10 13:57:51

TehJavaDev (57 views)
2014-09-10 06:39:09

Tekkerue (26 views)
2014-09-09 02:24:56

mitcheeb (49 views)
2014-09-08 06:06:29

BurntPizza (33 views)
2014-09-07 01:13:42

Longarmx (19 views)
2014-09-07 01:12:14

Longarmx (22 views)
2014-09-07 01:11:22

Longarmx (21 views)
2014-09-07 01:10:19

mitcheeb (30 views)
2014-09-04 23:08:59
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
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!