Insistence on CurrentJDK causing problems

Problems with getting it running
Post Reply [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
whaleyr
Posts:1
Joined:22 Aug 2012 18:51
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
Insistence on CurrentJDK causing problems

Post by whaleyr » 22 Aug 2012 19:06

I'm running OS X 10.8. I need to use JDK7 for my main codebase so I have the Oracle JDK7 distro installed. I switched my /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK alias to point to JDK7. This has caused problems with some apps that still need JDK6 (like Gephi) so I have /System/Library/Frameworks/JavaVM.framework/Versions/1.6 as an alias to JDK6.

I see that Gephi insists on JDK6. I modified gephi.app/Contents/Resources/gephi/etc/gephi.conf and updated the jdkhome pref to point to the JDK6 path. However, when I try to start gephi I get the following error message.

Code: Select all

-------------------------------------------------------------------------------
>Log Session: Wednesday, August 22, 2012 10:44:51 AM PDT
>System Info: 
  Product Version         = Gephi 0.8.1 beta 201202141941
  Operating System        = Mac OS X version 10.8 running on x86_64
  Java; VM; Vendor        = 1.6.0_33; Java HotSpot(TM) 64-Bit Server VM 20.8-b03-424; Apple Inc.
  Runtime                 = Java(TM) SE Runtime Environment 1.6.0_33-b03-424-11M3720
  Java Home               = /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
  System Locale; Encoding = en_US (gephi); MacRoman
  Home Directory          = /Users/whaleyr
  Current Directory       = /
  User Directory          = /Users/whaleyr/Library/Application Support/gephi/0.8.1/dev
  Cache Directory         = /Users/whaleyr/Library/Application Support/gephi/0.8.1/dev/var/cache
  Installation            = /Applications/gephi.app/Contents/Resources/gephi/gephi
                            /Applications/gephi.app/Contents/Resources/gephi/platform
  Boot & Ext. Classpath   = /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/jsfd.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes.jar:/System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Resources/Java/JavaRuntimeSupport.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/ui.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/laf.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/sunrsasign.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/jsse.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/jce.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/charsets.jar:/System/Library/Java/Extensions/AppleScriptEngine.jar:/System/Library/Java/Extensions/dns_sd.jar:/System/Library/Java/Extensions/j3daudio.jar:/System/Library/Java/Extensions/j3dcore.jar:/System/Library/Java/Extensions/j3dutils.jar:/System/Library/Java/Extensions/jai_codec.jar:/System/Library/Java/Extensions/jai_core.jar:/System/Library/Java/Extensions/mlibwrapper_jai.jar:/System/Library/Java/Extensions/MRJToolkit.jar:/System/Library/Java/Extensions/QTJava.zip:/System/Library/Java/Extensions/vecmath.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext/apple_provider.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext/dnsns.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext/localedata.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext/sunjce_provider.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext/sunpkcs11.jar
  Application Classpath   = /Applications/gephi.app/Contents/Resources/gephi/platform/lib/boot.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/org-openide-modules.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/org-openide-util-lookup.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/org-openide-util.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/boot_ar_SA.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/boot_bg.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/boot_ca.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/boot_cs.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/boot_de.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/boot_es.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/boot_fr.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/boot_gl_ES.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/boot_in_ID.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/boot_it.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/boot_ja.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/boot_ko.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/boot_nl_NL.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/boot_pl.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/boot_pt_BR.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/boot_pt_PT.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/boot_ro.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/boot_ru.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/boot_si.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/boot_sq.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/boot_sv.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/boot_tr.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/boot_zh_CN.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/boot_zh_TW.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-modules_ar_SA.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-modules_bg.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-modules_ca.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-modules_cs.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-modules_de.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-modules_es.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-modules_fr.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-modules_gl_ES.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-modules_in_ID.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-modules_it.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-modules_ja.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-modules_ko.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-modules_nl_NL.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-modules_pl.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-modules_pt_BR.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-modules_pt_PT.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-modules_ro.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-modules_ru.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-modules_si.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-modules_sq.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-modules_sv.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-modules_tr.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-modules_zh_CN.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-modules_zh_TW.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-util-lookup_bg.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-util-lookup_ca.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-util-lookup_cs.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-util-lookup_de.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-util-lookup_es.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-util-lookup_fr.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-util-lookup_gl_ES.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-util-lookup_in_ID.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-util-lookup_it.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-util-lookup_ja.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-util-lookup_ko.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-util-lookup_nl_NL.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-util-lookup_pl.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-util-lookup_pt_BR.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-util-lookup_ro.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-util-lookup_ru.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-util-lookup_si.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-util-lookup_sv.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-util-lookup_tr.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-util-lookup_zh_CN.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-util_ar_SA.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-util_bg.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-util_ca.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-util_cs.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-util_de.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-util_es.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-util_fr.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-util_gl_ES.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-util_in_ID.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-util_it.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-util_ja.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-util_ko.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-util_nl_NL.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-util_pl.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-util_pt_BR.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-util_pt_PT.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-util_ro.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-util_ru.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-util_si.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-util_sq.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-util_sv.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-util_tr.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-util_zh_CN.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/lib/locale/org-openide-util_zh_TW.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/dt.jar
  Startup Classpath       = /Applications/gephi.app/Contents/Resources/gephi/platform/core/core.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/core/org-openide-filesystems.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/core/locale/core_ar_SA.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/core/locale/core_bg.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/core/locale/core_ca.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/core/locale/core_cs.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/core/locale/core_de.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/core/locale/core_es.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/core/locale/core_fr.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/core/locale/core_gl_ES.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/core/locale/core_in_ID.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/core/locale/core_it.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/core/locale/core_ja.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/core/locale/core_ko.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/core/locale/core_nl_NL.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/core/locale/core_pl.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/core/locale/core_pt_BR.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/core/locale/core_pt_PT.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/core/locale/core_ro.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/core/locale/core_ru.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/core/locale/core_si.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/core/locale/core_sq.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/core/locale/core_sv.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/core/locale/core_tr.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/core/locale/core_zh_CN.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/core/locale/core_zh_TW.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/core/locale/org-openide-filesystems_ar_SA.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/core/locale/org-openide-filesystems_bg.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/core/locale/org-openide-filesystems_ca.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/core/locale/org-openide-filesystems_cs.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/core/locale/org-openide-filesystems_de.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/core/locale/org-openide-filesystems_es.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/core/locale/org-openide-filesystems_fr.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/core/locale/org-openide-filesystems_gl_ES.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/core/locale/org-openide-filesystems_in_ID.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/core/locale/org-openide-filesystems_it.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/core/locale/org-openide-filesystems_ja.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/core/locale/org-openide-filesystems_ko.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/core/locale/org-openide-filesystems_nl_NL.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/core/locale/org-openide-filesystems_pl.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/core/locale/org-openide-filesystems_pt_BR.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/core/locale/org-openide-filesystems_pt_PT.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/core/locale/org-openide-filesystems_ro.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/core/locale/org-openide-filesystems_ru.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/core/locale/org-openide-filesystems_si.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/core/locale/org-openide-filesystems_sq.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/core/locale/org-openide-filesystems_sv.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/core/locale/org-openide-filesystems_tr.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/core/locale/org-openide-filesystems_zh_CN.jar:/Applications/gephi.app/Contents/Resources/gephi/platform/core/locale/org-openide-filesystems_zh_TW.jar:/Applications/gephi.app/Contents/MacOS/../Resources/gephi/bin/../gephi/core/locale/core_gephi.jar
-------------------------------------------------------------------------------
Loading native libraries
Issue #452: Can't locate the default Libraries folder to load theJAWT library. This library is needed as a dependency of jogl_awt and isnormally installed in the JDK. To fix that please make sure to have the /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK path points to the current Java installation.
I see that it says it's using the JDK6 VM but it's still not working. As an experiment, I switched the CurrentJDK alias back to the JDK6 path and the app starts just fine.

My question: what am I doing wrong here? Am I misunderstanding the use of the jdkhome pref? Should I be doing this differently? How can I keep CurrentJDK pointing to JDK7 and still get gephi working with JDK6?

User avatar
eduramiba
Gephi Code Manager
Posts:1064
Joined:22 Mar 2010 15:30
Location:Madrid, Spain
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Insistence on CurrentJDK causing problems

Post by eduramiba » 23 Aug 2012 15:56

Hi,
It seems that in MacOS it is necessary to load jawt before jogl 1.1, and in our code, current jdk is checked for existence before java.home (See this file https://github.com/gephi/gephi/blob/mas ... .java#L154).

I am not sure why not use java.home first directly. I think we could try to locate jawt in both places.
Meanwhile, you can try to copy jdk6 jawt to jdk7 while we fix this.

Eduardo

Post Reply
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable