Ask Your Question
0

What is the correct way to fix the "cannot find symbol" error that occurs after running the JFlex Generator in the Intellij Language Plugin Tutorial?

asked 2021-04-12 11:00:00 +0000

pufferfish gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2022-04-07 07:00:00 +0000

scrum gravatar image

The "cannot find symbol" error occurs because JFlex generates a new Java file that needs to be compiled before it can be used in the code. To fix this error, follow these steps:

  1. In Intellij, navigate to the project directory where the JFlex file is located.

  2. Open a terminal window or command prompt in this directory.

  3. Type the command "javac" followed by the name of the generated Java file, including the file extension. For example, if your JFlex file is named "test.flex" and the generated Java file is "TestLexer.java", type "javac TestLexer.java" and press Enter.

  4. If the compilation is successful, there should be no output or error messages.

  5. Go back to the Intellij project window and try running the program again. The "cannot find symbol" error should be resolved.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2021-04-12 11:00:00 +0000

Seen: 8 times

Last updated: Apr 07 '22