I 'm learning Coursera's algorithm class recently, and I'm going to follow Sedgewick to re-pass the core course of the algorithm. This course of supporting materials is algorithms 4th Edition, the official website for http://algs4.cs.princeton.edu/, this article mainly introduces the source of the book the configuration process.
Import of 1,jar Packages
As a small white, I used to use eclipse less, so I encountered a lot of problems in the initial configuration, first of all, how to import his jar package (I actually was this 艹 for an hour. In general, the import of the jar package is done directly through build path, but I can't use it after importing his stdlib.jar and Algs4.jar! Later found because the two jar files did not lead to the package name, found on the official website for a half day to find there are two-package series of files can be used, these two files are with the package name. Import these two files to solve the problem of importing jar package successfully.
By the way, when you put the jar file into the package path, the Eclipse Finder might not have included it, causing you to not find the file, and you can use the Refresh feature to refresh the file directory to resolve the problem.
Compilation mechanism of 2,java
Here we have to mention the Java compiler mechanism, we write the code file is. java file, this file needs to be compiled to form a. class file to be executed by the computer. The Java files in eclipse are all in the SRC folder, and when you save the file in it it will save the compiled class file directly under the Bin folder, so eclipse is automatically compiled by default.
When you execute a generic file, you can click Run, and when you execute a file with parameters, click Run configurations and set the parameters in arguments.
3, the default file lookup path is the project directory, so you can put the text document you need to use directly in the project directory.
With these three questions in mind, it is believed that you can easily use the package execution program for this book.
Algorithms (Sedgewick) companion Java source Configuration tutorial