I messed around some more and figured out the cause, but there are still some issues that are beyond me.
filed a ticket: https://issues.apache.org/jira/browse/NETBEANS-6391 <https://issues.apache.org/jira/browse/NETBEANS-6391> > On Jan 14, 2022, at 7:58 AM, Tim Mullé <tmu...@gmail.com> wrote: > > Thanks, I wonder for the people who the terminals do work they are using > Rosetta and a non-ARM(x86) based JDK install so the code is properly picking > the platform. > > I have Rosetta also, but since I’m using a native ARM JDK, it is not being > run under Rosetta. > > Just thinking out loud. > > @Geertjan - Should I file a bug with the info I posted in this group? > > Thanks again… > > >> On Jan 13, 2022, at 7:23 PM, David Green <dgreen...@gmail.com >> <mailto:dgreen...@gmail.com>> wrote: >> >> I used the MacOSX installer. I do see the files in the >> /Applications/NetBeans/Apache\ NetBeans\ >> 12.6.app/Contents/Resources/NetBeans/netbeans/ide/bin/nativeexecution >> >> and also don’t have any arm/m1 arch files. There is also a hosting.sh file >> there which also does not have any ARM info/logic. >> >> I have Rosetta installed although I strive to use native code when possible. >> >> On Jan 13, 2022 at 5:27:42 PM, Tim Mullé <tmu...@gmail.com >> <mailto:tmu...@gmail.com>> wrote: >>> I did more searching in my netbeans installation folder and found the list >>> of files the Terminal was looking for, but I noticed that there is no ARM >>> or AARCH files mentioned for any OS. >>> >>> My `uname -a` reports: Darwin mars.fios-router.home 21.2.0 Darwin Kernel >>> Version 21.2.0: Sun Nov 28 20:28:41 PST 2021; >>> root:xnu-8019.61.5~1/RELEASE_ARM64_T6000 arm64 >>> >>> And I’m running a M1 native JDK from Temurin 17.0.1+12 and tried Azul >>> 11.0.13+8 both arm ARM64 JDKs >>> >>> >>>> more ./ide/update_tracking/org-netbeans-modules-dlight-nativeexecution.xml >>> <?xml version="1.0" encoding="UTF-8"?><module >>> codename="org.netbeans.modules.dlight.nativeexecution"> >>> <module_version install_time="1637574916194" last="true" >>> origin="installer" specification_version="1.53.0.1"> >>> <file crc="588438809" >>> name="bin/nativeexecution/Linux-sparc_64/killall"/> >>> <file crc="1013170221" >>> name="bin/nativeexecution/Linux-sparc_64/process_start"/> >>> <file crc="1124076903" >>> name="bin/nativeexecution/Linux-sparc_64/pty"/> >>> <file crc="3525643186" >>> name="bin/nativeexecution/Linux-sparc_64/pty_open"/> >>> <file crc="4193748795" >>> name="bin/nativeexecution/Linux-sparc_64/sigqueue"/> >>> <file crc="3667501403" >>> name="bin/nativeexecution/Linux-sparc_64/stat"/> >>> <file crc="2976948706" >>> name="bin/nativeexecution/Linux-sparc_64/unbuffer.so"/> >>> <file crc="2995732816" name="bin/nativeexecution/Linux-x86/killall"/> >>> <file crc="755239459" >>> name="bin/nativeexecution/Linux-x86/process_start"/> >>> <file crc="2063814722" name="bin/nativeexecution/Linux-x86/pty"/> >>> <file crc="1863507197" >>> name="bin/nativeexecution/Linux-x86/pty_open"/> >>> <file crc="3356918927" >>> name="bin/nativeexecution/Linux-x86/sigqueue"/> >>> <file crc="954821623" name="bin/nativeexecution/Linux-x86/stat"/> >>> <file crc="2315260862" >>> name="bin/nativeexecution/Linux-x86/unbuffer.so"/> >>> <file crc="3467496026" >>> name="bin/nativeexecution/Linux-x86_64/killall"/> >>> <file crc="1237002094" >>> name="bin/nativeexecution/Linux-x86_64/process_start"/> >>> <file crc="722866005" name="bin/nativeexecution/Linux-x86_64/pty"/> >>> <file crc="2212810710" >>> name="bin/nativeexecution/Linux-x86_64/pty_open"/> >>> <file crc="496243041" >>> name="bin/nativeexecution/Linux-x86_64/sigqueue"/> >>> <file crc="3632465540" name="bin/nativeexecution/Linux-x86_64/stat"/> >>> <file crc="3831061554" >>> name="bin/nativeexecution/Linux-x86_64/unbuffer.so"/> >>> <file crc="2739242954" >>> name="bin/nativeexecution/MacOSX-x86/killall"/> >>> <file crc="1275998866" >>> name="bin/nativeexecution/MacOSX-x86/process_start"/> >>> <file crc="116223212" name="bin/nativeexecution/MacOSX-x86/pty"/> >>> <file crc="3907469265" >>> name="bin/nativeexecution/MacOSX-x86/pty_open"/> >>> <file crc="483427664" name="bin/nativeexecution/MacOSX-x86/stat"/> >>> <file crc="2121602452" >>> name="bin/nativeexecution/MacOSX-x86/unbuffer.dylib"/> >>> <file crc="1074101021" >>> name="bin/nativeexecution/MacOSX-x86_64/killall"/> >>> <file crc="3584022884" >>> name="bin/nativeexecution/MacOSX-x86_64/process_start"/> >>> <file crc="4063295432" name="bin/nativeexecution/MacOSX-x86_64/pty"/> >>> <file crc="21247631" >>> name="bin/nativeexecution/MacOSX-x86_64/pty_open"/> >>> <file crc="1927002667" >>> name="bin/nativeexecution/MacOSX-x86_64/stat"/> >>> <file crc="380202925" >>> name="bin/nativeexecution/MacOSX-x86_64/unbuffer.dylib"/> >>> <file crc="472383741" >>> name="bin/nativeexecution/SunOS-sparc_64/killall"/> >>> <file crc="1236182142" >>> name="bin/nativeexecution/SunOS-sparc_64/privp"/> >>> <file crc="2777571336" >>> name="bin/nativeexecution/SunOS-sparc_64/process_start"/> >>> <file crc="1789084748" >>> name="bin/nativeexecution/SunOS-sparc_64/pty"/> >>> <file crc="1356860664" >>> name="bin/nativeexecution/SunOS-sparc_64/pty_open"/> >>> <file crc="1736553690" >>> name="bin/nativeexecution/SunOS-sparc_64/sigqueue"/> >>> <file crc="4154337329" >>> name="bin/nativeexecution/SunOS-sparc_64/stat"/> >>> <file crc="587327566" >>> name="bin/nativeexecution/SunOS-sparc_64/unbuffer.so"/> >>> <file crc="2177548535" name="bin/nativeexecution/SunOS-x86/killall"/> >>> <file crc="4216904528" name="bin/nativeexecution/SunOS-x86/privp"/> >>> <file crc="416235550" >>> name="bin/nativeexecution/SunOS-x86/process_start"/> >>> <file crc="3281347693" name="bin/nativeexecution/SunOS-x86/pty"/> >>> <file crc="3367504075" >>> name="bin/nativeexecution/SunOS-x86/pty_open"/> >>> <file crc="1793077003" >>> name="bin/nativeexecution/SunOS-x86/sigqueue"/> >>> <file crc="2657351441" name="bin/nativeexecution/SunOS-x86/stat"/> >>> <file crc="1487122317" >>> name="bin/nativeexecution/SunOS-x86/unbuffer.so"/> >>> <file crc="3983361726" >>> name="bin/nativeexecution/SunOS-x86_64/killall"/> >>> <file crc="1974308125" >>> name="bin/nativeexecution/SunOS-x86_64/process_start"/> >>> <file crc="2798811464" name="bin/nativeexecution/SunOS-x86_64/pty"/> >>> <file crc="1270195796" >>> name="bin/nativeexecution/SunOS-x86_64/pty_open"/> >>> <file crc="698534868" >>> name="bin/nativeexecution/SunOS-x86_64/sigqueue"/> >>> <file crc="3428063497" name="bin/nativeexecution/SunOS-x86_64/stat"/> >>> <file crc="3597096606" >>> name="bin/nativeexecution/SunOS-x86_64/unbuffer.so"/> >>> <file crc="830078422" >>> name="bin/nativeexecution/Windows-x86/killall"/> >>> <file crc="1673852288" >>> name="bin/nativeexecution/Windows-x86/process_start"/> >>> <file crc="2554589296" name="bin/nativeexecution/Windows-x86/pty"/> >>> <file crc="4249424857" >>> name="bin/nativeexecution/Windows-x86/pty_open"/> >>> <file crc="1447464054" >>> name="bin/nativeexecution/Windows-x86/sigqueue"/> >>> <file crc="1930637636" >>> name="bin/nativeexecution/Windows-x86/unbuffer.dll"/> >>> <file crc="2688678926" >>> name="bin/nativeexecution/Windows-x86_64/killall"/> >>> <file crc="2083608141" >>> name="bin/nativeexecution/Windows-x86_64/process_start"/> >>> <file crc="3296644675" >>> name="bin/nativeexecution/Windows-x86_64/pty"/> >>> <file crc="2280330881" >>> name="bin/nativeexecution/Windows-x86_64/pty_open"/> >>> <file crc="1328258185" >>> name="bin/nativeexecution/Windows-x86_64/sigqueue"/> >>> <file crc="238068891" >>> name="bin/nativeexecution/Windows-x86_64/unbuffer.dll"/> >>> <file crc="2190030010" name="bin/nativeexecution/dorun.sh"/> >>> <file crc="2584744811" name="bin/nativeexecution/hostinfo.sh"/> >>> <file crc="249150406" >>> name="config/Modules/org-netbeans-modules-dlight-nativeexecution.xml"/> >>> <file crc="2803733936" >>> name="modules/org-netbeans-modules-dlight-nativeexecution.jar"/> >>> </module_version> >>> </module> >>> >>>> On Jan 13, 2022, at 4:43 PM, Tim Mullé <tmu...@gmail.com >>>> <mailto:tmu...@gmail.com>> wrote: >>>> >>>> So, I did some digging in the debugger of the Netbeans source (12.6) and I >>>> think I found where the issue is happening, just not sure why. >>>> >>>> One weird thing is that the HostInfo doesn’t know what `platform` my M1 >>>> Pro Mac is.. >>>> >>>> Then later on in >>>> ‘org.netbeans.modules.nativeexecution.api.util.HelperUtility.getLocalFile()’ >>>> it throws a MissingResourceException because it’s trying to find >>>> "bin/nativeexecution/MacOSX-unknown_64/pty” on the local file system..and >>>> that’s not correct because of the `-unknown` >>>> >>>> A ’null’ is then returned and that then gets set into the ‘Info” variable >>>> which then ultimately causes the exception, in PtyNativeProcess.create() >>>> it then calls `LocalNativeProcess.createAndStart()` and >>>> That fails because the `info.setExecutable(String path)` has been set to >>>> NULL because of the previous errors. >>>> >>>> Ultimately failing on line 163 in >>>> `org.netbeans.modules.nativeexecution.AbstractNativeProcess.java’ and then >>>> the error DOES get logged but at the FINE level..which doesn’t appear in >>>> the IDE LOG >>>> >>>> Hope this helps, I don’t know enough of the code to try to fix it.. looks >>>> like it is missing a file at first glance? >>>> >>>> - Tim >>>> >>>> *** CODE *** >>>> 'protected File getLocalFile(final ExecutionEnvironment env) >>>> throws ParseException, MissingResourceException { >>>> >>>> InstalledFileLocator fl = >>>> InstalledFileLocatorProvider.getDefault(); >>>> MacroExpander expander = MacroExpanderFactory.getExpander(env); >>>> String path = expander.expandPredefinedMacros(pattern); >>>> >>>> File file = fl.locate(path, codeNameBase, false); >>>> >>>> if (file == null || !file.exists()) { >>>> throw new MissingResourceException(path, null, null); //NOI18N >>>> } >>>> >>>> return file; >>>> } >>>> ' >>>> >>>> >>>> <Screen Shot 2022-01-13 at 4.18.50 PM.png> >>>> >>>> > On Jan 13, 2022, at 4:23 PM, Malcolm Fitzgerald >>>> > <malc...@notyourhomework.net <mailto:malc...@notyourhomework.net>> wrote: >>>> > >>>> > Has anyone picked up on Emilian's idea and checked the settings for Full >>>> > Disk Access and for Files and Folders in System Preferences -> Security >>>> > and Privacy -> Privacy? There may be a terminal icon labelled "java" >>>> > that is waiting to be checked. >>>> > >>>> > >>>> > Malcolm >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > Tim Mullé wrote on 14/01/22 8:44 AM: >>>> > >>>> >> I too am running an M1 Pro Mac with Monterey >>>> >> >>>> >> I’m using 17.0.1-tem java install from SDKMAN and I’ve tried >>>> >> 11.0.13-zulu and same issue. >>>> >> >>>> >> I don’t see java in my Files and Folders privacy >>>> >> >>>> >> >>>> >>> On Jan 13, 2022, at 2:41 PM, Tim Mullé <tmu...@gmail.com >>>> >>> <mailto:tmu...@gmail.com>> wrote: >>>> >>> >>>> >>> Sadly, that didn’t fix it for me. I do have Xcode and the command line >>>> >>> tools installed as well. >>>> >>> >>>> >>> I just deleted my /Library/Application Support/NetBeans folder and >>>> >>> restarted Netbeans and I still get the same error posted below. >>>> >>> >>>> >>> Oddly, the REMOTE terminal works and I connected to another machine >>>> >>> via the ssh and the terminal works >>>> >>> >>>> >>> It’s just the local terminal that is crashing with the error >>>> >>> >>>> >>> >>>> >>> >>>> >>>> On Jan 13, 2022, at 12:16 PM, David Green <dgreen...@gmail.com >>>> >>>> <mailto:dgreen...@gmail.com>> wrote: >>>> >>>> >>>> >>>> Works for me on M1 Pro with JDK 17 (and NB 12.4/12.5/12.6) >>>> >>>> >>>> >>>> Looking at System Preferences | Privacy > Files and Folders >>>> >>>> >>>> >>>> I note that java has access to Download Folders, Document Folders, >>>> >>>> and Desktop Folders but this is it (Java and NetBeans not listed >>>> >>>> elsewhere) and I don’t think these settings would only impact the >>>> >>>> terminal. >>>> >>>> >>>> >>>> I do have XCode and its command line support code loaded. >>>> >>>> >>>> >>>> I installed JDK 17 with JavaFX from Azul that was built for the M1. >>>> >>>> >>>> >>>> Installed NB 12.6. I am running the zsh shell. >>>> >>>> >>>> >>>> Not a direct answer but a bit of info that might be helpful. >>>> >>>> >>>> >>>> Dave >>>> >>>> >>>> >>>> On Jan 13, 2022 at 10:44:50 AM, Tim Mullé <tmu...@gmail.com >>>> >>>> <mailto:tmu...@gmail.com>> wrote: >>>> >>>>> Any ideas on how to fix or troubleshoot this? >>>> >>>>> >>>> >>>>> This happens on both 12.5 and 12.6 with JDK11 and JDK17 on my M1 Mac >>>> >>>>> >>>> >>>>> >>>> >>>>> >>>> >>>>> >>>> >>>>>> On Dec 14, 2021, at 2:50 PM, Tim Mullé <tmu...@gmail.com >>>> >>>>>> <mailto:tmu...@gmail.com>> wrote: >>>> >>>>>> >>>> >>>>>> Still having this issue with 12.5 and 12.6 on M1 Mac. >>>> >>>>>> >>>> >>>>>> The error that briefly flashes in the terminal window is: >>>> >>>>>> >>>> >>>>>> Cannot invoke “java.util.List.toArray(Object[])” because >>>> >>>>>> org.netbeans.modules.nativeexecution.NativeProcessInfo.getCommand >>>> >>>>>> is null >>>> >>>>>> >>>> >>>>>> I had to keep clicking on the “New Terminal” button and try to read >>>> >>>>>> the message since the screen goes black then clears and stays empty >>>> >>>>>> grey. >>>> >>>>>> >>>> >>>>>> Nothing shows up on the command line terminal or the IDE Log >>>> >>>>>> showing this error. >>>> >>>>>> >>>> >>>>>> >>>> >>>>>> >>>> >>>>>> > On Nov 12, 2021, at 3:34 PM, Tim Mullé <tmu...@gmail.com >>>> >>>>>> > <mailto:tmu...@gmail.com>> wrote: >>>> >>>>>> > >>>> >>>>>> > Hi, >>>> >>>>>> > >>>> >>>>>> > Just found something interesting when running Netbeans on my new >>>> >>>>>> > M1 Mac (Silicon) Monterey 12.0.1 with JDK 11 or JDK17 where >>>> >>>>>> > the “Open in Terminal” option under the Tools menu opens a blank >>>> >>>>>> > terminal. >>>> >>>>>> > >>>> >>>>>> > This didn’t happen on Big Sur x86_64 with either JDK.. >>>> >>>>>> > >>>> >>>>>> > Plus, I don’t seem to get any errors in the IDE LOG. >>>> >>>>>> > >>>> >>>>>> > <Screen Shot 2021-11-12 at 3.28.44 PM.png> >>>> >>>>>> >>>> >>>>> >>>> >>>>> >>>> >>>>> --------------------------------------------------------------------- >>>> >>>>> To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org >>>> >>>>> <mailto:users-unsubscr...@netbeans.apache.org> >>>> >>>>> For additional commands, e-mail: users-h...@netbeans.apache.org >>>> >>>>> <mailto:users-h...@netbeans.apache.org> >>>> >>>>> >>>> >>>>> For further information about the NetBeans mailing lists, visit: >>>> >>>>> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists >>>> >>>>> <https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists> >>>> >>>>> >>>> >>> >>>> >> >>>> > >>>> >>> >