rim wassim wrote:hello guys im new on this website
A warm welcome to the Ranch
rim wassim wrote:that's from java 8 certification book
Please let us know, which book is that? Thank you.
Well, the idea of this exercise is, that you really need to go through the struggle in order to understand yourself how things work. However, the mistakes you introduced are fundamental and might be difficult to debug, because this exercise I don't think explains these parts where you were mistaken.
rim wassim wrote:i use is : java -cp ".;C:\Users\wassim-rim\Desktop\Test2Java" packageb.Test2B.java
1. When you specify classpath, you need to specify files with their extensions.
2. When you specify the class you want to execute (with
java command), you don't specify file (class's) extension.
3. When you compile classes, you need to specify extensions of the files in the classpath(s) as well as for the classes you are about to compile.