Non-nightly build for Eclipse. [SOLVED]

I’m using Eclipse to work with JME, and am using nightly builds. However, I’m not up the the level of skill where I can deal with nightly issues. (That I’ve already hit) I’ve tried using the JMP, however, I cannot run my program with it; I’m on a mac, so Java 1.7 does not work, and my school for various reasons will not let me install Java 1.6. The only way I can run and write programs with JME is to use Eclipse and specify the JRE type, but the only builds provided for Eclipse are nightly ones, the ones as stated above, I’m not skilled enough to work with. So, aside from linking each jar from within the JMP app’s contents to Eclipse, how can I get the JMP build and use it with Eclipse, or alternatively, set the JRE in the JMP?



Thanks

You can checkout and build the tagged rc2 version: https://code.google.com/p/jmonkeyengine/source/browse/#svn%2Ftags%2Fjme3-3.0rc2



Before release we won’t put out any other packages really as adapting to changes in the project structure would mean too much work. From release on we might add JAR, OSGi and other distribution formats… As well as package a working JDK with the application :slight_smile:

1 Like

Thanks.

From your description another idea… You can also try and just download the JDK for that platform and unpack it (instead of installing it regularly), then specify the path in the etc/jmonkeyplatform.conf file (if you can change that, as its in the application folder). You can also start the jmonkeyplatform with a -jdk command line parameter.

Sorry for bothering you again, but how do I checkout based on a tag?

svn co https://jmonkeyengine.googlecode.com/svn/tags/jme3-3.0rc2/

1 Like

I don’t think I did it correctly; is this behavior normal:



[java]Node player = new Node();

player.setUserData(“1”, new Object());[/java]





http://i.imgur.com/6hjzO.png

Hm no not really ^ :slight_smile:



Something seems to went wrong.



Since you are on a mac, you can manipulate the enviroment variables on a per user variable in your .profile or something ( not sure how named under osx, i only know generic linux) that just replaces the default java with your own installation.

@EmpirePhoenix said:
Hm no not really ^ :)

Something seems to went wrong.

Since you are on a mac, you can manipulate the enviroment variables on a per user variable in your .profile or something ( not sure how named under osx, i only know generic linux) that just replaces the default java with your own installation.


Hang on, it is normal, right?:

Spatial calls:
[java]userData.put(key, new UserData(UserData.getObjectType(data), data));[/java]

UserData does:
if (type instanceof Integer) {
[java] return 0;
} else if (type instanceof Float) {
return 1;
} else if (type instanceof Boolean) {
return 2;
} else if (type instanceof String) {
return 3;
} else if (type instanceof Long) {
return 4;
} else {
throw new IllegalArgumentException("Unsupported type: " + type.getClass().getName());
}[/java]

If the type is not a long, string, boolean, float, or integer, it will through an exception.
@EmpirePhoenix said:
Hm no not really ^ :)

Something seems to went wrong.

Since you are on a mac, you can manipulate the enviroment variables on a per user variable in your .profile or something ( not sure how named under osx, i only know generic linux) that just replaces the default java with your own installation.


Hang on, it is normal, right?:

Spatial calls:
[java]userData.put(key, new UserData(UserData.getObjectType(data), data));[/java]

UserData does:
[java]
if (type instanceof Integer) {
return 0;
} else if (type instanceof Float) {
return 1;
} else if (type instanceof Boolean) {
return 2;
} else if (type instanceof String) {
return 3;
} else if (type instanceof Long) {
return 4;
} else {
throw new IllegalArgumentException("Unsupported type: " + type.getClass().getName());
}[/java]

If the type is not a long, string, boolean, float, or integer, it will through an exception.
@rangerplus10 said:
I don't think I did it correctly; is this behavior normal:

[java]Node player = new Node();
player.setUserData("1", new Object());[/java]


http://i.imgur.com/6hjzO.png


I don't think you can put a plain object as user data since it does not implement Savable. Also there is no point to doing it.
@pspeed said:
I don't think you can put a plain object as user data since it does not implement Savable. Also there is no point to doing it.

I first got the (a similar but stemming from the same source) error when I tried:

[java]Node player = new Node();
player.setUserData("1", new Name());[/java]

With Name being two Strings and several methods. I changed it to say object because it was easier than writing the sentence before this one. :)

Anyway, I got it to work by implementing savable. I think this has spun off topic (thanks to me) so I'll mark it as solved.

Thanks to everyone!

It has to implement Savable

@pspeed said:
I don't think you can put a plain object as user data since it does not implement Savable. Also there is no point to doing it.

@rangerplus10 said:
I first got the (a similar but stemming from the same source) error when I tried:

[java]Node player = new Node();
player.setUserData("1", new Name());[/java]

With Name being two Strings and several methods. I changed it to say object because it was easier than writing the sentence before this one. :)

@nehon said:
It has to implement Savable


And just to make it triply clear, it has to implement savable. :) Only a handful of primitives are supported that don't implement Savable (String being one... which seems like an ok thing to use for a name to me.)
@nehon said:
It has to implement Savable


Thanks, I you were just 30 seconds to late. :)

So Paul was 11 minutes early then :wink:

@nehon said:
So Paul was 11 minutes early then ;)

Ah, very good point. I probably should have read all the other posts before posting. :)

Whoops, did not see the two lines of code , well yes in that case as the others say.