Linux jar file not portable to Windows

Discussion in 'Java' started by Q&Z, Apr 30, 2005.

  1. Q&Z

    Q&Z Guest

    I have an application that I have developed on a Linux box. When I
    create the jarfile and attempt to execute it in Windows, I get the
    following error:

    java.lang.NoClassDefFoundError: sun/awt/X11GraphicsDevice at
    javax.media.j3d.GraphicsConfigTemplate3D

    X11, of course, is a reference specific to Linux. I know, however, that
    I should be able to simply run the jar file on Windows without having to
    first recompile the entire application. In fact, I have another Windows
    box at work where I did just that: When I transferred the jar file to
    this machine, it worked without a problem. Same jar file. Same OS
    (Windows XP). So I'm thinking that there must be some sort of
    environmental problem on the box that will not run the application.
    I've checked that my environment variables point to both the Java 3D
    libraries, and the rt.jar file on the Windows box. Does anyone else
    have any suggestions? This just shouldn't be hard, but I'm beating my
    head against the wall, here.

    Thanks in advance for any help,
    Q&A
     
    Q&Z, Apr 30, 2005
    #1
    1. Advertising

  2. Q&Z

    Steve Sobol Guest

    Q&Z wrote:

    > I've checked that my environment variables point to both the Java 3D
    > libraries, and the rt.jar file on the Windows box. Does anyone else
    > have any suggestions? This just shouldn't be hard, but I'm beating my
    > head against the wall, here.


    Aren't the Java3D libraries platform-specific? Did the port that work involve
    Java3D? http://java.sun.com/products/java-media/3D/java3d-install.html seems to
    indicate that different Java3D libraries are required for each platform.

    (And doesn't include Linux, which is odd.)

    --
    JustThe.net - Apple Valley, CA - http://JustThe.net/ - 888.480.4NET (4638)
    Steven J. Sobol, Geek In Charge / / PGP: 0xE3AE35ED

    "The wisdom of a fool won't set you free"
    --New Order, "Bizarre Love Triangle"
     
    Steve Sobol, Apr 30, 2005
    #2
    1. Advertising

  3. Q&Z

    Roland Guest

    On 30-4-2005 20:43, Steve Sobol wrote:

    > Q&Z wrote:
    >
    >> I've checked that my environment variables point to both the Java 3D
    >> libraries, and the rt.jar file on the Windows box. Does anyone else
    >> have any suggestions? This just shouldn't be hard, but I'm beating my
    >> head against the wall, here.

    >
    >
    > Aren't the Java3D libraries platform-specific? Did the port that work
    > involve Java3D?
    > http://java.sun.com/products/java-media/3D/java3d-install.html seems to
    > indicate that different Java3D libraries are required for each platform.
    >
    > (And doesn't include Linux, which is odd.)
    >

    Blackdown seems to offer an implementation for the Linux platform.
    <http://java.sun.com/products/java-media/3D/ports.html>
    --
    Regards,

    Roland de Ruiter
    ___ ___
    /__/ w_/ /__/
    / \ /_/ / \
     
    Roland, May 1, 2005
    #3
  4. Q&Z

    Q&A Guest

    I thought I'd post an answer to my question in case someone else
    encounters this problem.

    Turns out that my problem was apparently caused by my use of a "Windows"
    version of Java instead of the Sun version that I had downloaded
    earlier. Once I pointed to the correct Java version, the Linux-
    built .jar file worked just fine under Windows on my home machine, and I
    didn't have to recompile the app. Quite a relief because rebuilding on
    another platform is a bear.

    Thanks for the replies,
    Q&A
    p.s.: To the repliers:
    1. Yup. I was beginning to think, as well, that my work machine was
    simply magic and that Java 3D just simply wasn't portable between
    platforms. Fortunately, this was apparently not the case. Learned
    something new.
    2. Yes. I've been coding with the Blackdown port of Java3D with
    success. I was starting to wonder once I had this porting problem, but
    now that seems to be fixed.
    On Sat, 2005-04-30 at 18:11 +0000, Q&Z wrote:

    > I have an application that I have developed on a Linux box. When I
    > create the jarfile and attempt to execute it in Windows, I get the
    > following error:
    >
    > java.lang.NoClassDefFoundError: sun/awt/X11GraphicsDevice at
    > javax.media.j3d.GraphicsConfigTemplate3D
    >
    > X11, of course, is a reference specific to Linux. I know, however,
    > that I should be able to simply run the jar file on Windows without
    > having to first recompile the entire application. In fact, I have
    > another Windows box at work where I did just that: When I transferred
    > the jar file to this machine, it worked without a problem. Same jar
    > file. Same OS (Windows XP). So I'm thinking that there must be some
    > sort of environmental problem on the box that will not run the
    > application. I've checked that my environment variables point to both
    > the Java 3D libraries, and the rt.jar file on the Windows box. Does
    > anyone else have any suggestions? This just shouldn't be hard, but
    > I'm beating my head against the wall, here.
    >
    > Thanks in advance for any help,
    > Q&A
     
    Q&A, May 2, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Eli Bendersky
    Replies:
    1
    Views:
    1,206
    Mike Treseler
    Mar 1, 2006
  2. Arnold Peters
    Replies:
    0
    Views:
    632
    Arnold Peters
    Jan 5, 2005
  3. muttley
    Replies:
    0
    Views:
    2,791
    muttley
    Oct 20, 2005
  4. cyberco
    Replies:
    4
    Views:
    3,870
    Roedy Green
    Feb 14, 2006
  5. Arnold Peters
    Replies:
    0
    Views:
    702
    Arnold Peters
    Jan 5, 2005
Loading...

Share This Page