#starting out

1 messages · Page 1 of 1 (latest)

upper quest
#

So I’m just starting out, teaching myself Java and I’m running into an error right at the beginning with the print text

cunning glenBOT
#

This post has been reserved for your question.

Hey @upper quest! Please use /close or the Close Post button above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

upper quest
#

Example of what I’m running into? Not really sure what I’m doing wrong as it matches my guide

viscid bough
#

please don't use images of screens

upper quest
#

Oh sorry!

#

Wasn’t sure how else to show it

viscid bough
#

looks like you're running it incorrectly

viscid bough
upper quest
#

I can’t tell what’s incorrect? Everything matches exactly how my guide shows it

viscid bough
upper quest
#

And I watched a yt video and it shows it the same as well

upper quest
#

I press run

viscid bough
#

oh that cursed thing

#

have you tried just running it manually

upper quest
#

I’ve just been pressing the little green play button that says “run beginning.java”

upper quest
viscid bough
#

the statement itself isn't dumb but... what does that mean? how is that answering my question...

upper quest
#

Idk what you mean by running it manually lol

#

On my errors it says “class ‘beginning’ is never used:1”

viscid bough
#

using the run button is having the ide run it

#

do you have java installed

upper quest
#

intellij is what I’m using

#

And ye I have Java installed

#

I tried to run manual and it says “nothing to show”

mighty current
#

hey

#

go to the file at the top left

#

click project structure

#

then check if you have java setup in intellij

upper quest
#

It says project, modules, libraries etc

mighty current
#

ctrl + alt + shift + s

upper quest
#

Ye I did that

#

Then it says project, modules, libraries etc

mighty current
#

in project it says SDK:

viscid bough
#

open the command line, navigate to the folder where you have that file, and run java Beginning.java

mighty current
#

manually i think they meant

upper quest
mighty current
#

good follow what chris says

upper quest
viscid bough
#

you skipped a step

upper quest
#

Oh shit

#

I didn’t see any other step?

viscid bough
#

navigate to the folder where you have that file

upper quest
#

Okay I’m there

viscid bough
#

in the command line.

#

if you're in the right place, you should be able to run (windows: dir | *nix: ls) and see Beginning.java in there.

upper quest
#

Okay I’m definitely not in the right place then

#

I think I’m a lose cause 😂🤦🏼‍♂️

viscid bough
#

tbh i think the ide fucked you over a bit on this one

#

just to be clear; ask about anything you don't understand. i don't know you, i don't know what level of background knowledge you have

mighty current
upper quest
viscid bough
#

according to your uh image, your file is in a project folder, main/src etc

upper quest
viscid bough
#

use cd folder to "open" into that folder

upper quest
viscid bough
#

use dir to see the contents of the current folder

mighty current
#

the src main

#

this is the side panel of intellij

upper quest
#

How do I get back to that there

#

Where it shows all those

#

Bc it said that before I did new project

mighty current
#

look at the side of the intellij

#

left side

upper quest
#

Mine shows this

mighty current
#

there should be like a small button thing called Project

upper quest
#

Sorry for pics

mighty current
#

you cant run this

upper quest
#

But it’s so needed lol

mighty current
#

click file

#

click new

viscid bough
upper quest
#

Okay did

mighty current
#

click new project

viscid bough
#

discord browser exists
snipping tool exists

upper quest
#

Okay I clicked new project

mighty current
#

click it and i will guide you

#

its not empty project right?

upper quest
#

There’s one that say new project and one that says empty project

mighty current
#

the new project

#

it will be like this

#

click it and choose language : Java and build system: Maven

viscid bough
#

bruh why is js listed alongside the others 💀

mighty current
#

no idea

upper quest
mighty current
#

it just popped up one day

#

change build system to maven

upper quest
#

okay I did that

mighty current
#

name change to firstApp

upper quest
#

Done

mighty current
#

create

viscid bough
#

oh you have different casing in your classname and filename

upper quest
#

okay now it popped up this

mighty current
#

go to main

upper quest
mighty current
#

and click the run button on the top right green one

viscid bough
upper quest
viscid bough
#

ah k

upper quest
#

And just tried lower case to see if it’d work

upper quest
#

But don’t I have to create new project to start coding something else?

mighty current
#

this is a new project

upper quest
#

Oh gotcha so just delete this and try to code my beginning thing again

#

But for public class I need to put Main?

mighty current
#

no need

#

type main in intellij

#

it will make it for you instead of typing whole thing

upper quest
#

okay I did that and this happened

mighty current
#

you need public class Main {}

#

always

#

inside those {} is your code

upper quest
#

ahh gotcha

mighty current
#

this way you wont understand java or intellij

viscid bough
#

or;

cunning glenBOT
upper quest
#

Okay perfect I’ll prob use both

#

Ty both for the help

#

You all are saints