This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 267489 - Truffle 'mx netbeansinit' cannot hardcode path to JDK
Summary: Truffle 'mx netbeansinit' cannot hardcode path to JDK
Status: VERIFIED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Ant Project (show other bugs)
Version: 8.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: apireviews
URL:
Keywords: API, API_REVIEW_FAST
Depends on:
Blocks:
 
Reported: 2016-08-08 16:30 UTC by Jaroslav Tulach
Modified: 2016-09-28 03:31 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Proposed patch (48.63 KB, patch)
2016-08-17 12:10 UTC, Tomas Zezula
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Tulach 2016-08-08 16:30:53 UTC
I am working on [Truffle](https://github.com/graalvm/truffle) and in order to open the source in NetBeans one needs to run

$ mx netbeansinit

this generates the NetBeans Ant Project metadata. However there is one problem, the project needs to reference the "current" JDK. But that isn't possible to do automatically, user needs to go into the IDE and set it up properly.

Could there be a way to set a fixed path to the JDK in the project.properties?
Comment 1 Tomas Zezula 2016-08-17 12:10:37 UTC
Created attachment 161691 [details]
Proposed patch
Comment 2 Tomas Zezula 2016-08-17 12:11:48 UTC
Added proposed patch.
Comment 3 Tomas Zezula 2016-08-17 12:56:14 UTC
Properties required for per project platform:

platforms.MyJDK.home=/Library/Java/JavaVirtualMachines/jdk1.7.0_67.jdk/Contents/Home
platform.active=MyJDK
Comment 4 Jaroslav Tulach 2016-08-17 14:11:18 UTC
It is hard for me to get "the whole" picture. Having a use-case describing the overall usage of the APIs throughout the three modules, would make things clear. Maybe unnecessary, if we think this new system isn't going to be used by anyone else. On the other hand, there isn't the "unit" picture either. I haven't found any test.

Btw. one of the apichanges.xml is referencing:
<class package="org.netbeans.modules.java.api.common.classpath" name="ClassPathProviderImpl"/> - is this class public at all?
Comment 5 Tomas Zezula 2016-08-17 15:43:26 UTC
1) I will add an use case into JavaProject apichanges.xml
2) I will add an unit test
3) ClassPathProviderImpl - unfortunately it's a part of the friend API, I am trying to extend the class in API quality but I cannot change the name anymore.
Comment 7 Quality Engineering 2016-08-27 02:20:24 UTC
Integrated into 'main-silver', will be available in build *201608270002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/87db59b3827e
User: Tomas Zezula <tzezula@netbeans.org>
Log: #267489:Truffle 'mx netbeansinit' cannot hardcode path to JDK
Comment 8 Jaroslav Tulach 2016-09-28 03:31:40 UTC
Works great. Thanks.