-3

I am totally new to Ubuntu and Java altogether. I managed to install JDK 1.6 using the terminal. I am even able to run a simple HelloWorld. My problem is whenever I try to install the java_ee Im having an error:

java.lang.UnsatisfiedLinkError: no Terminal in java.library.path
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1681)
    at java.lang.Runtime.loadLibrary0(Runtime.java:840)
    at java.lang.System.loadLibrary(System.java:1047)
    at charva.awt.Toolkit.<clinit>(Toolkit.java:895)
    at charva.awt.Window.init(Window.java:62)
    at charva.awt.Window.<init>(Window.java:58)
    at charva.awt.Frame.<init>(Frame.java:32)
    at charvax.swing.JFrame.<init>(JFrame.java:34)
    at charvax.swing.JFrame.<init>(JFrame.java:30)
    at org.openinstaller.util.ui.ChaxStandaloneSplash.<init>(ChaxStandaloneSplash.java:91)
    at org.openinstaller.core.Orchestrator.main(Orchestrator.java:428)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    at org.openinstaller.core.EngineBootstrap.main(EngineBootstrap.java:208)
SEVERE INTERNAL ERROR: no Terminal in java.library.path

Honestly I don't have enough idea about what I am doing. Please help me with this. Thanks in advance.

  • What exactly did you do to try to install jee that resulted in this backtrace? – bmargulies Sep 20 '11 at 10:17
  • I downloaded Java EE in .sh format then converted it into an exe using sudo chmod +x java_ee.sh and run it in the terminal then I have the error. – Idiotic Moron Sep 20 '11 at 10:21
  • What version of jee? Downloaded from where? – bmargulies Sep 20 '11 at 10:39
  • Apparently their installer is defective. – bmargulies Sep 20 '11 at 13:30
  • @bmargulies I can't find any reference to that anywhere... – Xavi López Sep 20 '11 at 15:14
  • Why have all answers to this question been downvoted? Every answer contributes in some way. – Xavi López Sep 20 '11 at 16:25
  • All of them are trying to debug the package that comes from Oracle. That's beside the point. The OP didn't make it, and he's not going to fix it, and it's unlikely that he's going to succeed in working around it. – bmargulies Sep 20 '11 at 22:47
  • @bmargulies None of the answers is telling the OP to debug the package. They're stating that he's missing a required library, or telling him that he does only need the jar for development. He's been given pointers on how to check if he really has the library, and even on how to build it. The fact that he's not going to/can't do it, doesn't make the answers unhelpful or misleading. We can't get into his computer to fix it. – Xavi López Sep 21 '11 at 08:02
  • It's misleading to tell him that "He's missing a library." The installer is failing to find a library. it is exceedingly unlikely that the installer was written to assume that he has it. In any case, if you don't like my downvotes, you can upvote and swamp the effect. Chacun a son gout. – bmargulies Sep 22 '11 at 02:15
  • I've been able to install the [Java EE 6 shell installer](http://download.oracle.com/otn-pub/java/java_ee_sdk/6u3/java_ee_sdk-6u3-unix.sh) on a fresh Ubuntu 11.04 with JDK1.6, so the package _is not_ defective. – Xavi López Oct 14 '11 at 13:22

5 Answers5

2

That stacktrace shows the error is happening on charva classes. charva requires a library called Terminal.

From charva's site:

For permanent installation, you just need to ensure that the directory containing 
the libTerminal.so library file is included in your library search path, which is
specified as follows:
· On Linux and Solaris it is specified by the environment variable LD_LIBRARY_PATH

So, find out if you have libTerminal.so, and if it is in fact specified by LD_LIBRARY_PATH.

Just to add, here is the source code that's making this fail.

    static {
        // ...
        System.loadLibrary("Terminal");
        Toolkit.init();     // call native function to initalize ncurses.
    }

It might also help to take a look at this related question: Exception in thread “main” java.lang.UnsatisfiedLinkError: no Terminal in java.library.path

UPDATE If you don't have libTerminal.so, take a look at charva's site, and follow charva's installation instructions. There's a step in which you build libTerminal.so.

Community
  • 1
  • 1
Xavi López
  • 27,550
  • 11
  • 97
  • 161
1

Looks like Java needs a native library called Terminal to run. This looks like a wrong library path.

If you get a runtime error "java.lang.UnsatisfiedLinkError: no xxx in java.library.path", which means that JRE cannot find your native library at runtime. The easier way to debug is to print out the contents of "java.library.path" via System.out.println(System.getProperty("java.library.path")). You could set the native library path via the command-line VM option -Djava.library.path=xxx.

peko
  • 11,267
  • 4
  • 33
  • 48
1

I just ran into this same problem. Issue seems to be that Glassfish installer is not finding the correct JAVA_HOME location. You can set this manually in the installer with a -j flag (the installer script passes this to the glassfish installer).

Running the following allowed the glassfish installer to run successfully for me. You can run 'which java' to get an idea for where java is installed on your machine.

sh ./java_ee_sdk-6u3-jdk7-linux-x64.sh -j [java install directory]

(where [java install directory] is the path to your java install).

Jeremy
  • 11
  • 1
0

The excetion is raised because the default JVM isn't SUN or ORACLE, maybe OPENJDK, Jrockit, etc. For check this, execute echo $JAVA_HOME or java -version and check if the jvm set as default is from ORACLE or SUN. If not, execute: sudo update-alternatives --config java and select the correct one. If you haven't a SUN or ORACLE JRE installed, first install one.

Waldir Leoncio
  • 10,853
  • 19
  • 77
  • 107
Sibar
  • 1
0

You ran it in tty or a virtual terminal under X-window? Why you need to "install" java EE? Usually the jar file is enough for development.

Kent
  • 189,393
  • 32
  • 233
  • 301
  • I need Java EE for enterprise web app development. – Idiotic Moron Sep 20 '11 at 10:34
  • @Kent I agree with you wrt the jar file is enough for development, but can't see what the error might have to do with running on a tty or X-Window. By the way, the massive downvoting hasn't been mine :) – Xavi López Sep 20 '11 at 10:50
  • I glance at the exception stack trace, saw Highlighted "Terminal", "Swing", thought it might be the reason to start a swing application under tty... :( should read it more carefully. – Kent Sep 20 '11 at 11:33