• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

Can't compile any code

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello, I'm an absolute beginner in Java and programing. I've bought Head First Java book 2nd edition to learn something. After JDK installation I've tried to compile the very first code from the book, simple code about party invitation. I open MS Word and write code exactly the same as it is in the book. I rename file from party.docx to party.java. When i go to cmd, and run: javac party.java, cmd shows 100 errors and freezes so I have to shut the proces. I tried also with other codes and results are the same. Sorry for bothering you with such a noobish question and for my English. I run it on Win 7, Java 8, JDK 8 u66.
 
Ranch Hand
Posts: 99
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Never use Word for writing Java code. Use something like Notepad++ instead.
 
Marshal
Posts: 76887
366
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Good advice. And welcome to the Ranch
 
Bart Wtoras
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It is working now
Thank You very much.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You could also try opening this word file with notepad or notepad++ and see how different is your code.
 
Campbell Ritchie
Marshal
Posts: 76887
366
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch

I don't think seeing the control characters will help much, I am afraid.
 
Remember to always leap before you look. But always take the time to smell the tiny ads:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic