Win a copy of OCP Oracle Certified Professional Java SE 11 Developer Practice Tests this week in the OCP forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Ron McLeod
  • Tim Cooke
Sheriffs:
  • Devaka Cooray
  • paul wheaton
  • Mark Herschberg
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
  • Jj Roberts
Bartenders:
  • Carey Brown
  • salvin francis
  • Piet Souris

Very first steps in OCA Java SE 8 book

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
could you explain how to run these lines?

$ javac Zoo.java
$ java Zoo Bronx Zoo

Am I supposed to put them into the code of the Zoo class? I have tried to do so in Eclipse, but it gives error messages (of course). Sorry, I got lost at the very beginning... not very promissing  

Thanks on beforehand! Iza
 
author & internet detective
Posts: 40469
821
Eclipse IDE VI Editor Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to CodeRanch!

Those two commands are meant to be run at the command line (ex: the "cmd" program on Windows). We recommend preparing for the exam without your IDE (Eclipse) to learn the material better and get better at spotting code that doesn't compile for the exam.
 
Izabella Marton
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, thanks!

Unfortunately, I have another problem. When I tried to run javac packagea\ClassA.java I got this error message: illegal character: '\u0000'

I have already tried to open the java file in Notepad++ and save it in ANSI coding, but it didn't work.

Could you help me, please?

Thanks! Izabella
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
It's hard to tell where that comes from; you might try saving it as plain text in notepad. The normal encoding for the compiler is UTF-8.

Did you get the Zoo-program to work?

Good luck, the beginning can be a bit frustrating, but you will get it to work eventually!

Gertjan
 
The harder you work, the luckier you get. This tiny ad brings luck - just not good luck or bad luck.
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic