FS#41603 - [netbeans] Doesn't work by default with jdk8-openjdk
Attached to Project:
Community Packages
Opened by Peter Weber (hoschi) - Monday, 18 August 2014, 09:28 GMT
Last edited by Alexander F. Rødseth (xyproto) - Friday, 17 October 2014, 13:35 GMT
Opened by Peter Weber (hoschi) - Monday, 18 August 2014, 09:28 GMT
Last edited by Alexander F. Rødseth (xyproto) - Friday, 17 October 2014, 13:35 GMT
|
Details
Hello!
Description: NetBeans doesn't work by default if (only) jdk8-openjdk is installed. I installed jdk8-openjdk and removed jdk7-openjdk as instructed by the wiki and used the script archlinux-java to switch the Java-Environment, as well as the fix option. During startup NetBeans complains about the missing JDK (see attached screenshot). Furthermore the JVM complains about the usage of memory-options through NetBeans which are not unsupported. $ netbeans OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=384m; support was removed in 8.0 OpenJDK 64-Bit Server VM warning: ignoring option PermSize=32m; support was removed in 8.0 Workaround: Use NetBeans with the option "--jdkhome" and the parameter "/usr/lib/jvm/java-default-runtime" or "/usr/lib/jvm/java-8-openjdk" Alternative: Edit the global netbeans.conf file stored under /usr/share/netbeans/etc/netbeans.conf and add the line: netbeans_jdkhome="/usr/lib/jvm/java-default-runtime" or netbeans_jdkhome="/usr/lib/jvm/java-8-openjdk" Possible cause: As far as I know /usr/bin/netbeans should detect and use the correct JDK and is also responsible for the memory-options which should not applied anymore. Additional info: * package version: netbeans 8.0-1 * see attached screenshot (clean test user) Steps to reproduce: 1. Install jdk8-openjdk 2. If installed: remove jdk7-openjdk 3. Set java-environment with archlinux-java 4. Execute netbeans |
This task depends upon
Closed by Alexander F. Rødseth (xyproto)
Friday, 17 October 2014, 13:35 GMT
Reason for closing: Fixed
Friday, 17 October 2014, 13:35 GMT
Reason for closing: Fixed
Could you please provide output of the following:
$ grep -ir home ~/.netbeans
As explained in this thread [0], could you please (first backup then) remove your ~/.netbeans directory
[0] https://bbs.archlinux.org/viewtopic.php?pid=1448000
1. Adding
netbeans_jdkhome="{$JAVA_HOME}"
doesn't work.
2. You mentioned the lack of JDK-8-Support in NetBeans, but the referenced WIKI-Page was last edited in 2013
3. Attached grep -ir home ~/.netbeans
3.1 Installed both JDK7 and JDK8
3.2 Deleted ~/.netbeans
3.3 Execute netbeans
3.4 Activate JavaSE-Plugin (preinstalled)
3.5 Exit NetBeans
grep_ir_netbeans.txt (6.7 KiB)
grep_ir_netbeans.txt (6.7 KiB)
1. What about adding directly:
netbeans_jdkhome="/usr/lib/jvm/java-default-runtime"
2. What do you mean?
1. That works, I've already done that before (see original report)
2. See edit above
Oh right, my bad.
@xyproto: then I guess you can go ahead and add the following to /usr/share/netbeans/etc/netbeans.conf :
netbeans_jdkhome="/usr/lib/jvm/java-default-runtime"
2. Ok. I will let Xyproto see about that.
3. File is empty. Nevermind, it turns out we do not need it.
Here is a bug report about that opened in 2013 (though different use case)
https://netbeans.org/bugzilla/show_bug.cgi?id=235954
I will see if upstream would consider a patch for this. In the meantime I think setting netbeans_jdkhome as previously stated is a good solution.
I will add a comment on the wiki for this issue in the meantime today afternoon (CEST).
Thank you
// done
https://wiki.archlinux.org/index.php/Netbeans#Missing_JDK
Shouldn't we provide an already modified "/usr/share/netbeans/etc/netbeans.conf" with "netbeans_jdkhome="/usr/lib/jvm/java-default-runtime"", as this modification is now mandatory?
After following the steps to reproduce, it worked perfectly fine here.
Updating the netbeans package to "netbeans-8.0-2" (internal netbeans version 201403101706).
Please check if it is working correctly and report back. Thanks.
@xyproto: you will need to use
netbeans_jdkhome="/usr/lib/jvm/default" in /usr/share/netbeans/etc/netbeans.conf
netbeans_jdkhome="/usr/lib/jvm/java-7-openjdk"
Setting it just "/usr/lib/jvm/default" did not work.
https://projects.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/netbeans#n32
I removed the config line for the latest release of the netbeans package. Closing this one.