Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can't get Megamek to work. Please help.
#21
I personally am at my wits end with what is wrong. If SSW works then I would think MegaMek would, too. My last idea is to take your MegaMek folder and put it on a USB drive and take it over to another computer and see if it runs there. Also test SSW, too to make sure the Java works. If MegaMek works on the other computer then we know that something between Java, MegaMek, and your computer is breaking.  If MegaMek doesn't run on the other computer then that means that folder of MegaMek is corrupted.

I don't know the inner workings of MegaMek, but is there some sort of environment variables or cache or default parameter that could have been changed by an outside program? That is more a question for whoever knows the code's process for opening Swing. I'll try looking at it to see if I can find it with my meager Java skills in the mean time.
Reply
#22
Did you verify your install of Java at there site. could be a partial load of the update or somthing crazy. power grid here is touch, run an update step away for a drink or what and get a flicker well updating can sometimes skip a packet but still run on most apps.

just go to the java site and run the active verifacation.

UB
Reply
#23
Summoning all the noobish Java knowledge I have, I am pretty sure that you are not throwing any exception when you start MegaMek. The problem is I can't really tell what part is failing because I don't know what things are returning as null and which ones aren't but in the end of it all mainGui == null. Too bad I can't come to your computer with the source code, add in a few check/print statements, and run it to find out what is wrong. You are correctly setting your guiName to swing.  Now, I know all this from your first posted log file.

But, your last try you said you tried starting it using the command line and it was "unable". That is way different from your first log file. You said you had the development version. The development version has a .jar file in the main directory. However, usually you have to download this from the SVN and compile it, which I don't think you did. So did you use an unstable windows release, for example 0.35.21 or 0.35.22? If you did and you typed it into the command line then you would get "unable" because the windows release no longer has the MegaMek.jar file. The file is instead MegaMek.exe file. The good thing is this file still accepts command line arguments. (Correct me if I am wrong, whoever knows.) So enter this into the command line:
Code:
MegaMek.exe -gui swing
This should be the equivalent of what Taharqa suggested. Hopefully this time you will get a log file instead of "unable." For some reason when I ran from the command line it didn't tell me it was redirecting the output, it just ran. So delete the previous log file before you run it so you know if it did make a new log file and post that if it doesn't work.
Last thought: the more I look at the code for MegaMek about this little swing problem, the more I think you might have a corrupted version of MegaMek or a corrupted version of Java. Have you tried running CCleaner from Grantwhy's post awhile ago?  I hope this all helps. I'll keep looking at the code. I've only recently learned Java, so I can't promise much. Thank goodness for the internet to look up all the stuff about the intrinsic classes in java.
Reply
#24
My 35.22 logfile looks like this after doing what you said:

Starting MegaMek v0.34.9 ...
Compiled on Wed Apr 20 14:37:47 EDT 2011
Today is Thu Apr 28 18:07:07 EDT 2011
Java vendor Sun Microsystems Inc.
Java version 1.6.0_24
Platform Windows Vista 6.0 (x86)
Total memory available to MegaMek: 253,440 kB

Unknown GUIConfusedwing

It didn't give me anything new in the command prompt. It opened another cmd prompt window (for about 2 seconds) that read "starting megamek" then closed itself. No, I didn't compile anything. Unfortunately, I don't even know what that means. So unless it happened automatically, I didn't do it.

My new 34.9 logfile now looks like this after repeating the same process:
Starting MegaMek v0.35.22 ...
Compiled on Fri Apr 15 14:54:07 EDT 2011
Today is Thu Apr 28 18:15:17 EDT 2011
Java vendor Sun Microsystems Inc.
Java version 1.6.0_24
Platform Windows Vista 6.0 (x86)
Total memory available to MegaMek: 506,816 kB

Unknown GUIConfusedwing

I did do the CCleaner thing, but I haven't had any new successes with with it. Any other ideas?

Reply
#25
And I also verified my install of Java on their site. It said everything was correct.
Reply
#26
Well, I'll be. I don't know what is wrong. The logs don't show anything out of the ordinary. (Though you did mix up which log was for what, but luckily the log tells us which is which. So no biggy. ;D ) I guess you just have to wait until the next release of MegaMek or Java comes out and see if the problem is fixed.
The last thing is if you have another computer with java on it. See if the MegaMek you have runs on it. If it doesn't then your MegaMek is probably a corrupt download. If it does, then something on your computer is being stupid and won't let MegaMek open Swing, but will let SSW for some reason.
You wouldn't be running a addon to Java or anything like that (example would be QTP, I think though I don't know if QTP would cause problems)? Also, you don't happen to have an environment variable for Java set which is not standard?
Those are my last two thoughts unless I get anymore. Wink
Reply
#27
I don't think I have QTP... largely because I don't know what that is.
How would I check to see if I have an odd environmental variable set?
Reply
#28
I might be barking up the wrong tree. But if you have your CLASSPATH variable set to something weird, then java might be looking in the wrong directory to find the property file. At least, I think, this would make the variable "is" = null which cascades down to giving the error you are seeing in your log files. Now this is a question more for those that know java: If java can't find the file when using getResourceAsStream does it throw an exception or just return null?
I don't have the time to test it right now, got a lunch meeting but I can test it later.

I actually don't know the exact way to get to the environment variables in Vista. In XP you could right click on My Computer -> Properties and then there was a button in one of the tabs if I can remember. Anyone else know?
Reply
#29
yeah, my java knowledge = null.
Is there anything I can post or attach that will help figure this out? Like a log file or anything?
Reply
#30
Post a screenshot of the MM directory, please.
Reply
#31
Here's my screenshot.


Attached Files Thumbnail(s)
   
Reply
#32
Well the new release is out. Have you tried it? And ya I know it has been out for some time, but I got strep and pink eye and have been out of commission for a week :'( . If it doesn't then you can at least post that log file, too. Thought it will probably be the same sad story as before  Sad . And it isn't much comfort that you have pretty much stooped all of us in how to help you. Well I guess I shouldn't speak for everyone, but you've got me on this one.
Good luck.
Reply
#33
Yeah, the log file for the new edition is the same as the previous one. No idea how to continue.
Reply
#34
have you tried running your copy of MM on a different computer.

I know I can copy the MM folder to a USB memory stick and run it (my MM) on a different computer.

Unfortunately I don't have the free time at work ... errr ... that different computer to play around with MM theses days, but it does work.


what that would tell you/us is if the problem is definitely with your computer (java or some other problem).
Reply
#35
I have no tried it on another computer. Thats not an easy test for me unfortunately. I wish I could find a checklist or a diagnostic tool I could use to isolate what is wrong on my computer. It is probably something stupid like a 1 where there should be a 0 in the code.
Reply
#36
Can you open the MegaMek.jar file in a zip program, like 7zip or winzip, and open the "MegaMek.properties" file contained in the megamek folder inside it in a text editor, and post its contents?
Reply
#37
If you know how to open jar files on windows, I would suggest downloading the megamek.*.tar.gz version rather than the windows version. Then just start up MegaMek via the included jar file.  You might just be able to double-click the jar file in windows, but I am not the right person to ask.
Reply
#38
In my past experience, if memory serves me, you can just double click the .jar file. That should work if java is associated with the .jar file. It should start up and run. However, I don't think that would solve the problem, but it is worth a shot at this point.  :-\
Reply
#39
This is fairly serious necromancy, but this is also the only thread I've ever found detailing my friends problem.

He has the exact same issue as described by OP.  In an odd twist, he has had the same Unknown GUI error on both his old computer, and his brand-new laptop, making me wonder if it's not some conflict with his usual suite of programs.  His girlfriends computer does not exhibit this behavior.

Here is his megameklog.txt dump:

Starting MegaMek v0.35.26 ...
Compiled on Tue Dec 27 17:41:35 EST 2011
Today is Tue Jan 03 05:42:50 EST 2012
Java vendor Oracle Corporation
Java version 1.7.0_02
Platform Windows 7 6.1 (amd64)
Total memory available to MegaMek: 466,048 kB

Unknown GUIConfusedwing

I'm currently having him try Sun Java 6u7, but not holding out much hope for that being the magic bullet.
Reply
#40
Hi hotsauce,

Have been having the exact same problem as you, no luck at all running the MegaMek executable any which way I tried.

Just got the game to launch in version 0.34.10.  For whatever reason, it seems the way java is running on my computer does not allow it to open or access .jar files.  The workaround seems to be to extract the contents of the .jar files and then run the MegaMek.class file.  The following is copied from the MegaMek readme file, and represents exactly what I did.  Reading through your posts, it does not seem you have tried this yet, so it might be worth a go:

(Start quote)
If you have a VM, but it does not support .jar files, then use your favorite
extraction program to decompress "MegaMek.jar", "collections.jar",
"TinyXML.jar", and "Ostermiller.jar" into a new "classes" folder (create
the "classes" folder in your main "megamek" folder).  Once these steps
have been done (you only need to do the above steps once), you will
need to set the classpath to the classes folder and the current folder
and run "MegaMek.class".  For example, using Sun Java, run:

java -cp .;classes megamek/MegaMek

Note that in some cases, the semicolon may need to be escaped:
java -cp .\;classes megamek/MegaMek
(End quote)

I found that there were a few more .jar files than the readme mentioned, I extracted them all to the classes folder for good measure.  In cases where files were to be overwritten or not, I went in favour of the larger version of the file.

Still have no idea why the .exe file does not run, but at least I can run the game now.

Hopefully you find this post and it is of use to you or someone having the same problem!

Good hunting.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  MekHQ launched Megamek games don't work .46/.47 cryptoknight 1 880 09-01-2019, 08:40 AM
Last Post: cryptoknight
  New,Can't get megamek/mekhq to work CrimsonGear 7 916 06-24-2018, 08:41 PM
Last Post: Hammer
  Can't get Megamek to work thechap909 7 1,093 05-02-2018, 01:01 AM
Last Post: NickAragua
  Can't get Megamek to work dogovich 1 936 12-21-2013, 01:55 PM
Last Post: Xenon54z

Forum Jump:


Users browsing this thread: 1 Guest(s)