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 269343

Summary: Java Platform Shell import fails
Product: ide Reporter: muellermi <muellermi>
Component: CodeAssignee: issues@ide <issues>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 8.1   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:
Attachments: IDE log

Description muellermi 2016-12-14 21:55:33 UTC
Product Version = NetBeans IDE Dev (Build 201612070001)
Operating System = Linux version 4.4.0-53-generic running on amd64
Java; VM; Vendor = 1.8.0_111
Runtime = Java HotSpot(TM) 64-Bit Server VM 25.111-b14

Reproducibility: Happens every time

STEPS:
  * open Java Platform Shell
  * add classpath to your own project
  * import your packages

ACTUAL:
  import fails:
|  
|  System Information:
|      Java version:    1.8.0_111-b14
|      Virtual Machine: Java HotSpot(TM) 64-Bit Server VM  25.111-b14
|  Classpath:
|  	/home/mmueller/netbeans-dev-201612070001/java/modules/ext/nb-jshell.jar
|  	 
|  
[1]-> /classpath /home/mmueller/Dropbox/Vortrag/ParallelStreams/ParallelStreams/target/ParallelStreams.jar

|  Path '/home/mmueller/Dropbox/Vortrag/ParallelStreams/ParallelStreams/target/ParallelStreams.jar' added to classpath
[1]-> import de.muellerbruehl.parallelstreams.*
|  Error:
|  package de.muellerbruehl.parallelstreams does not exist
|  import de.muellerbruehl.parallelstreams.*;
|  ^
[1]-> 

EXPECTED:
  packages being imported
here the same import using JShell:

|  Welcome to JShell -- Version 9-ea
|  For an introduction type: /help intro


jshell> /classpath /home/mmueller/Dropbox/Vortrag/ParallelStreams/ParallelStreams/target/ParallelStreams.jar
|  Path '/home/mmueller/Dropbox/Vortrag/ParallelStreams/ParallelStreams/target/ParallelStreams.jar' added to classpath

jshell> import de.muellerbruehl.parallelstreams.*

jshell> 


Rermarks:
An import of packages from Java is fine. Thus it seems, as if the classpath is not added correctly although NB reports success.
Comment 1 muellermi 2016-12-14 21:55:38 UTC
Created attachment 163239 [details]
IDE log
Comment 2 muellermi 2016-12-14 22:16:06 UTC
if I use the Execute JavaShell then the context (my classes) are added to the classpath by default.
Doing such, the import successes. The seems to confirm my guess, that the classpath fails.