I'm trying to make Standford NER package to work on my mac. Using anaconda and python 2.7 (iPython notebook). I was following the steps given here:
http://www.nltk.org/api/nltk.tag.html#module-nltk.tag.stanford. While executing the last step, it gave me UnsupportedClassVersionError.."xy.z" is "52.0" which means I need to upgrade to java 8.
I upgraded to Java 8, but my java -version command still showing java 7. So I tried to fix it using the solution given here: After upgrading to Java8, javac still shows 1.7. Instead of removing, I renamed the directory. These are the following commands I exec:
cd /System/Library/Frameworks/JavaVM.framework/Versions/
mv Current Current_Old
ln -s /Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/ Current
Then after that java -version command is not working. I realized the directory name is incorrect and tried to replace it back using mv Current_Old Current, still the command is not working.
how can I restore my java?
Able to get it working again! All I did was restored legacy Java 6 from this link: https://support.apple.com/kb/DL1572?locale=en_US
Then java -version was even showing me the latest version which is Java 1.8. Able to start Java IDE now.
Related
Java -version in Linux is not seem to be working and returing -bash: java: command not found error,though im able to run java related apps.
I have installed jdk in my new linux machine and i have set the environment variable JAVA_HOME using which i can execute JAVA apps and I can echo the java path i set.
Problem is i can not see the java version i have installed ,using the command java -version (i want to know that everything is set fine)
can someone guide me ,what i am missing here.
You should have your java installation directory added to PATH environment variable in order to use java from terminal. For example:
export PATH=<your java Directory>/bin:$PATH
I know this question has been asked before, but the solutions do not work.
I've installed a new jdk 1.8 and configured it as platform. In netbeans.conf I've configured netbeans_jdkhome="/home/niklas/Java/jdk1.8.0_65/".
using update-alternatives I've configured the new jre for java. java -version correctly returns "java version "1.8.0_65"
Nevertheless running my project from inside netbeans it does not load, instead the "javafx requires newer version" error appears.
When I run exactly the same project with java -jar it runs correctly.
What did I forget to configure?
After long try-and-error here my solution:
the standard ubuntu package seems not to contain javafx. Therefore netbeans has to be installed from netbeans downloadpage.
Step-by-step solution:
Uninstall netbeans (e.g. sudo apt-get remove netbeans)
Download netbeans-8.1-javase-linux.sh
Run sh netbeans-8.1-javase-linux.sh --javahome /[PATH_TO_JDK]/jdk1.8.0_[VERSION] (note that this installer fails without warning if you use [PATH_TO_JDK]/jre/)
Edit [INSTALLATION_DIR]/etc/netbeans.conf
Make sure netbeans_jdkhome="[PATH_TO_JDK]" points to the right path (it didn't in my case.) and has no # before
note that the "All"-linux installer from the downloadpage is broken today (11.11.2015). Maybe this will be fixed soon.
I'm trying to install Pygame Subset for Android on my Linux machine, using Ubuntu 14.04. I've installed java and added it the the PATH, so I can type javac -version and get the version, verifying that it is installed (it is javac 1.7.0_79 for reference). However, running the PGS4A script ./android.py installsdk gives a long list of errors ending in Without a working JDK, I can't continue. But I have installed the jdk, I am even able to compile the test program test.java in the PGS4A directory. Why doesn't this work?
I tried java --version in the command line and I get :
Unrecognized option: --version
Error: Could not create the Java virtual machine
Error: A fatal exception has occurred. Program will exit.
Everything was working fine until I installed jre 7 (I had jdk 1.6 preinstalled )
So, I uninstalled the previous versions, restarted and then installed fresh jdk 7u5 windows i586.
Still I get the same problem. Can anyone help me with this?
I am unable to install and run maven for this reason.
You used two - marks. Try with one: java -version.
Update: Since Java 9 java and javac commands support both --version and -version.
java -version
This is the command to get the current installed version info
I am using UBUNTU 11.0.7 with softwares JDK7, but when iam trying to execute a simple java program from command line it again asks me to install jdk version , can anyone please help me out..
after install your jdk and set your path variable, write java -version to know that is java installed properly
then run your .jar file with java -jar yourfilePath