Results 1 to 4 of 4
  1. #1
    couling is offline Member
    Join Date
    Nov 2010
    Posts
    54
    Rep Power
    0

    Default How to install Java without the GUI

    Hi All

    I've heard this was not possible off someone but as I havn't yet seen a definitive answer on this I'd just like to check. Is it possible to install a JVM on a machine which has no GUI?

    I'm looking to put Java on an embeded device running Debian Linux (well a NAS actually). Only problem is that it doesn't have a GUI and I don't want it to have one.

    Thanks for your time

    :cool:

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,435
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by couling View Post
    I've heard this was not possible off someone but as I havn't yet seen a definitive answer on this I'd just like to check. Is it possible to install a JVM on a machine which has no GUI?

    I'm looking to put Java on an embeded device running Debian Linux (well a NAS actually). Only problem is that it doesn't have a GUI and I don't want it to have one.
    You can install a Java SE distribution, just don't use any of the Swing classes because they'll throw a 'HeadlessException' (no monitor, no nothing that supports the Swing or AWT components).

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  3. #3
    couling is offline Member
    Join Date
    Nov 2010
    Posts
    54
    Rep Power
    0

    Default

    Well that's good news.

    I dont suppose anyone's had the experience in doing this? Trying to install OpenJava, the package manager tries to suck in xwindows and a bunch of font related packages. I'm wondering if I can just break the package dependencies.

    Bearing in mind that I'm on an ARM processor running debaian. If anyone has any hints about how to get java installed without all that, it would be a great help.

    Thanks so much for your time.

  4. #4
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,435
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by couling View Post
    Well that's good news.

    I dont suppose anyone's had the experience in doing this? Trying to install OpenJava, the package manager tries to suck in xwindows and a bunch of font related packages. I'm wondering if I can just break the package dependencies.

    Bearing in mind that I'm on an ARM processor running debaian. If anyone has any hints about how to get java installed without all that, it would be a great help.

    Thanks so much for your time.
    I've never done it but this would be my approach: install the entire SE JRE; in the jre/lib directory you find the core jar file: rt.jar. Remove all packages java.awt and its subpackages as well as javax.swing (and its subpackages). This removes all gui related classes. Then try to run somehing (not gui related). If it fails I'm curious to know why it fails, because, as far as I know, none of those classses are supposed to be preloaded by the jvm.

    kind regards,

    Jos

    ps. AAMOF (I'm lazy) I would leave those classes in the jar file and simply not use them ;-)
    cenosillicaphobia: the fear for an empty beer glass

Similar Threads

  1. I can't seem to install a package with java me SDK 3.0
    By father jack hackett in forum CLDC and MIDP
    Replies: 0
    Last Post: 04-08-2010, 06:04 PM
  2. how to install the POI for java
    By yeunghong in forum New To Java
    Replies: 0
    Last Post: 10-10-2009, 09:27 AM
  3. Can't Install Java JRE 6 Update 13 (using IE 8)
    By bizadi in forum New To Java
    Replies: 12
    Last Post: 04-03-2009, 04:39 PM
  4. Java RE SE does not install/verify
    By jlbm in forum New To Java
    Replies: 1
    Last Post: 03-20-2009, 08:45 PM
  5. What I need to install to learn java?
    By kvkv in forum New To Java
    Replies: 4
    Last Post: 02-11-2009, 06:53 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •