[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Easy comp sci question

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 24
Thread images: 2

File: raspberry-pi-default-wallpaper.png (91KB, 1920x1080px) Image search: [Google]
raspberry-pi-default-wallpaper.png
91KB, 1920x1080px
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...
>>
>>8170520
Programming != computer science you massive faggot

The board you are looking for is >>>/g/
>>
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.
>>
File: deal-with-it-quote-2[1].jpg (99KB, 642x531px) Image search: [Google]
deal-with-it-quote-2[1].jpg
99KB, 642x531px
>>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
>>
>>8170528
Not even programming just literally using a computer.
>>8173855
^this

To answer your question: put quotes around the whole path or a backslash before the space (or use tab completion like a normal person)
>>
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
>>
>>8173855
>>8173895
>>8175014
I enjoy typing paths by hand when they are relatively short and I remember them. I tab-complete religiously otherwise.

>>8176326
Troll or blind? Permissions are not the issue.
>>
Then the issue is >>8170531
>>
>>8176347
Or just using java>>8176347
>>
>>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
>>
>>8176358
>>8176354
someone is mad javafags are taking their jobs
Thread posts: 24
Thread images: 2


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.