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.
Related
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 2 years ago.
Improve this question
I have JDK 8 installed in my ubuntu 18.04 system and I now want to upgrade it to JDK 11 using this. I just want to know if this would create any problem or not. Would the older version be removed on upgrading( Actually I want older version to be removed by itself)?
Do this to uninstall previous versions of openJDK on Ubuntu
sudo apt-get remove openjdk
To remove all of the config files and dependencies.
sudo apt-get purge --auto-remove openjdk*
Then install openJDK 11
sudo apt-get install openjdk-11-jdk
An upgrade will generally allow code compiled for Java 8 to run; but, there are some caveats.
The inclusion of Project JigSaw means that the access rules for "reaching" a method have changed slightly. They are almost compatible between Java 8 and Java 11. The differences will show when:
You try to use one of the com.sun.* packages (or any other non-public api entry point).
You try to use reflection on a non-public API entry point.
You alter the launch to use a module, which will deactivate the Java 8 "default" module handling.
In short, it's almost an easy upgrade. The problems come into play when code is doing something it shouldn't have done, or when you have code not designed for modules, and some of your runtime code is designed for modules.
If you have access to source code, you can fix a lot of this by adding in the module specifications; but, that might require you to understand modularity (which is pretty easy, but a barrier nonetheless).
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 7 years ago.
Improve this question
How can I install 32 bit JDK on Ubuntu 64bit? I need to install it as I am having some problem with eclipse for android development.
The OpenJDK is part of Ubuntu's main repository, so it can be installed with the usual Ubuntu tools. You want package openjdk-7-jdk or openjdk-8-jdk.
Thanks to the "MultiArch" feature Ubuntu inherited from Debian, you can install the 32-bit version of a package on a 64-bit system using the usual tools, such as apt-get or aptitude. Just append :i386 to the package name. For example:
sudo apt-get install openjdk-7-jdk:i386
Any required i368 libraries will then be installed automatically.
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.
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
Does anyone know the process to install java on Ubuntu?
I have my server set up with Amazon in the cloud.
I am looking to run some java servers on my server and quickly came to notice that I needed to install java.
Can someone point me in the right direction with some steps?
I have looked at some websites but in the command line when I enter sudo nano /etc/apt/source.list the file is a new file... I have read there is supposed to be an existing file. Correct?
Thanks in advance. :)
If you have terminal access, depending on the version of Java, you're looking for, it would be something like this.
sudo apt-get install openjdk-6-jre
I use the Sun/Oracle JDK. You can download the JDK .sh file. Run it and it unpacks itself. Add the bin directory to your path and you can use it. This doesn't require root access and you can install as many versions as you want this way.
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 11 years ago.
Improve this question
i'm using Netbeans on Ubuntu, when i write top command i notice that Java causes like 100%+ cpu usage. Is there anything to do to speed up Netbeans ? can i download another JRE on ubuntu to speed it up (i'm using OpenJDK).
Thanks .
Another item that helps me, apart from replacing OpenJDK with SunJDK is the "Scanning Sources" which can be disabled if you goto Tools -> Options -> Misc -> Files and uncheck the Enable "auto-scanning" of sources.
I am not 100% sure what that option does, but it speeds up my projects. Also I would try NetBeans 7, they have made massive leaps and bounds in the newer versions from the older (not knowing what version you are using).
Yes, it's well known that Netbeans runs slower with OpenJDK.
Your question has been answered on AskUbuntu before:
https://askubuntu.com/questions/5567/how-to-install-the-sun-java-jdk
Enable the partner repository and then install Sun Java with:
sudo apt-get install sun-java6-jdk
I would:
Replace OpenJDK with Sun's JDK. OpenJDK's performance is still not upto par.
I would read this (a bit dated, but most of works with some changes).