How to get NetBeans 12.0 to launch on Mac (MAC OS 11.0 beta / Big Sur) - netbeans

On Mac (Big Sur) when I click on the Netbeans 12 icon in the doc it bounces briefly then fails to launch Netbeans.

The answer helped me launch Netbeans from the terminal. I added this change to make my dock icon launch Netbeans like before.
I changed the Netbeans config file to make it launch with the Java path:
Like the previous post indicates find your JDK path with this command in the Terminal
/usr/libexec/java_home -v '1.7*'
Now add this path to the Netbeans conf file. To do this:
right click on the Netbeans icon in the dock and select Open in Finder
in the smaller icon it shows right click again and select Show sources
find the netbeans.conf file in folder Resources/NetBeans/netbeans/etc/netbeans.conf
open this netbeans.conf file with a TextEditor or similar and find the line
#netbeans_jdkhome="/path/to/jdk"
Uncomment this line and change it for your path (the one you found in point 1)
something like
netbeans_jdkhome="/Library/Java/JavaVirtualMachines/jdk-15.jdk/Contents/Home"
Save the netbeans.conf file and try and launch from the Dock icon

If you right click on the icon in the dock --> Options --> Show in Finder the operating system will show you where 'Apache Netbeans 12.0' is located.
Highlight 'Apache Netbeans 12.0' then right-click and choose 'Show Package Contents', then you can find a shortcut that launches Netbeans (Contents/MacOS/netbeans).
If you double-click to launch netbeans you'll be presented with the following reason why it fails to load.
/Applications/NetBeans/Apache\ NetBeans\ 12.0.app/Contents/Resources/NetBeans/netbeans/bin/netbeans ; exit;
rob#Robs-MBP-2015 ~ % /Applications/NetBeans/Apache\ NetBeans\ 12.0.app/Contents/Resources/NetBeans/netbeans/bin/netbeans ; exit;
The operation couldn’t be completed. Unable to locate a Java Runtime that supports (null).
Please visit http://www.java.com for information on installing Java.
Cannot find java. Please use the --jdkhome switch.
Credit goes to How can I change Mac OS's default Java VM returned from /usr/libexec/java_home for providing the following step to determine what the JDK path is...
/usr/libexec/java_home -v '1.7*'
Then you can type the following (adjust for your path and version required)
export JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk-13.0.2.jdk/Contents/Home"
However that didn't seem to do the trick for me (I also tried JDK_HOME), so instead from a Terminal window type the command to launch Netbeans but include the --jdkhome to your Java home folder, e.g.
/Applications/NetBeans/Apache\ NetBeans\ 12.0.app/Contents/Resources/NetBeans/netbeans/bin/netbeans --jdkhome /Library/Java/JavaVirtualMachines/jdk-13.0.2.jdk/Contents/Home
Now I have Netbeans launching again. I'm not quite sure why the JAVA_HOME doesn't resolve this, but hopefully in the meantime anyone unable to launch Netbeans can at least use this workaround.
I've also found this How to run a shell script in OS X by double-clicking? useful to ensure I can double-click on the shell script to run it from a shortcut on my desktop.

For some reason, some Netbeans versions for Mac OS do not detect the JDK contained in JRE. For proper installation and running the application,you must have Java for Mac OS installed previously.
https://www.java.com/es/download/

I had the same issue after upgrading to macOS Big Sur from Mojave.
Before running commands in terminal, you could just try to reinstall Java for Mac OS X :
https://www.java.com/en/download/
It solves my issue. I am now able to launch NetBeans 12.1

Related

Eclipse Popping in Unexpected error [duplicate]

I recently decided to start trying Android app development, so I downloaded the Java SE Development Kit 8 (x86) for Windows (I got Windows 8 64bit, but my guide recommends getting the 32bit one), the Android SDK, and the Eclipse IDE for Java Developers (x86).
However, my Eclipse won't launch when I double click eclipse.exe! Instead, I get the following error message:
I tried adding Java to my Path variable in my Environment variables as suggested in some of the solutions I looked up, but it still doesn't launch properly.
Anyone know what else I can try? Also, if possible, please do not use super-technical vocabulary as I'm new to these kinds of stuff and will not understand you...thank you haha :D
I had the same issue and was trying to install different versions of JDK: 1.6, 1.7, 1.8.
It didn't help much.
The problem was resolved when I changed PATH variable by removing
C:\ProgramData\Oracle\Java\javapath;
In command prompt I also ran following commands:
set JAVA_HOME=C:\Program Files\Java\jdk1.8.0_25
set PATH=C:\Program Files\Java\jdk1.8.0_25\bin;%PATH%
But I think the most important was to remove C:\ProgramData\Oracle\Java\javapath; from the PATH.
I know exactly how to solve your problem. Go to search and put in environment, a prompt will come up and ask you to "Edit environmental variables for your account" click that and a window will pop up. There will be the current paths which are running on the top (you should have your JDK version running, mine is 1.8) and on the bottom part there will be paths to choose from. Select (on the bottom part) the java path and delete it, then click okay. This should work.
If it didn't work, You may also add a new path to the java bin folder which worked for me.
Here is an alternative:
As described here, make sure that you have the -vm option set in your eclipse.ini file.
It must be an absolute path and on 2 separate lines:
-vm
<Absolute Path>\javaw.exe
Save your .ini and relaunch Eclipse
One line answer, remove 'C:\ProgramData\Oracle\Java\javapath;' from your path variable. It will start to work.
Most errors with starting eclipse happen due to multiple JRE or JDK version which makes the installer go nuts.
Solution: Go to Control Panel -> Uninstall Programs
If you're running 64-bit java, then uninstall all Java without the 64bit indicator. If 32-bit, then uninstall all that have 64-bit
It works like magic!
What worked for me was having installed adoptopenjdk11 using Chocolatey package manager:
choco install adoptopenjdk11

How to run eclipse on Ubuntu 13.10

I've copied my eclipse from my office laptop to home laptop , both of which are running on Ubuntu 13.10. Well the problem is when I start the eclipse on my home laptop it gives me an error :
There is no application installed for “executable” files.
Do you want to search for an application to open this file
I don't get it ,is it an executable file that i'm starting and i need tools like WINE for this or what type of file is it ,to be clear i want to know what kind of file ubuntu has in contrast to windows < .exe > executable files
Try to right+click on eclipse icon -> properties .. go to permission tab.
Then make sure that the check box "Allow executing file as program" is checked.

Error installing Netbean in Windows 8

I have tried everything possible to install Netbean 7.3.1 on my Windows 8 OS supporting laptop. However, it was not going through from here https://netbeans.org/downloads/index.html.
This is the message I got after downloading all the software from mentioned link when tried to install for each download:
CRITICAll nullnull
I downloaded JDK (Name of the file: jdk-7u25-nb-7_3_1-windows-x64) and when I tried installing JDK I got an error says:
cannot find bundled JVM to run installer
Please can anyone share step-by-step instructions?
Open command prompt in the directory where your netbeans setup file is located. (to open cmd prompt, press shift and right click anywhere in the directory window and hit 'open command prompt here')
Now type the following command in command prompt
netbeans-8.0-windows.exe --tempdir C:\Temp --userdir C:\NBI
hit enter.
This is apparently a bug, though not in netbeans. Check out comments 9 and 10 for a possible work-around.

Launch terminal from eclipse

I recently switched to Eclipse (Helios) for my programming needs, and I like it very much.
There is just on thing that is driving me crazy, how can I launch (compile and run) my code into the native mac osx terminal.
I tried creating an "external tools configuration", but that just starts the terminal without outputting the application.
What I do now is right-click on the binary in the Project Explorer and then "Open With" and then "Other" and then I pick the terminal app from the list. But this solution is driving me nuts.
Please help.
It's all about defining the External Tool correctly.
For example, the following should work if your selected file is a Unix executable.
Open a new External Tool configuration.
Set the location to /usr/bin/open
Set Working directory as ${selected_resource_loc}
Set the arguments to -a /Applications/Utilities/Terminal.app ${selected_resource_loc}
When you run make sure you select "src"
This should work. You could improve it further. You could even write an AppleScript that would do that and run it using osascript.

Can't run eclipse on netbook MSi wind! HELP

I just got this MSI wind netbook and tried to run eclipse on it. I installed JDK6 on the netbook already. Whenever I open eclipse there is nothing show up on the screen except a "warning sound" that alerts. What is the problem here?
ps.I just started learning java.
Most likely the Eclipse starter program can't find where you installed Java. Since Eclipse is a Java program, it needs a JRE installed (comes with the JDK typically) to run. Assuming you're running Windows on your MSI Wind, check to make sure the java executable is on your path in your computer environment settings (windows key + printscreen button, or windows key + pause button are the shortcuts to open the computer properties dialog if I remember correctly. Then go to advanced).
You can test if java is on the path by opening a cmd.exe shell window and typing 'java'. If it says it cannot find java, then you need to fix the path.
See this link for additional troubleshooting details: http://www.eclipsezone.com/eclipse/forums/t99010.html
You could try reinstalling the JDK. Perhaps having it on a different disk than the default (D: versus C:) is causing some trouble? It certainly isn't a problem with the hardware, I'm running Eclipse on Windows on an MSI Wind.
Use "Add/Remove programs" in the control panel to remove the java versions you have installed.
Then visit "java.com" and use it to install Java, and verify that it is working. You do not need more than that to use Eclipse.