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.
Summary: | /cp support in JShell | ||
---|---|---|---|
Product: | java | Reporter: | Geertjan Wielenga <geertjan> |
Component: | JShell | Assignee: | Svata Dedic <sdedic> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | Dev | ||
Hardware: | PC | ||
OS: | Windows 7 | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
Geertjan Wielenga
2016-10-09 09:34:31 UTC
FYI: On a Mac with OS X 10.11, NetBeans 8.2, this doesn't work as well. It's simply not supported yet in the NetBeans JShell integration, I believe. Early days and it's amazing all the features that are there already, really cool integration and I'm going to be using this more and more, especially when the issues we've filed so far are fixed. what should be the effect ? It *could* be possible to adjust CP of the jshell, but should not affect the project's settings. OK ? Hello everybody, the desired effect is as follow: I want to use "/cp Foobar.jar" so that I can import those classes and use them like I would do with build-ins. The classpath of the project need not to be modified. At the moment I observe the following behavior: I can import classes from the projects Maven dependencies without error, but the moment I try to use them, I end up with a class not found exception. Partial support provided in jet-main#36707b9bc76c; still need to implement pathname completion. Integrated into 'main-silver', will be available in build *201611270001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/36707b9bc76c User: Svata Dedic <sdedic@netbeans.org> Log: #268424: initial /classpath support in JShell Completion enhanced in jet-main#d965ddd6800a Relative paths to project contents are also supported. Hi, i tried this on a mac with 201611300001, but the JShell is barely usable when opened from a Maven project anymore: | Unexpected exception reading start-up: java.lang.NullPointerException | Welcome to the JShell NetBeans integration | Type /help for help [1] -> 1+1 | The remote Java Shell has terminated. Restart the Java Shell to continue | Expression value is: null | assigned to temporary variable $1 of type int [2] -> The download for the later builds (from 20161201 upwards) is broken, I tried http://bits.netbeans.org/dev/nightly/2016-12-01_00-01-33/ in 3 browsers, no download buttons. Will the patch make it into http://deadlock.netbeans.org/job/prototypes-repl9/? I used that repo to get JShell into my stable build. what JDK does the mvn project target ? The prototype branch is more or less dead; if extremely needed, some changes can be backported, but javac binaries started to diverge between trunk and repl-prototype. I'll focus on maven support next week (I was primarily working with J2SE projects). I tried with JDK 1.8 and 1.7. Prototype branch: I think you already do have enough work todo. Not extremely needed. Thanks for working on this. Michael Please be aware that support for JDK 7 may be dropped (depends on time). The code in JShell, which is largely used in the "vm agent" uses heavily lambdas. I'm not sure if I am able to cut/replace all the dependencies in the new code drop so the classes are still usable on 1.7. As JDK 1.7 is EOLed, it's not a superhigh priority, although there are lot of JEE deployments on that platform. I don't need JDK 7, just tried both to give feedback. I don't expect it to be supported. Using the latest build from December I was able to create this http://info.michael-simons.eu/2016/12/19/using-jshell-in-netbeans/ Really useful, thanks! |