Default SDK from bundled JDK?

Hi all,

I'm trying to make it easier for new users get started with Clojure using my plugin. One common stumbling block is having to set up an SDK, especially for users who don't come from a Java background. I'm wondering - would it be possible to create a default SDK from the JDK bundled with the IDE on Windows and Mac? Are these full JDKs or just JREs? That would be one less thing new users would have to worry about.

Cheers,
Colin

3 comments
Comment actions Permalink

Hi Colin,

the bundled JDK is actually JRE + tools.jar, so it cannot be used as a full JDK. I'm not sure whether you need full JDK for Clojure though.

--
Nikolay Chashnikov
JetBrains
http://www.jetbrains.com
The Drive to Develop

0
Comment actions Permalink

I don't think so, I think a JRE + tools.jar should be fine. Can you give me any pointers as to how I would set up an SDK like this? Are there APIs for locating the JRE and tools jars?

0
Comment actions Permalink

You can use SystemProperties.getJavaHome() method to locate home directory of the JRE under which IDE is running. After that use JavaSdk#createJdk to
create an SDK instance and invoke ProjectJdkTable#addJdk to add it to the list of SDKs.

--
Nikolay Chashnikov
JetBrains
http://www.jetbrains.com
The Drive to Develop

0

Please sign in to leave a comment.