R
R
Roman Deniskin2021-09-04 21:23:29
Java
Roman Deniskin, 2021-09-04 21:23:29

Why does Idea IDE run code but javac throws errors?

I wrote a small calculator in Java and Swing, the calculator is semi-working, the code in the Idea IDE starts up and the calculator window appears on the screen. But the same code refuses to compile to javac and throws 3 errors.
Why is this happening? Are there different compiler versions? If so, how to understand which compiler to compile the code with?
Here is my mini-project, if it's important: https://github.com/roman-deniskin/swing-calculator... Attached
errors on the screen. I ask you not to throw slippers at me for stupid questions, I just started studying Java, but I couldn’t google it.
6133b99103057931295990.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Roo, 2021-09-04
@romka123

1. Do not upload compiled .class files to git. Upload only source code. (google .gitignore)
2. Your project consists of several classes, in several files. So compile them all together:
javac App.java Expression.java ProcessCalc.java

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question