# Package Navigtion does not exist

**URL:** <https://forum.codecrafters.io/t/package-navigtion-does-not-exist/10229>\
**Category:** Challenges\
**Tags:** challenge:shell\
**Created:** [May 9, 2025, 10:34am UTC](https://forum.codecrafters.io/t/package-navigtion-does-not-exist/10229 "2025-05-09T10:34:46Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Didar83](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/didar83/32/9578_2.png) [@Didar83](https://forum.codecrafters.io/u/Didar83)\
**Post date:** [May 9, 2025, 10:34am UTC](https://forum.codecrafters.io/t/package-navigtion-does-not-exist/10229/1 "2025-05-09T10:34:46Z")

</div>

In code examples, there is code that is not compilable.

Here is the code:

```auto
import Builtin.Executable;
  import Builtin.Type;
  import Navigation.Cd;
  import java.util.Arrays;
  import java.util.Scanner;
  
  public class Main {
    public static void main(String[] args) throws Exception { 
      Scanner scanner = new Scanner(System.in);
      Cd cd = new Cd();
      while (true) {
        System.out.print("$ ");
        String inputs = scanner.nextLine();
        String[] input = inputs.split(" ");
        String command = input[0];
        String argument =
        String.join(" ", Arrays.copyOfRange(input, 1, input.length));
  
      Cd cd = new Cd();
        switch (command) {
                  case "exit" -> System.exit(0);
                  case "echo" -> System.out.println(argument);
                  case "type" -> {
                      Type type = new Type();
                      type.isBuiltinOrPathOrNon(argument);
                  }
                  case "pwd" ->
                      // Cd has a method to get the current working dir
                          System.out.println(cd.getCwd());

                  case "cd" ->
                        cd.setCd(argument);
                  default -> {
                      if (!argument.isEmpty()) {
                          Executable executable = new Executable();
                          executable.execute(command, argument);
                      } else {
                          System.out.println(command + ": command not found");
                      }
                  }
              }
          }
      }
  }

```

Here is output:

```auto
[compile] [ERROR] COMPILATION ERROR : 
[compile] [INFO] -------------------------------------------------------------
[compile] [ERROR] /app/src/main/java/Main.java:[5,17] package Navigtion does not exist
[compile] [ERROR] /app/src/main/java/Main.java:[14,9] cannot find symbol
[compile] symbol: class Cd
[compile] location: class Main
[compile] [ERROR] /app/src/main/java/Main.java:[14,21] cannot find symbol
[compile] symbol: class Cd
[compile] location: class Main
[compile] [ERROR] /app/src/main/java/Main.java:[42,30] cannot find symbol
[compile] symbol: variable argument
[compile] location: class Main
[compile] [INFO] 4 errors 
[compile] [INFO] -------------------------------------------------------------
[compile] [INFO] ------------------------------------------------------------------------
[compile] [INFO] BUILD FAILURE
[compile] [INFO] ------------------------------------------------------------------------
[compile] [INFO] Total time: 1.809 s
[compile] [INFO] Finished at: 2025-05-09T07:53:53Z
[compile] [INFO] ------------------------------------------------------------------------
[compile] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.13.0:compile (default-compile) on project codecrafters-shell: Compilation failure: Compilation failure: 
[compile] [ERROR] /app/src/main/java/Main.java:[5,17] package Navigtion does not exist
[compile] [ERROR] /app/src/main/java/Main.java:[14,9] cannot find symbol
[compile] [ERROR] symbol: class Cd
[compile] [ERROR] location: class Main
[compile] [ERROR] /app/src/main/java/Main.java:[14,21] cannot find symbol
[compile] [ERROR] symbol: class Cd
[compile] [ERROR] location: class Main
[compile] [ERROR] /app/src/main/java/Main.java:[42,30] cannot find symbol
[compile] [ERROR] symbol: variable argument
[compile] [ERROR] location: class Main
[compile] [ERROR] -> [Help 1]
[compile] [ERROR] 
[compile] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[compile] [ERROR] Re-run Maven using the -X switch to enable full debug logging.
[compile] [ERROR] 
[compile] [ERROR] For more information about the errors and possible solutions, please read the following articles:
[compile] [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[compile] Looks like your code failed to compile.
[compile] If you think this is a CodeCrafters error, please let us know at hello@codecrafters.io.

```

---

<div class="post-metadata">

**Author:** ![Didar83](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/didar83/32/9578_2.png) [@Didar83](https://forum.codecrafters.io/u/Didar83)\
**Post date:** [May 9, 2025, 10:38am UTC](https://forum.codecrafters.io/t/package-navigtion-does-not-exist/10229/3 "2025-05-09T10:38:39Z")

</div>

Sorry, I found the problem solution

---

<div class="post-metadata">

**Author:** ![andy1li](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/andy1li/32/10_2.png) [@andy1li](https://forum.codecrafters.io/u/andy1li)\
**Post date:** [May 9, 2025, 3:10pm UTC](https://forum.codecrafters.io/t/package-navigtion-does-not-exist/10229/4 "2025-05-09T15:10:22Z")

</div>

@Didar83 Do you mind sharing what was wrong? Would love to see if we can improve the tester / instructions.

---

<div class="post-metadata">

**Author:** ![andy1li](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/andy1li/32/10_2.png) [@andy1li](https://forum.codecrafters.io/u/andy1li)\
**Post date:** [May 11, 2025, 9:54pm UTC](https://forum.codecrafters.io/t/package-navigtion-does-not-exist/10229/5 "2025-05-11T21:54:28Z")

</div>

Closing this thread due to inactivity. If you still need assistance, feel free to reopen or start a new discussion!

---

<div class="post-metadata">

**Author:** ![Didar83](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/didar83/32/9578_2.png) [@Didar83](https://forum.codecrafters.io/u/Didar83)\
**Post date:** [May 12, 2025, 9:33am UTC](https://forum.codecrafters.io/t/package-navigtion-does-not-exist/10229/6 "2025-05-12T09:33:02Z")

</div>

I had a different implementation of the CD method, so if in the code examples you will provide the code of another class (Navigation.java), that would be clear

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex003/uploads/codecrafters/original/3X/7/0/700657133935c15703e22c7c8870394f6e6dc27d.svg) [@system](https://forum.codecrafters.io/u/system)\
**Post date:** [May 17, 2025, 9:33am UTC](https://forum.codecrafters.io/t/package-navigtion-does-not-exist/10229/7 "2025-05-17T09:33:58Z")

</div>

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.
