Hello. I have been having problems using pico to develop java programs. I used all the commands in a tutorial I read saying open up terminal and type:
cd
mkdir java
cd java
pico
and I type in the code. When I try to save it by pressing Control-O it prompts me for where it to be and it says:
File Name to Write:
I have no idea where to save it so I typed in /Java/. It then says:
File Exists OVERWRITE ?
and when I type in Y it says Error writing /Java/ is a directory. What do I do?
解决方案
Hello. I have been having problems using pico to develop java programs. I used all the commands in a tutorial I read saying open up terminal and type:
cd
mkdir java
cd java
pico
and I type in the code. When I try to save it by pressing Control-O it prompts me for where it to be and it says:
File Name to Write:
I have no idea where to save it so I typed in /Java/. It then says:
File Exists OVERWRITE ?
and when I type in Y it says Error writing /Java/ is a directory. What do I do?
Type the name of the file. Like
Expand|Select|Wrap|Line Numbers
Type the name of the file. Like
Expand|Select|Wrap|Line Numbers
It doesn''t me type anything in the prompt to overwrite or not except for Y and N.
OK, do the following:type cd
type mkdir java
type cd java
type pico
write your code
press Control-O
type test.java
press enter
It won''t prompt you to overwrite you the first time, after that it might. If so, type Y
It won''t tell you, that it''s a directoryThe thing is, you were trying to write the file not in the directory but over the directory (replace the directory with the file). That''s why it gives you the error.
Greetings,
Nepomuk
您好。我一直在使用pico开发java程序时遇到问题。我使用了教程中的所有命令,我读到了打开终端并输入:
cd
mkdir java
cd java
pico
我输入代码。当我按Control-O尝试保存时,它会提示我它的位置,它会说:
要写的文件名:
我不知道在哪里保存它所以我输入/ Java /。它然后说:
文件存在溢出?
当我输入Y时它表示错误写入/ Java /是一个目录。我该怎么办?
解决方案
你好。我一直在使用pico开发java程序时遇到问题。我使用了教程中的所有命令,我读到了打开终端并输入:
cd
mkdir java
cd java
pico
我输入代码。当我按Control-O尝试保存时,它会提示我它的位置,它会说:
要写的文件名:
我不知道在哪里保存它所以我输入/ Java /。它然后说:
文件存在溢出?
当我输入Y时它表示错误写入/ Java /是一个目录。我该怎么办?
输入文件名。喜欢
展开 | 选择 | Wrap | 行号
键入文件名。喜欢
展开 | 选择 | Wrap | 行号
我没有在提示中输入任何内容来覆盖或除了Y和N.
好的,请执行以下操作:type cd
输入mkdir java
输入cd java
输入pico
编写代码
按Control-O
键入test.java
按回车
它不会提示您先覆盖您它可能会在那之后发生。如果是这样,输入Y
它不会告诉你,这是一个目录是,你试图在目录中写文件,但over目录(用文件替换目录)。这就是它给你错误的原因。
问候,
Nepomuk
扫一扫关注IT屋
微信公众号搜索 “ IT屋 ” ,选择关注
与百万开发者在一起