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: | NoGo for plugin Randoop NetBeans Plugin | ||
---|---|---|---|
Product: | updatecenters | Reporter: | ent38 <ent38> |
Component: | Pluginportal | Assignee: | javydreamercsw <javydreamercsw> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P3 | ||
Version: | 7.2 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
ent38
2012-08-21 19:39:03 UTC
The jre/bin or java(.exe) needs to be in the system's path There is a little problem : the plugin launches the Java process, but its location needs to be in the system's classpath. Many users don't add their jre/bin or java(.exe) folder/file to the path. Other plugins had the same problem (CodenameOne, JRebel, ...). They solved it by finding the JDK that runs NetBeans, and launching its internal JRE. Could you take a look at this ? Thx a lot. The jre/bin or java(.exe) needs to be in the system's path I haven't been able to find how those projects accomplish that. The only workaround I can see valid so far is letting the user know when java is not in the system's path and have that as a plug-in requirement. You can get the running JDK via the "org.netbeans.api.java.platform.JavaPlatform.getDefault().getInstallFolders()" method. Check http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-java-platform/org/netbeans/api/java/platform/package-summary.html for details. Example : Collection<FileObject> c = JavaPlatform.getDefault().getInstallFolders(); for (FileObject fo : c) { theJdkPathIsHere(fo.getPath()); } The getInstallFolders returns a collection, but it seems to return an only one element : the path of the running JDK (I've tested with different "netbeans_jdkhome" config values : the program returns its value). Maybe is it able to return JavaFX path, so it would return two elements ? I've not tested. I do not know if this is the most elegant way to proceed, the NetBeans forum may help. Hoping that it will be useful :) According to the documentation : "Each JavaPlatform is one installation of a Java platform, such as Java SE, Java EE, or Java ME. It has a specification name like J2SE and a version such as 1.4." If the method returns many elements, you may be able to filter this list easily. Looking into the solution with the provided feedback... This will be part of the next release which should include Maven Java SE support as well. Works on NB 7.2.1<br /> Mac OSX 10.7.5<br /> Java 1.7.0_09 64Bit<br /> |