Mac OS: java missing [closed] - java

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I have Mac OS 10.8.4
when I type in terminal >java i got an error
Unable to locate an executable at
"/System/Library/Frameworks/JavaVM.framework/Versions/A/Commands/java/bin/java"
(-1)
Have no idea where and when its missed...Few days ago everything was fine. How to fix that ? Is that because I installed java 1.7 ?

Check first: whereis java, usually it is /usr/bin/java
Probably symbolic link for java in /usr/bin is not pointing to the right location. You can set this link manually to /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java
Also check other processes: javac, javadoc, javap, javaws and javah.
Additionally you can define JAVA_HOME in your .bash_profile.
cd /usr/bin
ls -l | grep java - check if it is indeed pointing to that wrong location
rm java - delete symbolic link
ln -s /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java java
try java -version

Did Mac OS block it again? Do you need to update to the latest version from java.com?

Download the Oracle Java SE JDK.

Related

Cannot install java on fedora [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
I cannot install Java on Fedora.
I looked in the internet for tutorials and followed every of them and still no one of them helped.
If I try to do `java --version~ it says:
[root#fedora michael]# java
bash: java: command not found...
Install package 'java-11-openjdk-headless' to provide command 'java'? [N/y] y
* Waiting in queue... Failed to install packages: java-11-openjdk-headless-1:11.0.11.0.9-2.fc34.x86_64 is already installed
I don't know what to do, can someone help?
OK. I found solution: alternatives --config java
Try with:
sudo dnf install java-1.8.0-openjdk.x86_64
Enter the command:
dnf list --installed | grep -i java
And write what is displayed to you.

What is the appropriate solution for os? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 8 years ago.
Improve this question
Java software is not working in ms xp OS service pack 2. What are the problem that would change my OS to allow working of java ?
From your question there is plenty of possible answers.
First: You have to download and install JDK (or at least JRE) in order to run jar files.
Download and entire installation process is described here.
EDIT 1:
Regarding to your questions in comments I am edited this answer.
Okay sir Bosko Mijin, thanks for your kind help.. how to check java is
working?? and should i change my OS to win 7? please give suggestions.
You should to check is JDK installed on your machine. Fastest way is that you run following commands (noted below) in command promt to check version and compiler.
Checking Java version: java -version
Checking Java compiler: javac -version
If there is installed JVM (attention: not Microsoft JVM) then you have to check environment variables and ensure that JAVA_HOME variable is set and it is in you PATH also.
You can do check this with following command: echo %JAVA_HOME%
If you have installed Microsoft JVM, I suggest to change OS (easier way, but clean) because Microsoft JVM supports Java up to v1.1 (it is very very old!). Harder way is that you get old versions of JVM and try to install them to your XP, but there is questionable are that packages 'young enough'.
FYI: Win7 have no such problems with JVM.
If you have Microsoft JVM, it would be great that you read this link. It will help you to decide what next.
Regarding to OS, I am not good person for this type questions because I like Unix/Linux systems (I am using them for long time ago) and I am afraid that my answer regarding this part will be very 'primary opinion based'.
Anyway, I wish you to solve this quickly. Best luck.

How to run Java when C drive is not the default in CMD prompt? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I am facing following scenario:
Win XP Machine, 2003 SP, jre7
No admin rights to even set class path via my computer properties
CMD prompt shows a local drive as user drive instead of C
Thus unable to execute following command:-
c:\program files\Java\jre7\bin
It says C:\program files isn't recognized as an internal or external command.
Tried to change directry to C but not successful
What I want:
To be able to compile and run java files from CMD prompt
Setting up path from CMD
I hope it ia not too much to expect in such an unreasonably restricted development environment.
Ok, you can try this
set PATH="C:\Program Files\Java(YOUR JDK FOLDER) eg. jdk1.5.0_14\bin";%PATH%
so enter set PATH="C:\Program Files\Java\jdk1.5.0_14\bin";%PATH% but make sure it matches your JDK install folder.
If you need anymore help please let me know.

Check jdk availability [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
How can I manually check if jdk is installed on my machine, and if yes, what version?
If I had jdk in Windows 7, and now I installed Windows 8 separately on the same machine, do I need to reinstall the jdk? Or can I reuse it?
When you install java on windows it can go by default in one of the following locations:
C:\Program Files (x86)\Java
C:\Program Files\Java
If you look in both of these locations, you will see exactly which JDKs and JREs are installed.
If you installed it somewhere else and don't remember, you can still search for java.exe
If by "Can i use it", you mean for use with an IDE like Eclipse or Netbeans, the answer is yes. They can use the JDK files no matter where they are, and whether it has been installed on the OS or not.
java -version will only tell you about a java version that would be on the path, which is not always the case.
If you have two Windows Version and the java installed in a place where both can share it, you can reuse it.
In cmd window type
java
If you see java usage information then you have java installed.
java -version
which display current version of your java.
You may reuse it windows 7 java in windows 8.

How to confirm that swing is installed [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
In Ubuntu 9.10 is there any way to confirm/ check if swing is installed and thus check its version!
Swing will be included in the JVM, if it's new enough.
See this page.
If you are looking for a JRE to run a desktop application, you can check for the 'java' executable in $PATH, look for $JRE_HOME or $JAVA_HOME environment variables. Once a JRE is found use java -version to get its version.
If you are trying to deploy an applet, use the Java Deployment Toolkit.
Swing is included in the default Java JRE. So just:
sudo apt-get install openjdk-6-jre
If you need the JDK (to develop on), it's:
sudo apt-get install openjdk-6-jdk
As far as the version, it should be compatible with Java 6. You can check the exact package version with:
apt-cache show openjdk-6-jre
Here's the Java installation page for Ubuntu that covers everything from SDK to web browsers.
Open a terminal
Type: java -version
If it says something meaningful, you're fine; you have swing on that machine.

Categories

Resources