<div dir="ltr">Hi Marco,<div><br></div><div style>It seems that we even put -source 1.5</div><div style><br></div><div style><div>add_custom_command(</div><div>  OUTPUT ${VTK_BINARY_DIR}/java/javac_stamp.txt</div><div>  DEPENDS ${VTK_JAVA_SOURCE_FILES}</div>
<div>  COMMAND ${JAVA_COMPILE} ${JAVAC_OPTIONS}</div><div>    -source 1.5 -classpath ${VTK_JAVA_HOME}/..${SEPARATOR}${ECLIPSE_SWT_LIBRARIES} -sourcepath ${VTK_SOURCE_DIR}/Wrapping/Java/ -d ${VTK_BINARY_DIR}/java</div><div>
    ${VTK_BINARY_DIR}/java/vtk/*.java ${VTK_BINARY_DIR}/java/vtk/rendering/*.java ${VTK_BINARY_DIR}/java/vtk/rendering/awt/*.java ${SWT_FILES}</div><div>  COMMAND ${CMAKE_COMMAND} -E touch ${VTK_BINARY_DIR}/java/javac_stamp.txt</div>
<div>  COMMENT &quot;Compiling Java Classes&quot;</div><div>  )</div><div><br></div><div style>Unless you are not using VTK 6.</div><div style><br></div><div style>Seb</div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Tue, Jul 30, 2013 at 11:56 AM, Marco Sambin <span dir="ltr">&lt;<a href="mailto:m.sambin@gmail.com" target="_blank">m.sambin@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hi all.<div><br></div><div>I am building VTK 6 on Windows. From CMake, I generate MS Visual Studio 2010 projects for both 32-bit and 64-bit architectures.</div><div><br></div><div>In CMake, I enabled Java wrapping, as I need to use VTK 6 from a Java application.</div>

<div>I specify the path of the JDK version 7 which is installed on my development machine.</div><div><br></div><div>The build process works fine, but I end up with a &quot;vtk.jar&quot; containing class files which are only compatible with JRE v7. Is there a way to specify some flags in CMake which would force the class files within vtk.jar to be built with the &quot;-source 1.6&quot; option of javac, forcing compatibility with JRE v6 or newer?</div>

<div><br></div><div>One solution is obviously to install JDK 6 on my development machine, and have CMake build vtk.jar using that JDK.</div><div><br></div><div>But I was wondering if there is a solution allowing me to use JDK 7 to build vtk.jar, still maintaining compatibility with JRE v6.</div>

<div><br></div><div>Thanks in advance for your input.</div><div>Best regards,</div><div><br></div><div>Marco Sambin</div><div><br></div></div>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br></div>