Next, create a new file called whatever you would like, just make sure to put the ‘.py’ on the end to signify a python (really jython in this case) file. Name the module whatever you need it to be. Make sure to select the ‘Python’ selection on the left. You can find this prompt in ‘File’ then ‘New’ and then ‘Module…’. Now you’re ready to code! Create a new module with the added Jython SDK. Now Intellij knows where to look for dependancies and can index them, which allows for auto-completion. Make sure you select the whole folder and click ‘OK’ The folder we want to select will be in the jdk/jre folder, and it is called lib.
#Import intellij jar install#
It’s just easier to install the jdk and jre.)įor me, I throw all of these library types in the C:\ folder so mine was easy to find. (If you know what you’re doing here, feel free to only install the JRE. If you don’t have one, then install it from oracle on this page: Now you’ll have to find your java JDK on your system. Go to the ‘Libraries’ section of the Project Settings and click the green ‘+’ symbol However, we’ll need to tell intellij where to find these libraries because jython capabilities aren’t standard.
The main advantage of Jython over Python is the ability to use java libraries in the code. Now you’ll have jython ready to go and you can write basic python in intellij. Select the bin/jython.exe file and click ‘Ok’ Now we have to find the Jython files we installed. Go the project option on the left, and then click the ‘New…’ button. Here is where we will need to add the jython sdk to the project. It will prompt you to add a module after creation since we chose an empty project. Just name the project whatever you want and continue with the process. Then we’ll just select an empty project in case the python interpreter is not setup. Open up intellij and create a new project. For the install path, I usually put these right in my C:\ directory because I have a few different ones installed on my machine and this makes it easier.Īfter the install, you’ll have the jython files in the C directory: As usual, you’ll need to accept some license agreements. Get Jythonįirst Off, install your jython interpreter from here:įor this project, I used the installer because it was easier, however the standalone jar will work perfectly fine, but some of the steps below will be slightly different.ĭownload the installer and select the ‘Standard’ install.
#Import intellij jar how to#
Using java with your jython project? Here is a quick tutorial on how to import java jar’s into the project for auto completion and an overall better experience with intellij.