#Libgdx / gradle setup question on macos vscode

1 messages · Page 1 of 1 (latest)

foggy burrow
#

What is the correct way to run a libgdx project?
It doesn't work when I press run and gives me errors saying that classes are missing, but it does work when i do ./gradlew run in the terminal. what does this mean?

also there's a comment telling me that "Please note that on macOS your application needs to be started with the -XstartOnFirstThread JVM argument"

full roostBOT
#

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

#

Here is an AI assisted attempt to answer your question 🤖. Maybe it helps! In any case, a human is on the way 👍. To continue talking to the AI, you can use </chatgpt:1108714622413963314>.

#
TJ-Bot
What is the correct way to run a libgdx project? It doesn't work when I press run and gives me errors saying that classes are missing, but it does work when i do ./gradlew run in the terminal. what does this mean? also there's a comment telling me that "

when I run it from the command line with "./gradlew desktop:run". How can I fix this issue?

The issue you are experiencing is likely due to a misconfiguration in your Visual Studio Code setup. When you press run in VSCode, it may not be using the correct classpath or build configuration. To fix this issue, you can modify your VSCode settings to use the correct gradle task for running your libgdx project.

To do this, open your VSCode settings and navigate to the "launch.json" file for your project. In this file, find the configuration for running your project and update the "program" field to use "./gradlew desktop:run" as the command to run your project. This will ensure that VSCode uses the correct gradle task when running your libgdx project.

By updating your VSCode settings to use the correct gradle task for running your libgdx project, you should be able to resolve the issue of missing classes and successfully run your project from within VSCode.