添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
稳重的钥匙扣  ·  SpringBoot中NettyWebcli ...·  2 年前    · 
直爽的饭盒  ·  python - Running a ...·  2 年前    · 
I am trying to print a text file from JAVA , the below code works perfectly on windows and some linux environments, but when i try this code on Oracle linux, the printed page contains only "IB" and the rest is blank. Below is the code i am using.

[ \code]


(only without the spaces)

Next, it helps if you post a complete self-contained example. One thing that a lot of people like to do is take your code, compile and run it. You have only given us a snippet, so if they wanted to do that, they'd have to write a bunch more code. Many folk will say "not worth the effort and time".


To your specific problem:
Have you validated that the file contains what you really think it does on both machines? No weird, non-printing characters?
Instead of printing to a page, what happens when you print to the screen? Do you only get "IB", or do you get the while file you are expecting? Right now, you don't know if hte problem is in the read or the write. So, try changing the write part and see. If it prints ok to the screen, you can try writing to a new file.
Could it be the printer, and not the computer? Maybe the printer requires something different?

I know nothing about printing pages...The above are just general debugging tips.