Error in Installing javac for fedora 20 and java version 1.6

  • Thread starter ankitdixit
  • Start date
  • Tags
    Error Java
In summary, the conversation discusses the process of switching from Java 7 to Java 6 on a Fedora 20 system. The speaker had to remove Java 7 and then install Java 6, but encountered an issue with the Java compiler, Javac, being missing. They tried to install it using the command "yum install java-1.6.0-openjdk-devel" but it was not available. The speaker then asks for assistance in installing Javac and raises questions about the compatibility of Fedora 20 with Java 6.
  • #1
ankitdixit
6
1
By default, I had Java 7 installed on my system(X64, Fedora 20).

I needed Java 6 for a software, hence had to remove 7

Java:
sudo yum remove *java*

And then, I installed Java 6.

This installs Java 6 successfully. but the java compiler, JavaC is missing. For that, I try -

Java:
su -c "yum install java-1.6.0-openjdk-devel"

Loaded plugins: langpacks, refresh-packagekit
No package java-1.6.0-openjdk-devel available.
Error: Nothing to do

I use this online compiler to run the java program. Could someone please help me with installing javac for java 1.6?
 
Technology news on Phys.org
  • #2
Javac comes with the java sdk. Did you install the sdk or only the java runtime?
 
  • #3
ankitdixit said:
Fedora 20
This is 14 releases back. Is that what you want? Is the repo still active?
 

What is the cause of the error in installing javac for Fedora 20 and Java version 1.6?

The most common cause of this error is that the correct Java Development Kit (JDK) is not installed on the system. Javac is the compiler for Java programming language, and it requires the JDK to be installed in order to function properly.

How can I check if the JDK is installed on my Fedora 20 system?

You can check if the JDK is installed by running the command "java -version" in the terminal. If the JDK is installed, it will display the version of Java that is currently installed on your system. If it is not installed, you will receive an error message.

How do I install the JDK on Fedora 20?

To install the JDK on Fedora 20, you can use the package manager called "yum." In the terminal, type "sudo yum install java-1.6.0-openjdk-devel" and follow the prompts to complete the installation. This will install the JDK and the necessary tools, including javac.

Why is it important to have the correct version of Java when using javac?

Javac is the compiler for Java programs, and it is designed to work with specific versions of Java. If you have a different version of Java installed, javac may not function properly and can result in errors. It is important to have the correct version of Java for compatibility and to ensure that your programs are compiled correctly.

Is it possible to install a different version of Java on Fedora 20?

Yes, it is possible to install a different version of Java on Fedora 20. However, it is recommended to only have one version of Java installed at a time to avoid conflicts. You can use the "alternatives" command to switch between different versions of Java on your system.

Similar threads

  • Programming and Computer Science
Replies
2
Views
2K
  • Programming and Computer Science
Replies
12
Views
4K
  • Programming and Computer Science
Replies
2
Views
2K
  • Programming and Computer Science
Replies
1
Views
827
  • Programming and Computer Science
Replies
2
Views
4K
  • Programming and Computer Science
Replies
2
Views
315
  • Engineering and Comp Sci Homework Help
Replies
5
Views
2K
  • Programming and Computer Science
Replies
6
Views
4K
  • Programming and Computer Science
2
Replies
49
Views
10K
Back
Top