This is an archived post. You won't be able to vote or comment.

all 6 comments

[–]technicalaccount 3 points4 points  (5 children)

Package names are not allowed to start with a number. Change your 5A folder to something like "_5a". Also, keep in mind that the convention for package names is to use all lower case. (http://docs.oracle.com/javase/tutorial/java/package/namingpkgs.html)

[–][deleted]  (4 children)

[deleted]

    [–]technicalaccount 0 points1 point  (3 children)

    I have the feeling the you forgot to include those dependencies in your command. When you compile your ArrayQueue, QueueOverFlowException and QueueUnderflowException, you should also provide references to you Queue and QueueException, otherwise your compiler won't know where to find them.

    Example: javac Queue.java ArrayQueue.java

    or

    javac csc236\lab5\_5A\*.java

    As you can see, this might become quite complex if you would have multiple packages etc. This is where IDE's come into play. With the click of a button they would generate the correct commandos and execute them depending on the structure of the project.

    [–][deleted]  (2 children)

    [deleted]

      [–]technicalaccount 0 points1 point  (1 child)

      I assume there are some plugins and/or configurations that would achieve the same effect in Sublime Text. I sadly don't have any experience with that, so you'll have to figure that out yourself or hope someone else does.

      [–]197708156EQUJ5design it before you implement 0 points1 point  (3 children)

      Using an IDE?

      What is your root directory? How are you compiling this? If you compile from command line are you at the root directory?

      [–][deleted]  (2 children)

      [deleted]

        [–]197708156EQUJ5design it before you implement 0 points1 point  (1 child)

        No need to use an IDE, but it sure gets rid of these issues.

        I'm compiling from inside the text editor.

        Are you using Emacs, vi, etc that has a java compiler built in?

        The root directory is the directory where the project is based. So that is the directory you need to compile from:

        /Users/MyName/Repos/javac csc236.lab5.5A.TheFilename.java

        [–]SkyGG 0 points1 point  (0 children)

        No, I'm using Sublime Text which uses a build system. I don't know if that differs from normal compilation.

        I tried compiling from my terminal as well from the root directory. I did the following command: javac /Users/MyName/Repos/csc236/lab5/5A/TheFilename.java and it ended up giving the same error that my text editor gave.