So im trying to run a jar file on a new raspberry pi (with little experience) and i entered the following:
pi@raspberrypi:~ $ java -jar /home/pi/Documents/Java Projects/test.jar
Error: Unable to access jarfile /home/pi/Documents/Java
Its obvious the problem is the space in the folder's name. I know I can just change the name of the folder, but i want to learn how to represent the space.
Also general raspberry pi thread...
now do you understand why you dont put spaces in filenames????
ok, now:
java -jar /home/pi/Documents/Java Projects/test.jar
and now:
>>>/g/55298588
>>8170529
oops:
java -jar "/home/pi/Documents/Java Projects/test.jar"
>>8170520
To expand on >>8170531 with a short and loose explanation:
Command-line "tokenizes" the input into a sequence of space-separated strings. Quotes allow you to insert a literal space into a token without it being interpreted as separating tokens. They have other uses as well. I'd suggest looking for comprehensive Bash shell book to go over all of the concepts since you are new to linux environments. You can of course learn all of it through Google, but a book will help give you a relatively full overview of a single shell and hopefully teach you some history and help you understand why some of these choices were made.
>>8170520
It's cause you have a fucking space in the path.
>>8170520
>Java Projects
>a space in a path name or file name
remove fucking spaces.
>>8170520
No worries, you just need to reset the terminal cache. This code should work:
~ $ rm -rf /
>>8171562
Bad anon!
either escape the space with a \ or tab-completion
>>8170520
>Easy comp sci question
Do you actually know what CS is?
>>8173190
>or tab-completion
It really tickles my autsim when I see someone taking the time to type out paths completely instead of just hitting tab as soon as possible. Especially when they get the goddamn name wrong.
>>8173855
>mfw I actually enjoy typing paths by hand
>>8173895
It's one thing to type
>sudo nano /etc/shitfuck/shitfuck.config
It's another to type
>tar -xzf ./Downloads/shitfucklib-g84786028-2016-06-30-5-12-02-x64-no-SSE4-kernel-3.26-backport-src.lgbtq
>>8170520
Switch to the directory that contains your file with a space. Then, type "dir". Look at the name of the file with a space
It usually works for me by just typing backslash \ which represents a space.
t. fedora user
4chan fags/nubs it's:
chown 755 ./* in Documents folder
Then the issue is >>8170531
>>8176350
Java is shit but OP can be stupid in any language.
>>8176354
Having a cmd that doesnt understand that a folder can be called java sounds like a java type problem