Cant install Java

125 views
Skip to first unread message

Kev Lau

unread,
Dec 11, 2014, 9:22:58 PM12/11/14
to java...@googlegroups.com

I tried to install Java with Apache Solr the easy way using this tutorial:-

https://www.digitalocean.com/community/tutorials/how-to-install-solr-on-ubuntu-14-04

If you want to install Solr the easy way, you should use this section of the article. Solr doesn't work alone; it needs a Java servlet container such as Tomcat or Jetty. In this article, we'll use Jetty, although Tomcat is just as easy. First, we should install the Java JDK. If you want to install a custom version, please see this article. If you want a simple installation, execute the following commands:

sudo apt-get -y install openjdk-7-jdk
mkdir /usr/java
ln -s /usr/lib/jvm/java-7-openjdk-amd64 /usr/java/default

Ubuntu provides 3 Solr packages by default: solr-common, the package that contains the actual Solr code; solr-tomcat, Solr integrated with Tomcat; and solr-jetty, which is just like solr-tomcat but with the Jetty web server. In this article, we will install solr-tomcat, so execute the following command:

sudo apt-get -y install solr-tomcat

Your Solr instance should now be available at http://YOUR_IP:8080/solr. Skip the next section on installing manually if you want to configure Solr.


Now I am getting this error:-

opt/solr# java -v
Unrecognized option: -v
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.


Someone please help me fix this!
Thanks!
Kev

Graham Allan

unread,
Dec 17, 2014, 8:07:29 AM12/17/14
to java...@googlegroups.com
I also get that same error when I run "java -v", it's just that '-v' is an invalid argument, the correct flag is '-version' (assuming that's what you intended):

$ java -v

Unrecognized option: -v
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
$ java -version
java version "1.7.0_21"
Java(TM) SE Runtime Environment (build 1.7.0_21-b11)
Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)

HTH,


--
You received this message because you are subscribed to the Google Groups "Java Posse" group.
To unsubscribe from this group and stop receiving emails from it, send an email to javaposse+...@googlegroups.com.
To post to this group, send email to java...@googlegroups.com.
Visit this group at http://groups.google.com/group/javaposse.
For more options, visit https://groups.google.com/d/optout.

Deepak Ganer

unread,
Dec 17, 2014, 8:19:04 AM12/17/14
to java...@googlegroups.com
Can u try as below and let me knwo


If you are running on Windows you should run with IBM JVM provided with WebSphere not with hotspot. So try to clear JAVA_HOME and PATH system variables from paths pointing to Oracle JVM. Then open command line, go to C:\IBM\SDP\runtimes\base_v7\bin and run manageprofiles script using correct parameters. Template path in your first try is for sure incorrect. No jvmhooks or Mercury stuff shouldnt be picked up during profile creation. 
--
Thanks
Deepak Ganer
Contact: +91-9986310811
ganer....@gmail.com

Mark Derricutt

unread,
Dec 17, 2014, 8:28:48 PM12/17/14
to java...@googlegroups.com
On 18 Dec 2014, at 2:05, Graham Allan wrote:

> I also get that same error when I run "java -v", it's just that '-v' is an invalid argument, the correct flag is '-version' (assuming that's what you intended):
>
> $ java -v
> Unrecognized option: -v
> Error: Could not create the Java Virtual Machine.
> Error: A fatal exception has occurred. Program will exit.
> $ java -version
> java version "1.7.0\_21"
> Java(TM) SE Runtime Environment (build 1.7.0\_21-b11)
> Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)

It amuses to this day that this has never been fixed. No one in hell should that be a "fatal exception" - I understand why it is, but that message has always seemed overly....dramatic.


--
Mark Derricutt
http://www.theoryinpractice.net
http://plus.google.com/+MarkDerricutt
http://twitter.com/talios
http://facebook.com/mderricutt
signature.asc

Graham Allan

unread,
Dec 18, 2014, 8:03:15 AM12/18/14
to java...@googlegroups.com
$ java -e
Unrecognized option: -g
Error: Could not create the Java Virtual Machine. This command is headed for a disaster of biblical proportions. Real wrath of God type stuff. Fire and brimstone coming down from the skies! Rivers and seas boiling!
Error: A fatal exception has occurred. Program will exit, causing forty years of darkness! Earthquakes, volcanoes... Human sacrifice, dogs and cats living together... mass hysteria!

Chris Phelps

unread,
Dec 18, 2014, 9:48:11 AM12/18/14
to java...@googlegroups.com
If you fix this error you will have saved the lives of millions of vot^H^H^H coders.

-C

Reply all
Reply to author
Forward
0 new messages