How to run netbeans-8.2-linux.sh in ubuntu 18.04 - java

it's been exactly three days that I'm downloading all sorts of versions of netbeans, but in the end I can not run the command ./netbeans-8.2-linux.sh which always shows me an error .
here is somehow the message that sends me the terminal when I execute this command:
Configuring the installer...
Searching for JVM on the system...
Extracting installation data...
Running the installer wizard...
No protocol specified
Exception: java.lang.NoClassDefFoundError thrown from the UncaughtExceptionHandler in thread "main"
So I ask myself the question: how to solve this type of problem?

you're missing the JDK. most easy might be to install JDK 8u111 with NetBeans 8.2.
this would install both of them. otherwise just install the JDK - and then NetBeans.

Related

MacOS run java in terminal, got Error occurred during initialization of VM

I installed JDK in my Mac, I tried to run java in terminal, but got this error:
~ % java
Error occurred during initialization of VM
Unable to load native library:
I got /usr/bin/java when I run which java. I tried to add environment variable into .bash_profile and got /Library/Java/JavaVirtualMachines/jdk-16.0.1/Contents/Home when I run echo $JAVA_HOME. However I can run java code in IntelliJ, I think that's because IntelliJ is using some internal JDK. I'm trying to use Apache Kafka, also got Error occurred during initialization of VM. Anyone know what may cause this happens?
BTW, I have 6 different versions in my JavaVirtualMachines file...Not sure if that's related.

JPM [err] Failed to find Java VM

When i run execute jpm in Win7 command prompt > jpm then i got this error an popup and "[err] Failed to find Java VM" error message in command line.
Before that, i'm face configure issue on Blade CLI, I read some post suggest I uninstall all JDK7 and reinstall JDK8 in my develop laptop.
This is my JAVA_HOME variable
C:\Program Files\Java\jdk1.8.0_121
This is my PATH variable
C:\Ruby23-x64\bin;C:\instantclient_12_1;C:\apache-maven-3.3.9\bin;C:\Program Files\Java\jdk1.8.0_121\bin;C:\Users\admin\.jpm\windows\bin;C:\Users\admin\AppData\Local\GitHubDesktop\bin;C:\IDE\apache-ant-1.10.1\bin;C:\Program Files\nodejs\node_modules\npm;%NPM_PACKAGES%;C:\Users\admin\AppData\Roaming\npm;C:\Program Files\Java\jre1.8.0_121\bin;
This is my node js version, > node -v
v6.11.2
I have run the npm install jpm --global successful.
This issue will occur in case of 32 bit / 64 bit incompatibility.
Both your JVM and the application which you want to run (In this case its JPM) should have the same binary architecture, either 32 or 64 bit.
I also faced same issue once, in my case issue JAVA version was updated automatically, to fix that, I just reset JAVA home to new JDK and issue was fixed.
I hope it will helpful for users, facing issue because of JAVA update.
Go to the following folder and edit the .ini files.
C:\Users\Frank Hobbs\.jpm\windows\bin
Add the following attribute. Adjust according to the location of your jvm install folder.
vm.location=c:\pkg\java\jdk-11.0.12+7\bin\server\jvm.dll

Incompatible JVM message when trying to install eclipse

I just completed a Selenium Webdriver course using a borrowed windows laptop. However as I use Macs at home I am trying to install Eclipse on my own iMac using OSX 10.11.4.
I downloaded and ran the installer for Eclipse but I got the error message "Incompatible JVM - version 1.7.0_79 of the JVM is not suitable for this product. Version 1.8or greater is required"
So I installed the latest version of java (1.8) which went fine, however when I try to launch Eclipse again I get the same message. And when I enter Java -version into the terminal I still java version "1.7.0_79"
I did a bit of digging around and I came across a thread from a couple of years back Java 1.7 on OSX 10.9.2 running as 1.5? which appears to state that the solution to this is
rm -rf ~/Library/Java/Extensions
sudo rm -rf /Library/Java/Extensions
Now I am not a very technical person and when I entered these commands into the terminal window I got the message :
ARNING: Improper use of the sudo command could lead to data loss
or the deletion of important system files. Please double-check your
typing when using sudo. Type "man sudo" for more information.
To proceed, enter your password, or type Ctrl-C to abort.
So I aborted until I can find out if this is still the solution as this was the solution 3 years ago and is this all I need to do to get this issue fixed.
Any help would be very much appreciated

Javapackager deploy IOException on second time

i noticed that i can not deploy a JavaFX application with javapackager two times without closing the IDE / commandline. I want to create a native image of my application on a Windows 10 machine.
After the second deploy I get Exception: java.io.IOException: Access denied. After closing and reopen it works for one deploy again.
I can reproduce this Issue with Netbeans (create a JavaFX Application, enable Native Packaging, and then package as "image only") on 3 different PCs with Oracle JDK 8u121 and Windows 10.
I also get this error in a gradle project in eclipse trying to deploy it with the official ant task (https://docs.oracle.com/javase/8/docs/technotes/guides/deploy/javafx_ant_tasks.html)
Also tried it on an Ubuntu VM and OpenJDK. There is no problem.
Can somebody of you reproduce this error on Windows 10, too?
Is there a workaround or offical bug report for this?
Thanks in advance
Joey
This is a known problem, the cause is a file-handle leak and already got reported by me: https://bugs.openjdk.java.net/browse/JDK-8148717 It is only windows-specific, as the file-locking on the JRE-folder works on windows-systems, other OS don't lock.
This bug got worked around inside the JavaFX-Gradle-Plugin, as gradle starts daemons, which hold up the JVM, the JavaFX-Maven-Plugin didn't need it, because the JVM is always closed.
Disclaimer: I'm the creator of the JavaFX-Gradle-Plugin and maintainer of the JavaFX-Maven-Plugin.

Android Studio - Unrecognized VM option 'MaxPermSize=256m'

I just installed Android Studio on Elementary OS 0.3 Freya and run it using the terminal. On my first start-up, however, there's an error message shown:
Gradle 'Test' project refresh failed
Unable to start the daemon process. This problem might be caused by
incorrect configuration of the daemon. For example, an unrecognized
jvm option is used. Please refer to the user guide chapter on the
daemon at http://gradle.org/docs/2.2.1/userguide/gradle_daemon.html
Please read the following process output to find out more:
Unrecognized VM option 'MaxPermSize=256m' Error: Could not create the
Java Virtual Machine. Error: A fatal exception has occurred. Program
will exit.
I read this and tried all the ways to solve it but to no avail. I did notice that his error was somewhat different from mine and thought that might be why I couldn't solve my problem using the ways suggested.
As I executed the .sh file on my terminal, it printed:
Java HotSpot(TM) Server VM warning: ignoring option MaxPermSize=250m;
support was removed in 8.0
(java:5094): Gtk-WARNING **: Unable to locate theme engine in
module_path: "pixmap"
Gtk-Message: Failed to load module "canberra-gtk-module"
I'm not sure whether it's related to the error or not. Please help.
In my case I had a line
org.gradle.jvmargs=-Xmx6408m -XX:MaxPermSize=6408m -XX:+HeapDumpOnOutOfMemoryError
in my gradle.properties file in the project structure.
removing -XX:MaxPermSize=6408m from that file fixed an issue
As it was already said in this thread, Permanent Generation was removed in Java 8, which is used in your case. I think, the easiest solution is to remove parameters associated with Permanent Generation during program execution.
Go to the directory where you have Android Studio. Then go to the bin/ subdirectory. Locate the following files, which contains Java Virtual Machine options:
studio.vmoptions
studio64.vmoptions
Open these files and locate line with MaxPerSize parameter. It should look as follows:
XX:MaxPermSize=256m
Remove this line in both files. I don't know if you are using 32-bit or 64-bit operating system, so you can update both files just in case.
I'm not sure if it will solve your problem, but I would try it in such situation. In my case, with this option and Java 8, I just get the warning, but Android Studio starts anyway. After removing this parameter, Android Studio still starts, but without warning. I'm using Ubuntu 14.04 LTS.
EDIT:
There is another solution for this problem described here: https://stackoverflow.com/a/27913562/1150795.
Go to File > Other Settings > Default Project Structure > JDK location and check the path.
In case of Ubuntu Linux, we can set /usr/lib/jvm/java-7-oracle as default JDK if we are using Oracle JVM. JDK 7 is the safest option for Android.
-XX:MaxPermSize was deprecated in JDK 8, marked as obsolete in JDK 16, and removed in JDK 17. It was superseded by the -XX:MaxMetaspaceSize option.
Change -XX:MaxPermSize to -XX:MaxMetaspaceSize solve my problem.
ref:
https://github.com/expo/expo-cli/issues/4196#issuecomment-1035850918
https://docs.oracle.com/en/java/javase/17/docs/specs/man/java.html#removed-java-options
In my case opening $ANDROID_HOME/tools/lib/monitor-x86_64/monitor.ini and removing
XX:MaxPermSize=256m
from it did the job.
Oh I've solved this problem, I install Oracle JDK 9 when android studio runs on JDK 6 or JDK 7 (if I'm not mistaken).
so I uninstalled Oracle JDK 9, then download and install the JDK 7.
On MacOS the following clause in ./gradlew injects this option:
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\" \"-Xmx1024m\" \"-Xms256m\" \"-XX:MaxPermSize=1024m\""
fi
This file can be edited by hand after the project has been generated.
i had the same issue and i was able to solve it by adding this directly in the terminal
export JAVA_VERSION=1.8
and then try the

Categories

Resources