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 270198

Summary: Strange bug with platform.properties in suite project
Product: apisupport Reporter: Peter Nabbefeld <epdv>
Component: HarnessAssignee: pgebauer <pgebauer>
Status: NEW ---    
Severity: normal    
Priority: P2    
Version: 8.2   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:

Description Peter Nabbefeld 2017-03-25 08:44:31 UTC
I've found a strange bug, which is usually not visible in NB 8.2 (but exists there, too), but will be a showstopper if not fixed until NB 9. So I guess, You'll have Your own opinion about priority, probably adding some keywords.

The problem arises, if the default JDK is changed to sth. else. If You're running NB on JDK 8, You'll most probably not change the default, so You'll not notice, there's sth. going wrong. If You're running NB 9 on JDK 9, however, You need to change the platform to NB 8.

Result:
Platform isn't found, switching to some default (also not found), so module project cannot be started. Related messages:
Warning: nbjdk.active=JDK_1.8 or nbjdk.home=${platforms.JDK_1.8.home} is an invalid Java platform; ignoring and using /usr/lib/jvm/java-8-openjdk
Cannot find java. Please use the --jdkhome switch.
Result: 2

Interesting detail:
After doing a clean build, I cannot even compile properly, I've to restart NB first. Then I can run a clean build and start the module project, but only once. I cannot start it a second time.

What else:
I've degraded my project (created using NB 9) to be able to use it with NB 8.2 (removing dependencies and re-searching them), but that didn't work directly, because there was this property setting in ${suite.dir}/nbproject/platform.properties:
nbjdk.active=JDK_1.8

Setting it to "default" solved the problem.

Again:
You must try to run the module project twice run into the problem, for some unknown reason the project can be started first time after a clean build.