In Ubuntu 9.10 is there any way to confirm/ check if swing is installed and thus check its version ! ...... I am a Noob to swing ! ....
+1
A:
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.
Chandru
2010-02-25 07:01:33
+1
A:
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
Matthew Flaschen
2010-02-25 07:02:45
It is important to note that a JRE/JDK might be installed directly from the Sun/Oracle's site too. In that case checking apt's meta-data might not help.
Chandru
2010-02-25 07:04:23
Sun's version is better. Use: `sudo apt-get install sun-java6-jre` or `sudo apt-get install sun-java6-jdk`
OscarRyz
2010-02-25 07:06:39
Chandru, that's a valid point.
Matthew Flaschen
2010-02-25 07:15:34
A:
- Open a terminal
- Type:
java -version
If it says something meaningful, you're fine; you have swing on that machine.
OscarRyz
2010-02-25 07:04:00
This is clearly not true. For instance, he could have openjdk-6-jre-headless
Matthew Flaschen
2010-02-25 07:04:42
I'm pretty sure he doesn't. Ubuntu 9.10 comes with out java at all. You install it by typing `sudo apt-get install sun-java6-jdk` anyway, your observation makes sense and is still valid. Isn't this a superuser.com question anyway?
OscarRyz
2010-02-25 07:08:48
Most likely, he doesn't have a headless installation. But it's best to make sure. And yes, I almost voted to close it as belonging on Super User.
Matthew Flaschen
2010-02-25 07:12:23
+1
A:
Here's the Java installation page for Ubuntu that covers everything from SDK to web browsers.
C.D. Reimer
2010-02-25 07:04:01
+1
A:
Swing will be included in the JVM, if it's new enough.
See this page.
dj_segfault
2010-02-25 07:05:48