• 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

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: 76870
366
  • 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
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic