Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » How to specify JDK-path for feature using Java Compiler?(feature is to be installed via Update Site)
How to specify JDK-path for feature using Java Compiler? [message #1795462] Sun, 23 September 2018 13:55 Go to next message
Miriam H. is currently offline Miriam H.Friend
Messages: 4
Registered: May 2018
Junior Member
Hi,

we have a program that compiles classes dynamically by using the Java compiler (so one have to specify the path to the JDK in the launch configuration).

Now I built an Update Site for this feature. At the moment the user (who wants to install the feature) has to modify eclipse.ini by filling '-vm
C:\Program Files\Java\jdk1.8.0\bin\javaw.exe' in.

I would like to know if there might be an easier way to do so without the user having to touch the eclipse.ini? Specifying the JDK via Window > Preferences > Java > Installed JREs does not work for any reason.

Any help would be appreciated!

Miriam
Re: How to specify JDK-path for feature using Java Compiler? [message #1795545 is a reply to message #1795462] Tue, 25 September 2018 06:50 Go to previous message
Miriam H. is currently offline Miriam H.Friend
Messages: 4
Registered: May 2018
Junior Member
This is my solution: I added to our AbstractLaunchConfigurationTab subclass a DirectoryDialog where the user can specify his/hers path to JDK. This path is stored in a variable. In our compilation class I set the value of System Property "java.home" with the variable storing the path. This works and the user does not have to modify eclipse.ini outside the IDE.

I guess that changing system properties in a running system is not the best solution, so if someone knows a better way, I would still be happy to learn about it;)
Previous Topic:JVM version error trying to load Oxygen on MacOS
Next Topic:Eclipse (from Vivado SDK) crashes
Goto Forum:
  


Current Time: Mon Oct 15 18:56:56 GMT 2018

Powered by FUDForum. Page generated in 0.02914 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top