-1

I coded a java file in a folder which is on my desktop.I copied windows terminal to this folder to execute and compile this file.When I compiled the file there was no problem.But when I tried to run the file,the same file it did found when I was compiling,it didnt found the file(like what?).

Screenshots Compiling

Running(Failed)

What I've tried so far

I tried including a class path in my terminal code but it didnt change anything.enter image description here

Where am I making a mistake please help me solving the problem.

1 Answers1

0

Because, you're not running it from the directory, relative to which, com/tunayilmaz/software/ directory exists.

Create a directory hierarchy, like ../com/tunayilmaz/software/ and put your .class file there. Then run java software from the root directory, where your /com is located.

docs.oracle:

compiled .class files should be in a series of directories that reflect the package name.

Giorgi Tsiklauri
  • 9,715
  • 8
  • 45
  • 66