Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Java Java Basics Perfecting the Prototype Reviewing Our Feedback

Compliation failed: error CS1525: Unexpected symbol 'import'. Wha??

treehouse:~/workspace$ mcs TreeStory.java && mono TreeStory
TreeStory.java(1,0): error CS1525: Unexpected symbol `import'
Compilation failed: 1 error(s), 0 warnings
treehouse:~/workspace$

              Any assistance would be highly appreciated :-) iWill

2 Answers

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi there! I see you have some C# experience. And I could've told you that just by the error :smiley: You've managed to mix up your compilers. You're trying to run Java through the monodevelop csharp compiler.

The command you should be using is:

javac TreeStory.java && java TreeStory

Try it again with the correct compiler! :sparkles:

Hope this helps! :sparkles:

Well of course I called out a C# compiler for my Java course! Oy! Jennifer got me on the straight in a professional and compassionate manner. You so R*O*C*K Ms. Nordell. This is the second 'my bad' in about 6 months, and I've been treated just so genuinely nice, makes me so glad I picked Treehouse from the list of providers out there. Well, today I should not be distracted by my consulting (Python and Ruby Selenium Webdriver scripts for a couple of QA pals) - at least I hope.

Thanks again Jennifer ;-)