我在linux中打开文件时遇到问题,但是,在Windows XP中没有ocurrs [英] I have a problem opening a file in linux, however, in windows XP doesn′t ocurrs
本文介绍了我在linux中打开文件时遇到问题,但是,在Windows XP中没有ocurrs的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好:
当我在linux中打开一些文件时抛出异常,当我在Windows XP中执行相同操作时,这不会发生。
这是抛出异常的代码:
Hi every body:
An exception is thrown when I open some files in linux, this doesn''t occurrs when I do the same in windows XP.
This is the pierce of code that throws the exception:
展开 | 选择 | Wrap | 行号
推荐答案
是每种情况下文件路径是否正确?请记住,Windows使用\作为其分隔符(别忘了逃避它!)和Linux / Unix使用/.
Is the file path in each case correct? Remember, Windows uses \ as its separator (don''t forget to escape it!) and Linux/Unix use /.
是的文件路径是正确的,例如此文件路径/ state / Artificial Intelligence / Articles / mydocument.pdf
我认为这不是问题,我不明白为什么在Windows中工作正常但在Linux中失败,除了我在上面发布的例外。
我希望你能帮助我。
问候
Ariel
Yes the file path is correct, for instance this file path /state/Artificial Intelligence/Articles/mydocument.pdf
I think this is not the problem, I don''t understand why in windows works fine but in linux fail with the exception I posted above.
I hope you can help me.
Greetings
Ariel
是的文件路径是正确的,例如此文件路径/状态/人工智能/文章/ mydocument.pdf ...
Yes the file path is correct, for instance this file path /state/Artificial Intelligence/Articles/mydocument.pdf...
你可能不得不逃避Linux中的空间,所以它将是
You might have to escape the space in Linux, so it would be
/ state / Artificial\\ Intelligence / Articles / mydocument.pdf
但为了测试这个,我''建议使用
But to test this, I''d recommend to use a
展开 | 选择 | Wrap | 行号
这篇关于我在linux中打开文件时遇到问题,但是,在Windows XP中没有ocurrs的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文