i copied my project from jmonkey ide to eclipse, i’ve correctly added libraries, assets etc… project seems to work normally but there is a problem.
In my game i have a betterCharacterControl walking on Geometries with rigidBodyControls, the problem is that in eclipse the betterCharacterControl bounces, while in jmonkey it doesn’t… i know there could be different causes for bouncing, but why this difference of behavoir ?? The code is exactly the same.
Should i expect anything else like this?
i suspect jbullet vs native bullet dependencies.
which uses which? how can i switch it?
Assumption number one.
We can’t see it so we can’t tell. Obviously something is different. Java is not magic. If something runs different in one place than another then one place has different jars or is a different java.
i added to eclipse all the libraries that are in the jmonkey installation folder
Instead you should add the ones that your project depends on.
Out of curiosity does the frame rate differ significantly between running through eclipse and the SDK?
P.S. On my setup, Fedora with KDE Plasma desktop, eclipse doesn’t run so well. Particularly background processes tend to halt eclipse entirely, I have to minimize the eclipse window and wait until the background process is complete before I can bring it back up and continue working with it. Which is why I switched to NetBeans 8.1.
Eclipse’s UI also makes greater use of things like rounded edges, gradients and drop shadows which take longer to render so overall I think eclipse might be heavier on resources when compared to NetBeans.
no significant differences in frame rates
You are not the only one has this problem. search BetterCharacterControl
If any of those threads are even remotely helpful to his actual problem then you might want to narrow it down for him… because as it stands it seems like a “didn’t include the same jars” problem.
Is definitely wrong since you will get competing libraries.
I use eclipse and I met this problem half a year ago. I don’t think it’s about the IDE, just run jme3test.bullet.TestBetterCharacter, it works fine both in eclipse and the SDK.
I did a search and find a lot of threads talking about this issue, such as:
For now, I use CharacterControl instead of BetterCharacterControl.
No magic. If a Java program runs differently in one place than another then it is not the same Java program or not the same Java. Period. End of story. Cannot be otherwise.
There is no magic “If eclipse then do this” code in BetterCharacterControl. However, if you include both bullet jars (which OP must have done because he said he included ALL the jars) then of course you will have all kinds of weirdness.
But if you run with the same java and same jars in both places… then you will have the same behavior. It cannot be otherwise.
- In jmonkeySDK, build your project, at the end you should see in log a line like :
compile: ... Copy libraries to /Users/davidb/work/jme3/BasicGame0/dist/lib. ... BUILD SUCCESSFUL (total time: 1 second)
- Copy ONLY jars from …/dist/lib into your eclipse project
And for future jme project, I advice you to switch from an IDE based project to a builder (gradle, maven, ant, …) based project, to become IDE agnostic.
EDIT: issue with your classpath, you have lib that should not be placed in the same project eg: bullet-native and *jbullet (that could be the cause of your issue, if jars are not load in the same order, not same classpath)
followed your suggestion, it works!!
i didn’t get the issue with the classpath by the way…
Indeed, use Maven or Gradle to handle dependencies instead of copy jar-files manually.You will avoid a lot of versioning issues in the future if you use any of those tools.
I’m not really a Gradle fan, but Maven works very well with Eclipse.
There are multiple bullet jars. You included them all. They are not all meant to be used together. Using them together means it’s a bit random which one will be used at runtime. That’s why it’s better to just include the right ones and not all of them.