• 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 ...
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

Odd characters when reading and writing

Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jj Roberts wrote:It does work if you are running it from the correct directory. What Knute is saying is that if your folders looked like my/folder/foo/bar/Zoo.java you would have to run

from the 'folder' directory. You have to run the commands from the directory which contains your package. In your case your file is at com/cha/iru/Zoo.java. What you need to do is navigate to the folder which com is in. Go and do that. Once you are in com's parent folder, you will need to run
(of course, if you are on Windows, the slashes go the other way). Don't forget to leave theat the top of your file. Now try it.

Hello, I am having some trouble working with JEE on Linux :
especially in reading writing I/O in files it shows the wished result but it is mixed with different characters which wasn't included in my program ,
is there a special command/ line to add when launching files via LInux ?
Posts: 76870
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please search for Joel Spolsky's article about everything a developer needs to know about text encoding. (Maybe this is it.) I would suggest you start by finding out which encoding your file is using, and what your program is using. Most programs on a Linux box will use UTF‑8 as a default. Also, are you using data input streams or similar for reading? A data input stream is probably not suitable for reading text files.in
The airline is called "Virgin"? Don't you want a plane to go all the way? This tiny ad will go all the way:
the value of filler advertising in 2021
    Bookmark Topic Watch Topic
  • New Topic