How to use Jetbrains products for non-java things?

Answered

I'm doing some LUA development with Love2d and I can't seem to get any of the Jetbrains IDEs to understand that this has nothing to do with Java. No matter what I do it always tries to run java when I click the run or debug buttons, resulting in the error "Error running 'Love': Cannot run program "java" (in directory "C:\Users\kwdev\Desktop\Love\Games"): CreateProcess error=2, The system cannot find the file specified". It's incredibly frustrating, nowhere in the entire project is a single mention of java and still it errors out on not being able to run java. How can I disable whatever it's trying to do with java? I don't want java, I don't need java, java can go do things to itself I won't mention here...  

  

Here's what I did so far:  

Installed LUA plugin  

Added the LUA executable under `language and frameworks -> Lua`  (no idea if this is actually doing anything)

Added the Love executable as an external tool  (allows me to call love, for example as a pre-build step, doesn't seem to do anything for the project itself)  

Added a build config with the following settings:  

  script name: C:/Users/kwdev/Desktop/Love/bin/lovec.exe

  script parameters: Checkers  

  use module sdk: yes  

  working directory: C:\Users\kwdev\Desktop\Love\Games  

  no pre-launch tasks  

  

Now, if I add a call to the external tool I configured it will successfully start an empty Love program, but I can't provide any parameters to it so I can't test my game this way. In any case as soon as it tries to launch it calls java somewhere and I get an error. I have no idea where this is coming from, I tried Intellij and Webstorm. I have the full range of products, so if this is easier in one of the other IDEs I would gladly use it, does anybody have any suggestions? I don't need advanced capabilities, I'm more than happy with simple syntax highlighting and a run button.  

Note: I know the Love community seems to use Sublime, but I really dislike it as an IDE, I also tried VSCode, but that's not very good at LUA either.

0
4 comments

Refer to https://bitbucket.org/sylvanaar2/lua-for-idea/wiki/Home.

If you still have questions, please contact the plug-in vendor.

1

Thanks for your quick reply, I hadn't found that page yet even though I do have that plugin, I'll chech it out now. Thanks!

0

Hmm, that didn't work. It ends up with exactly the same configuration I already had.

This isn't a problem with the plugin, it's the IDE trying to call java, even before doing anything with the plugin. When I completely uninstall the plugin and try to make my own build config I still encounter the same error. How can I let the IDE ignore any java stuff?

0

After trying a bunch of other things I finally came across this gem: https://github.com/rjpcomputing/luaforwindows  

I downloaded the zip, pointed the sdk config in intellij to the downloaded folder and it just worked! It recognizes the lua version now, automatically put the right class path in and when I press run it calls the proper .exe with my project dir as an argument.

0

Please sign in to leave a comment.