#Hello World Not Working

1 messages ยท Page 1 of 1 (latest)

scenic geodeBOT
#

<@&987246399047479336> please have a look, thanks.

scenic geodeBOT
#

While you are waiting for getting help, here are some tips to improve your experience:

Code is much easier to read if posted with syntax highlighting and proper formatting.

If nobody is calling back, that usually means that your question was not well asked and hence nobody feels confident enough answering. Try to use your time to elaborate, provide details, context, more code, examples and maybe some screenshots. With enough info, someone knows the answer for sure.

Don't forget to close your thread using the command </help-thread close:1027500463647621170> when your question has been answered, thanks.

sturdy bluff
#

Maybe I forgot smth

#

I literaly never ever ever touched java in my life so please tell me what's wrong

#

This is what I have

open gull
#

save the file

sturdy bluff
#

I did

#

It isn't helping

open gull
#

and the file name needs to match the class name

sturdy bluff
#

Ah...

open gull
#

and add public before class ๐Ÿ˜‰

sturdy bluff
sturdy bluff
open gull
#

can u show again ?

sturdy bluff
open gull
#

HelloWorld.java ( just to verify due to hidden extentions ) ?

sturdy bluff
#

Nope still doesn't work :(

#

I'm sorry

#

There was smth about jres and whatever but I didn't understand any of it

open gull
#

do u have java installed ?

sturdy bluff
#

Yeah

modern atlas
#

does the file compile?

sturdy bluff
#

I went to preferences and selected it even

wise swallow
#

is the class in src?

sturdy bluff
modern atlas
#

like which error do you get when you run it

sturdy bluff
#

Unable to launch: "the selection cannot be launched, and there are no recent launches

modern atlas
#

ah

open gull
#

can u share your entire screen ?

modern atlas
#

we need an eclipse guru then

#

I don't use eclipse

open gull
#

that means no config file has been made to run it @modern atlas , its the same as in intellij

modern atlas
#

what do you meean by "config"

#

intellij just lets you run any main method

open gull
#

that ๐Ÿ˜‰

modern atlas
#

by clicking on a green triangle

open gull
#

first time it runs, it generates a setting to use for next runs

sturdy bluff
open gull
#

@sturdy bluff can u share your entire screen ?

modern atlas
#

we definitely prefer it round there

sturdy bluff
#

Yea but my little brother is in the background ๐Ÿ˜ญ

wise swallow
#

i think you just put the file in the wrong place

open gull
#

just the eclipse screen suffices

sturdy bluff
wise swallow
#

i do agree that going for intelij over eclipse is a good idea

open gull
#

yeah, your project is not correct

modern atlas
#

yeah

wise swallow
#

yes

open gull
#

at this point u got 2 options, redo it, or swap to intellij ( most people here will answer quicker due to their knowledge of IJ )

sturdy bluff
#

Yea I'll swap

#

Thanks!

modern atlas
#

be sure to put your source files under the src folder once you create an intellij project

wise swallow
#

yeah you can run random java classes with a main, but you will need to compile and run it manually
IDEs like eclipse and intelij run projects, and those need to be properly configured. now normally the IDE does thiw for you, but if you dont know what youre doing you can accidentally screw things up without knowing why

#

which you did, in this case

modern atlas
#

as of recently, you don't actually need to compile them beforehand, you just do java HelloWorld.java and it works

wise swallow
#

that still compiles it, but in memory or something?

modern atlas
#

I think it just dumps the .class file next to it

wise swallow
#

idk the details, but it doesnt really matter either way. use an IDE prayge

open gull
#

usually when someone cannot press play to start, doing the commandline will be alot harder

safe zenith
# sturdy bluff

Usually, this happens in eclipse if you've never ran the main method before, you can right click on your file in the explorer window of eclipse and there should be a run selection