• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Odd characters when reading and writing

 
Greenhorn
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 ?
 
Marshal
Posts: 80652
476
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic