#IntelliJ seems to compile the wrong file and I do not understand why?

31 messages Β· Page 1 of 1 (latest)

noble cargo
#

Hi there,
I am just starting with Java as a complete newbie. I try to work with a udemy class but while theirs works, I fail at the very first hello-world-application, which is driving me nuts. I followed the instructions as best I could (they work on a windows, I work on mac and their intelliJ looks slightly different) and I have deleted the whole project and started fresh 4x times now. Everything is formated in utf-8, I manually checked, but I keep getting this error while compiling (see screenshot).
My Application.java contains this code, nothing else:

    public static void main(String[] args) {
        System.out.println("Hallo Welt");
    }
}````
When creating this project under "new project" I selected the language-option Java (obvi), the build system maven (bc it was suggested in the video), and JDK 17 (Oracle OpenJDK version 17.0.7).  I unchecked the option for sample code.
Unfortunately I am so new to this, I don't even know where to start looking for the mistake. I have chatted with Chat gpt until it ran out of ideas. :/
Does anyone have an idea what I could do or where I made the mistake?
stone lichenBOT
#

βŒ› This post has been reserved for your question.

Hey @noble cargo! 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.

nocturne scaffold
#

It seems to be creating a ._ prefixed version of every file and folder in the template

#

(I've never seen this before)

noble cargo
nocturne scaffold
#

Can you right click another one of those files > copy reference > entire path (or something) then in terminal write file [paste the path]

noble cargo
nocturne scaffold
#

Any prefixed with ._

noble cargo
#

Oh no, so before I continue learning Java I should learn IntelliJ first? πŸ˜‚

nocturne scaffold
#

No it's fine. I think you just got unlucky. Where are you creating the project?

#

An iCloud drive or something?

noble cargo
#

No, I saved it on my extra hard drive.

nocturne scaffold
#

Ah ok it might be NTFS formatted which is what that bug report is talking about

noble cargo
#

No, actually that was an entire afternoon of headache for me. lol. it is formated in exFat...

nocturne scaffold
#

So your options are:

  1. use local Mac disk instead of external HDD
  2. Use another OS
  3. Reformat the HDD? Might still not work
nocturne scaffold
#

Actually let's just see how bad it is, can you create a new class (right click java > new > class > call it anything)

noble cargo
#

Ok, I'm still at the start of the project, I will just move it to the mac disc. That seems the easiest option rn. πŸ‘

#

sure, hold on...

nocturne scaffold
#

Does that create a ._ equivalent file too?

noble cargo
#

Yes, I have another ._ class.

nocturne scaffold
#

Yeah maybe just move to local disk

#

That will get very annoying very quickly

noble cargo
#

Yes, that is super frustrating indeed. I am moving it as we speak...

#

Ok, I re-did it all on the internal drive and it worked on the first try... I am very happy and I am also slighly miffed that I wasted so much time on this little thing... πŸ˜„ πŸ™ˆ

#

Thank you sooo much for your help!

stone lichenBOT
# noble cargo Thank you sooo much for your help!

If you are finished with your post, please close it.
If you are not, please ignore this message.
Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.