After downloading a java file it would not open - java

Note: This is on mac
So i downloaded a java file recently and after downloading it i tried opening it to which it says the java jar file cannot be opened and to check to console. After looking up a tutorial i put the following commands into the terminal.
Umairs-MacBook-Air:~ umairahmed$ java -version
java version "11.0.2" 2019-01-15 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.2+9-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.2+9-LTS, mixed mode)
Umairs-MacBook-Air:~ umairahmed$ java -jar/Users/umairahmed/Downloads/forge-1.12.2-14.23.5.2768-universal.jar
Unrecognized option: -jar/Users/umairahmed/Downloads/forge-1.12.2-14.23.5.2768-universal.jar
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
How do i fix this?

You are missing a space
java -jar /Users/.......

Related

Issue with Eclipse with Scala IDI

Once i integrate scala IDI in eclipse(by using eclipse marketplace) and restart it, i get the below error message.
Alert: Failed to create a java virtual machine.
java -version
java version "1.8.0_341"
Java(TM) SE Runtime Environment (build 1.8.0_341-b10)
Java HotSpot(TM) 64-Bit Server VM (build 25.341-b10, mixed mode)

"bash: jstack: command not found" error on Amazon Linux AMI

On ec2 instance(Amazon Linux AMI) jstack is giving following error
bash: jstack: command not found
Java is installed on the machine
java -version
java version "1.8.0_151"
Java(TM) SE Runtime Environment (build 1.8.0_151-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.151-b12, mixed mode)
Is there any reason to get error for jstack when java is already installed?
JDK is required for jstack. The instance only has JRE.

VsCode does not indicate the correct version

Why not specified correct version of java JRE in my vscode ?
Here is my java version.
$java -version
java version "1.8.0_191"
Java(TM) SE Runtime Environment (build 1.8.0_191-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.191-b12, mixed mode)
And env path here,
$env | grep JAVA
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home
And user setting in vscode,
"java.home": "/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home",
When open java project in vscode, next error occurred.
enter image description here
Hello.Thank you.

CoreNLP giving Could not find or load main class error

Downloaded the CoreNLP from https://github.com/stanfordnlp/CoreNLP. When I run
$ java -mx4g src.edu.stanford.nlp.parser.dvparser.CacheParseHypothese
Error: Could not find or load main class src.edu.stanford.nlp.parser.dvparser.CacheParseHypothese
$ java -version
java version "1.8.0_51"
Java(TM) SE Runtime Environment (build 1.8.0_51-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03, mixed mode)
It seems you have misspelling - > CacheParseHypotheses add s char at the end.
There is the class CacheParseHypotheses.

JNLP application fails with error about missing jniwrap64.dll

I have a JNLP application which fails with the following error:
Cannot find JNIWrapper native library (jniwrap64.dll) in java.library.path: ....
I have Java 8 64bit installed and using IE11.
Any help on how to fix it will be appreciated.
Just to clarify: I did not write the application and only trying to run it.
You need 32bit java version to launch the JNLP application and not 64bit java
please run below command to check what version of java you are running
C:\RIM\SINGTEL\950_0\inproc>java -d64 -version
java version "1.8.0_40"
Java(TM) SE Runtime Environment (build 1.8.0_40-b26)
Java HotSpot(TM) 64-Bit Server VM (build 25.40-b25, mixed mode)
Java HotSpot(TM) 64-Bit Server VM (build 25.40-b25, mixed mode)

Categories

Resources