#my code does not work in intelij but works in eclispse? why?
1 messages · Page 1 of 1 (latest)
While you are waiting for getting help, here are some tips to improve your experience:
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.
Show the project structure
Go to File > Project Structure, and select at modules your source folder
File > Project Structure
Intellj
If that did not work send some screenshots of your project structure not only modules
Its a Java Server and not JavaScript, i only know JavaScript a bit like implementing it in a html file
u on school or what
I mean this:
at modules
modules is the important one rn
Everything looks currently right for me at modules
then show the file structure under src
do a screenshot of what inside the src folder is
I see that Intellj not see them as Java classes
your src is not a source directory
at modules it was, at least what i saw from his screenshot
yes, but evidently it is not
@empty laurel did you applyed the changes on project structure?
When intellj not see them as Java classes thats always a weird issue. Try this things: Check that project structure is applied, Not use the default SDK as language level
Go to Project Structure and select something else expect SDK default at language level
here in this window
you see under language level
You should be able to just right click src and make it the source directory
the thing is that it already is source directory on his project structure screenshot
its just a bad color pallet and hard to see
Here on the right side its selected
red marked settings----> project specific, blue marked---->for every project
you just have to select whatever version of jdk you want in SDK dropdown, if you don't have it then you can add it by option download jdk from dropdown
after that ---> apply--->ok
looks something like this
could you real quick, click on the Module from Project settings and paste a screenshot. It contains your src.
are all your files inside src folder?
.
select src folder--->select Sources from top to make it sources
oh wait i see the problem
apart from that not sure how you don't have a jdk
he selected the src folder from the other project he have inside and not the the src folder he is currently coding in
on the right side its a completly false directory
ye it's a diff one
he is inside that command line folder with the src folder
wait no hes project name is the same as the folder inside
Why do you even have all ur old projects inside a new project?
Split them into different projects in different folders
not put all projects in one project
And go to configurations and select application and ur main class
I cant help you now anymore i go eat and then i need go to school, sry
yews
off-topic, prolly shouldnt have that folder names like that. Should be short.
What the hell is your project structure
Is this one project?
Or it is just a folder with all your projects
He's doing it the eclipse way where you can have multiple projects showing in the same UI
Which is the problem
Yeah can you explain that to him please
Explain what
Jilko, you need to open each project individually in Intellij
Also I'm willing to bet your folder names will cause some kind of error
What's the n word
i had a similar problem where if i clicked Create module-info.java file during the project creation my code wouldnt run but it would run on intellij
not sure if its the same problem tho
@empty laurel maven ? Gradle ? Something else?
Why do you have two src
Deleted which one ?
Why are you modifying the files anyway, the moment you create a project, everything should work properly
It seems you edited things that broke it
And also
What is this folder with the weird symbol
Which is ?
You should have a src folder directly under the project root
Please do that
Not in some weird folder
Doesn't mean it's correct
?
Please do what I said
Now delete the folder with the single letter
Delete it please
The folder with the single weird letter
Have you deleted it ?
Show a screenshot of your project
Now right click on src
Mark as
Source folder
Ah it's already a source root perfect
Now go in the main class
And click on the green arrow at the left of the class or main method
Calgu
So ?
Wdym
Ah
Use a double