Results 1 to 13 of 13
- 03-07-2012, 08:14 PM #1
Member
- Join Date
- Mar 2012
- Posts
- 7
- Rep Power
- 0
Could not find the main class error
Hello everyone,
Lil' introduction (skip it if you want
): for a few months, I'm hosting a Minecraft server. Minecraft is a pc game, and I like it really much. There is also an alternate launcher for that game, called Spout. Now I want to make a gamelauncher for the server, by editing an existing one. This one has an option to choose in the first screen, if you run the modded game, or the vanilla. Problem is, that it is overloaded with the theme from the server wherefore it was made. So I want to put my own/ the vanilla theme on it. But now I have the following problem:
I've downloaded a jar, what runs well. Even when I convert it to zip, unpack it, repack it & convert it back to jar, it runs well. But when I convert it to zip, unpack it, edit a class file using classeditor, zip it & convert it back to jar (so just edit some class files, just simple strings who only output a Title, or send you to a webaddress or something), it gives the following error: 'Could not find the main class: net.minecraft.LauncherFrame. Program will exit.' I didn't change the manifest file, and double-checked it. I've searched a lot on Google, but all the problems with a similar message, are just by things like different OS or JDK. And I tried a lot of the given solutions, but none worked. And compiling with javac doesn't help much either. Does anyone know what to do?
Thanks in advance, JasperLast edited by jasper580; 03-07-2012 at 08:21 PM.
- 03-07-2012, 08:30 PM #2
Re: Could not find the main class error
Are you sure you aren't breaking any copyright laws here? What you're doing sounds pretty shady.
How to Ask Questions the Smart Way
Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!
- 03-07-2012, 09:10 PM #3
Member
- Join Date
- Mar 2012
- Posts
- 7
- Rep Power
- 0
Re: Could not find the main class error
No. Not at all. Because if I have the permission from the original owner, I don't break any laws. If I don't get permission, I can just keep it for myself, and then I'm either not breaking copyright. The one who has written the launcher is either not breaking any laws, because he has written that launcher thing himself

So any help please?
- 03-07-2012, 09:52 PM #4
Member
- Join Date
- Mar 2012
- Posts
- 9
- Rep Power
- 0
Re: Could not find the main class error
Kevin, Minecraft can be modded or altered to essentially any extent; I can vouch for Jasper in this case.
Jasper, with the limited details, i'm afraid I can't be of much help. I have one suggestion (mostly out of personal preference), try using WinRAR. I rather doubt it'll help much, but I've had issues with winzip in the past. Last I knew, winzip refuses to include files with certain extensions.
As I said, I doubt it'll help much, but it's the best I can come up with. If you add more details, I might be able to assist further.
Hopefully this helps solve the problem.
- 03-07-2012, 11:28 PM #5
Member
- Join Date
- Mar 2012
- Posts
- 7
- Rep Power
- 0
Re: Could not find the main class error
Packing it up isn't a problem. As I told, it runs fine. But when I change just one letter in a random class with classeditor, the package gives the error 'Could not find the main class file'. It's pretty hard to explain...
- 03-08-2012, 01:12 AM #6
Re: Could not find the main class error
How to Ask Questions the Smart Way
Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!
- 03-08-2012, 05:27 PM #7
Member
- Join Date
- Mar 2012
- Posts
- 7
- Rep Power
- 0
- 03-08-2012, 05:30 PM #8
Re: Could not find the main class error
That's my point. Are you sure this project is open source? Are you supposed to be messing with these things? It really sounds like you're just trying to rebrand an existing product, which seems pretty shady. You might want to contact the developers to see if they can provide you with the source, as your current approach is just asking for all kinds of trouble- technical, legal, moral, etc.
Edit- Here, it is open source, so use the source instead of trying to edit class files. https://github.com/SpoutDev/SpoutHow to Ask Questions the Smart Way
Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!
- 03-08-2012, 05:43 PM #9
Member
- Join Date
- Mar 2012
- Posts
- 7
- Rep Power
- 0
Re: Could not find the main class error
So your answered your own question. But now comes the difficult part: Spout is not Minecraft. Actually it is rebuild from scratch. Difference is, that it looks like minecraft, and that it has support for minecraft, maps, schematics, and servers. And the most important part: it's launcher has no 'support' for native minecraft. And the one I'm going to base it one, has that support. And now comes the reason why I want to modify that launcher: it is overloaded with the theme of the server wherefore it was made. And I want to remove that theme. Like I wrote in the first post. And the reason that I'm not going to rebuild a launcher from scratch: my java is as bad. Just really bad. But you have to start somewhere. So let's get back to my question: how to get past the 'Could not find the main class file' error?
- 03-08-2012, 05:47 PM #10
Re: Could not find the main class error
You can't just edit class files and expect things to work just fine, especially if you're inexperienced with Java. Edit the source and recompile. I don't understand why you think it's easier to do it by extracting the class files, editing them, and trying to put them back together.
For anything more than that, you might consider contacting the developers directly.How to Ask Questions the Smart Way
Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!
- 03-08-2012, 05:52 PM #11
Member
- Join Date
- Mar 2012
- Posts
- 7
- Rep Power
- 0
Re: Could not find the main class error
For a simple thing: I'm inexperienced with java. I can't just edit a source. In that case, it's easier to just rebuild the jar from scratch. Because like I told: that source has totally NOTHING to do, with want I want to get. But I guess your right about contacting the developers. In the meantime: does anyone know a solution?
- 03-08-2012, 05:56 PM #12
Re: Could not find the main class error
Editing the source will require you to rebuild the Jar from scratch. How does the source not have anything to do with what you want to accomplish?
How to Ask Questions the Smart Way
Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!
- 03-08-2012, 06:02 PM #13
Member
- Join Date
- Mar 2012
- Posts
- 7
- Rep Power
- 0
Re: Could not find the main class error
What I actually meant was rebuilding the source from scratch. Because that source, is just a different Minecraft game. Like it told 4 posts above. And that launcher, has no option to choose between the Minecraft game, and the Spoutcraft game. And that launcher is included in the game, what will make me 'filter' it what will take a lot of time. That's why I'm basing it on something different, what has no source published yet. I only have to rename some strings in that way, and rebuild it
Last edited by jasper580; 03-08-2012 at 06:05 PM.
Similar Threads
-
Error: Could not find or load main class HelloWorldApp (HELP)
By couch_mango in forum New To JavaReplies: 29Last Post: 02-02-2012, 08:23 PM -
Please help! Cannot find or load main class error
By BenH in forum New To JavaReplies: 3Last Post: 12-09-2011, 03:51 AM -
Error: Could not find or load main class
By ITSlave in forum New To JavaReplies: 4Last Post: 09-15-2011, 09:47 AM -
runtime error 'could not find main class' ?
By ruud00000 in forum Java AppletsReplies: 5Last Post: 12-31-2010, 05:58 PM -
[SOLVED] Could not find the main class: error...
By bobleny in forum New To JavaReplies: 21Last Post: 03-02-2010, 10:53 AM


1Likes
LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks