jar -tf KitJar.jar
javac -cp com/KitJar.jar UseKit.java
UseKit.java:1: '.' expected
javac -cp com/KitJar.jar:. UseKit.java
narendra bhattacharya wrote:in linux based os... / is the root directory but on OSX i don't know...
in windows we have to with write with full path like c:/pro....
java -classpath /Documents/Java/myProject Another
java -classpath /Documents/Java/myProject/source Another
java -classpath /~/Documents/Java/myProject Another
java -classpath /~/Documents/Java/myProject/source Another
Ernest Friedman-Hill wrote:Congratulations! Yes, I know the feeling.
Very often, the act of explaining something to someone else is enough for you to figure out the problem. This has been called the "rubber duck effect" -- you can explain your problem to an inanimate object like a rubber duck, and you still receive the benefit.
OK, not understanding yet... Is it because ArrayList doesn't implement Comparable?
Jim Hoglund wrote:SelectionSort is defined as accepting a type parameter that is passed
on to Comparable<T> and ArrayList<T>. But when SelectionSort
is initialized, where the errors appear, none is provided. Initialization
should look something like below, where CompClass extends Comparable.
Type safety: The constructor SelectionSort(ArrayList) belongs to the raw type SelectionSort. References to generic type SelectionSort<T> should be parameterized.
I guess the reason I ask is that there already is a method to do just that, File.exists(). File.isFile(), on the other hand, would seem to be a method that assumes that a file exists and checks to see if it is actually a file. In which case, if the file really wasn't there, it would make sense to throw an exception. Seems logical to me.
Henry Wong wrote:
Personally, I would find it really annoying if it did that. Exceptions are for exception conditions. Reporting that the file doesn't exist, when the task is to check if the file exist, is hardly an exception condition.
true if and only if the file denoted by this abstract pathname exists and is a normal file; false otherwise