Page 1 of 1

Does this compile in new Eclipse IDE + Java 7?

Posted: Wed Jun 26, 2013 1:42 am
by RevenantBob
Trying to get maptools to compile. I'm not a Java expert (C++ expert here) but I'm getting this issue trying to run the build:

Unrecognized option: -Xdock:name=MapTool

I know it used to be setup for Java 6, was wondering if 7 was out of the picture?

Re: Does this compile in new Eclipse IDE + Java 7?

Posted: Wed Jun 26, 2013 5:25 am
by JamzTheMan
Yep, works just fine if not better :)

Are you getting any red marks anywhere? Usually if a class doesn't compile you'll get a red ! and you can dig into what's causing it, or look on your Problem list. Most likely I would say either it's checked out at the wrong level or you are just missing related jars or projects like rplib.

And are you having an issue at compile time (building) or run time? Usually I leave "Build automatically" on. Not sure by which you mean "run the build"? Build all or Run Configuration?

Re: Does this compile in new Eclipse IDE + Java 7?

Posted: Wed Jun 26, 2013 8:43 am
by RevenantBob
I got a bunch of warnings. No errors. I did a checkout on the trunk.

Re: Does this compile in new Eclipse IDE + Java 7?

Posted: Wed Jun 26, 2013 9:07 am
by jfrazierjr
Well.. my guess is that since the error is on "-Xdock:name=MapTool" which appears to be an Apple extension AND since the developer who builds and checks in all of the code using Eclipse(Azhrei) also happens to use a Mac AND since he is playing around with figuring out how to build both MapTool and the Launcher correctly on Apple machines using Damages, AND I am assuming the OP is not using a Mac(and by extension OSX).....


ie, I think Azhrei checked in the project settings and forgot to remove that section. I would suggest editing the project settings to chance the VM arguments in your local env.

Of course, it would be REALLY, REALLY, FREAKING NICE if a cross platform language REALLY, REALLY was cross platform and people did not have to worry about these BS tricks.

Re: Does this compile in new Eclipse IDE + Java 7?

Posted: Wed Jun 26, 2013 10:58 am
by username
The language is cross-platform. But the various OSes try to set themselves off from others. That includes providing features that look really necessary and cool but are not available elsewhere. So cross-platform either has to ignore those tremendously useful features (until the others have something similar, or cross-platform implements it itself) or provide some switches to enable them on this platform only. Such a thing is the Mac-dock.

Re: Does this compile in new Eclipse IDE + Java 7?

Posted: Wed Jun 26, 2013 11:17 am
by jfrazierjr
username wrote:The language is cross-platform. But the various OSes try to set themselves off from others. That includes providing features that look really necessary and cool but are not available elsewhere. So cross-platform either has to ignore those tremendously useful features (until the others have something similar, or cross-platform implements it itself) or provide some switches to enable them on this platform only. Such a thing is the Mac-dock.
But my point is that if "java -Xdoc:name=MapTool -jar MapTool.jar" does something "special" in the Apple version of the JVM that only works for Mac machines, the Windows/Linux versions should just IGNORE the darn same argument instead of blowing up!!!

Re: Does this compile in new Eclipse IDE + Java 7?

Posted: Wed Jun 26, 2013 2:11 pm
by username
jfrazierjr wrote:But my point is that if "java -Xdoc:name=MapTool -jar MapTool.jar" does something "special" in the Apple version of the JVM that only works for Mac machines, the Windows/Linux versions should just IGNORE the darn same argument instead of blowing up!!!
Read on the -X options. They may not work on every jvm. It is also a good thing that they fail hard, because ignoring them may look like it's honoring them, which may cause hard to understand problems. Imagine the -Xmx being ignored and debugging an OOM. Since the jvm that doesn't support a certain X doesn't know, whether it can safely be ignored, it barks.

Re: Does this compile in new Eclipse IDE + Java 7?

Posted: Wed Jun 26, 2013 11:01 pm
by Azhrei
jfrazierjr is right: I'm currently working on getting the build solid for OSX. When I get a small piece that works, I check in the code so that I can roll back to it later if needed. (I should be doing this in a separate branch, but that's pretty cumbersome with SourceForge so I've been lazy. :()

It's been especially bad since this past weekend because I'm in a hotel this week and the wireless connection is *crap*. I have to try doing commits three or four times before one will make it all the way through. And Monday night I just gave up and figured I'd work on it the next night instead, and in those types of cases the snapshot from the repo is likely to not build.

It's even worse since the MapTool project references the code from the common.build project but doesn't have an explicit dependency. Eclipse doesn't appreciate that. :|

I apologize for this whole snafu. Roll back to the last checking from the weekend and you should have a consistent repo. You might need to go as far back as Friday night, since I did work on a little over the weekend...

(PS: I'm having the same commit problems right now. Sigh.)