0

I was working on a small project, it's about the game ROCK-PAPER-SCISSORS.

When I finished the code and tried to execute it, I've faced a problem

Here is how my console looks enter image description here

And here is another picture when I tried using eclipse enter image description here

djv
  • 15,168
  • 7
  • 48
  • 72

2 Answers2

0

Try to cd into the folder that contains all of these source files, and run your javac and java commands from there. It might be with the dot notation you mentioned above.

Alex Madrzyk
  • 1
  • 1
  • 1
0

In main method add if condition, to detect if user has passed paramters. Something like this:- if args.length <1 print no paramters passed. else new nameOfYourClass(args[0], args[1]);

In eclipse you can pass paramters to the main method. Here's [a link] (How to pass console arguments to application in eclipse?)

Community
  • 1
  • 1