3.0 Beginners Guide and New install of jME 3.10

Hi All,

I’ve started to look at jME again, and have hit an issue when using the examples included in the Beginners Guide. I can import them without an issue, but they will not build or run. I get the following error…

    warning: [options] bootstrap class path not set in conjunction with -source 1.6
D:\jMEProjects\JmeTests\src\jme3test\app\TestCloneSpatial.java:191: error: diamond operator is not supported in -source 1.6
        Set<String> skipSet = new HashSet<>(Arrays.asList(skip));
  (use -source 7 or higher to enable diamond operator)
D:\jMEProjects\JmeTests\src\jme3test\app\TestCloner.java:194: error: diamond operator is not supported in -source 1.6
        private List<GraphNode> links = new ArrayList<>();
  (use -source 7 or higher to enable diamond operator)
2 errors
1 warning
D:\jMEProjects\JmeTests\nbproject\build-impl.xml:521: The following error occurred while executing this line:
D:\jMEProjects\JmeTests\nbproject\build-impl.xml:219: Compile failed; see the compiler error output for details.

Any ideas?

Regards,

Steve

1 Like

The error already tells you what to do: Use Java7 or higher. You can change the version in your project settings.

2 Likes

I’m 95% sure I have Java JDK 7 installed… I’ve got Java 8.121 installed for sure, just not sure what JDK I’m running…

Thanks for the pointer. I’ll confirm when I’m at home.

Regards,

Steve

1 Like

It doesn’t matter what newer JDK you have installed and running if you then tell it to compile for Java 6. It will happily try to do as you say and give you the error about using features that are only available in newer versions.

So, set your project settings to compile for a newer version and you’ll be fine. For whatever reason, the JME SDK defaults to Java 6.

1 Like

The SDK is using the JDK7 already, but I think there was no release containing that new setting and especially 3.1.0-stable is using jdk6 I think.

Anyhow, you have to change that in the project settings just by right clicking → properties and there Java or something

1 Like

Hi All,

I’ve gone back and had a look at this, and yes, the project was set for JDK6… swapped it for JDK7 and it complained about source 1.7 instead.

warning: [options] bootstrap class path not set in conjunction with -source 1.7
C:\Users\user\Documents\JmeTests\src\jme3test\bullet\PhysicsHoverControl.java:187: error: cannot access MotionState
            getMotionState().applyTransform(spatial);
  class file for com.bulletphysics.linearmath.MotionState not found
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: C:\Users\user\Documents\JmeTests\src\jme3test\export\TestAssetLinkNode.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
1 warning
C:\Users\user\Documents\JmeTests\nbproject\build-impl.xml:521: The following error occurred while executing this line:
C:\Users\user\Documents\JmeTests\nbproject\build-impl.xml:219: Compile failed; see the compiler error output for details.
BUILD FAILED (total time: 1 second)

Then I checked it with JDK8

C:\Users\user\Documents\JmeTests\src\jme3test\bullet\PhysicsHoverControl.java:187: error: cannot access MotionState
            getMotionState().applyTransform(spatial);
  class file for com.bulletphysics.linearmath.MotionState not found
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: C:\Users\user\Documents\JmeTests\src\jme3test\export\TestAssetLinkNode.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
C:\Users\user\Documents\JmeTests\nbproject\build-impl.xml:521: The following error occurred while executing this line:
C:\Users\user\Documents\JmeTests\nbproject\build-impl.xml:219: Compile failed; see the compiler error output for details.
BUILD FAILED (total time: 2 seconds) 

This is all on a new install of JME, with no addons, or other projects etc…

1 Like

No, not really.

It complained that you don’t have a class MotionState. So you haven’t included some library. That error has nothing to do with your JDK.

1 Like

Ahh, sorry,

Being a little lazy and not reading errors correctly. I really should know better!

Why would the library not be included in the package… it’s the built-in jmetests… :confused:

1 Like

To head off the next question,
None of the Physics Demos Will Run .

1 Like

mitm - thanks. i’ll do that. :slight_smile:

1 Like