Add 3Dviewer into project but fail to compile

Hi all, I’m following the 3D viewer learning path and stuck at chapter 3 with compilation error. I added the viewer following the instructions and try to run the application locally but only get the following error, anyone experienced similar behavior? any recommendation to overcome this issue? Thank you. Buildfile: D:\Mendix\App\3DViewerTest-main\deployment\build_core.xml compile: [javac] Compiling 266 source files to D:\Mendix\App\3DViewerTest-main\deployment\run\bin [javac] D:\Mendix\App\3DViewerTest-main\javasource\viewer3d\actions\httprouter\ error: package org.hamcrest.core does not exist [javac] import org.hamcrest.core.IsInstanceOf; [javac] ^ [javac] D:\Mendix\App\3DViewerTest-main\javasource\viewer3d\actions\controller\ error: package org.apache.commons.httpclient.URI does not exist [javac] import org.apache.commons.httpclient.URI.LocaleToCharsetMap; [javac] ^ [javac] Note: Some input files use or override a deprecated API. [javac] Note: Recompile with -Xlint:deprecation for details. [javac] Note: Some input files use unchecked or unsafe operations. [javac] Note: Recompile with -Xlint:unchecked for details. [javac] 2 errors BUILD FAILED D:\Mendix\App\3DViewerTest-main\deployment\build_core.xml:30: Compile failed; see the compiler error output for details. Total time: 4 seconds  
2 answers

maybe this can help :


I just encountered the same problem and still don't know the solution

However there is a workaround:

1. Download the 3D Viewer sample app

2. Open in Mendix Studio and export the 3DViewer module

3. Import this module into your app


Another workaround is to get hold of the following jar files and add them to your userlib folder manually:

  • commons-httpclient.jar
  • commons-io-2.6.jar
  • hamcrest-2.2.jar