3

In Ubuntu 9.10 is there any way to confirm/ check if swing is installed and thus check its version!

Kai
  • 38,985
  • 14
  • 88
  • 103
Arkapravo
  • 4,084
  • 9
  • 37
  • 46

5 Answers5

4

Swing will be included in the JVM, if it's new enough.

See this page.

dj_segfault
  • 11,957
  • 4
  • 29
  • 37
1

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.

Chandra Sekar
  • 10,683
  • 3
  • 39
  • 54
1

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
  • 278,309
  • 50
  • 514
  • 539
1

Here's the Java installation page for Ubuntu that covers everything from SDK to web browsers.

C.D. Reimer
  • 115
  • 11
-1
  1. Open a terminal
  2. Type: java -version

If it says something meaningful, you're fine; you have swing on that machine.

OscarRyz
  • 196,001
  • 113
  • 385
  • 569
  • This is clearly not true. For instance, he could have openjdk-6-jre-headless – Matthew Flaschen Feb 25 '10 at 07:04
  • 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 Feb 25 '10 at 07:08
  • 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 Feb 25 '10 at 07:12