Warning
This page is located in archive.

What version of Java is necessary?

At least 1.6. Preferably 32-bit (even thought you might have 64-bit processor) Java SDK update 10 and up.

The project reports an error claiming an incorrect version of OpenGL.

First possible solution: Trying to run the project using the second configuration, which uses DirectX instead of OpenGL. If you have used the project from the archive (you have not created your own), then you can select the other configuration using the combo box with the “<default config>” text and choosing the “directx” configuration. The visualisation tool is going to be limited now, but usable.

Second possible solution: Install the latest drivers for your graphics card.

Third possible solution: Running in text-mode only. Click on the name of the project with the right mouse button, choose “Properties”, “Run” and add “-noVisio” to the “arguments”. The whole line is therefore going to look like this: “kui.BFS -noVisio”.

Running the project through the command-line

Make sure that the project is compiles. Take inspiration from the runBFS.bat (or runBFS_directx.bat or runBFS_novisio.bat) included within the archive. Changing “kui.example.BFS” to “kui.BFS” is enough.

Creating a project in NetBeans

It is not necessary to create the project, since it is included within the distribution. It may happen that you have a different version of Java set to be used by NetBeans and it may be necessary to switch to the correct one.

If Java 1.6 is already installed, then open “Tools” → “Java Platforms” in NetBeans, then select the Java platform (most likely “JDK 1.6 (Default)”) and click on the close button.

If you want to create your own project anyway, you can do the following:

  1. Unpack the zip distribution into a directory, eg., “c:\course”.
  2. Run NetBeans.
  3. “New project”, “General”, “Java Project with Existing Sources”.
  4. Set the project name to, eg., “lab”.
  5. Set the “Project Folder” to “c:\course”.
  6. Set existing sources to “src” (we are in the “c:\course” directory).
  7. Finish
  8. We can see that the project consists of two directories “Source Packages” and “Libraries”, right-click on the Libraries and select “Add JAR/Folder”.
  9. Go to the “c:\course\libs\lib” and select all libraries “gluegen-rt.jar”, “j3dcore.jar”, “j3dutils.jar”, “jogl.jar”, “kui_distribuce.jar”, “vecmath.jar”.
  10. Build Main Project.
  11. Right-click on the project name → “Properties”, “Run”.
  12. Set the “Main Class” to “kui.Application”.
  13. Set arguments to “kui.BFS”.
  14. Set VM options to “-Djava.library.path=libs\dll\”.
  15. “Run Main Project” should run your state-space search algorithm.
I had run the project, but after I have clicked two different nodes, but nothing happened

It is likely to be necessary to get closer (as per the guidelines to the assignment) to the node, which you have clicked the first. After a sufficient zooming in, you will see that the edges of this node are coloured. This is the result of the code from “BFS.java”.

courses/ae3b33kui/seminars_and_labs/07_java_settings.txt · Last modified: 2016/03/14 12:40 by saifueli