🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.os.linux.programacion
Article #8720

Re: lanzar un .jar

#8720
From: Antonio
Date: Sun, 20 Oct 2002 11:43
101 lines
5430 bytes
Luis Angel Fdez. Fdez. wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> A las 17:09 del s�bado 19 de octubre,
> NotFound <correo@tengo.no>
> hablando de Re: lanzar un .jar
> en es.comp.os.linux.programacion dijo...
> 
>   Hola
> 
>> Antonio escribi�:
>> 
>>> Hola a todos estoy intentando lanzar un archivo ya compilado en java,
>>> con extenxion .jar. El runtime que uso es j2re1.4.1, y cuando lo lanzo
>>> me salen las siguientes lineas de error:
>>> 
>>> micasa:/usr/java/j2re1.4.1/bin# ./java -jar xxe_app.jar
>>> Xlib: connection to ":0.0" refused by server
>>> Xlib: Client is not authorized to connect to Server
>> 
>> Pues o que est�s lanzando un programa gr�fico desde modo texto, o algo
>> parecido.
> 
>   Mas bien parece que est� lanzando el programa como root (eso es obvio
>   por
> el prompt, lo se :)) estando en sesi�n como otro usuario distinto.
>   
>   Puede arreglarse haciendo como el usuario que tiene iniciada la sesi�n X
> algo como: xhost + nombreDelHost Y tambi�n habr�a que exportar el display
> desde el shell del root antes de ejecutar el programa java, usease, export
> DISPLAY=nombreDelHost:0.0
> 
>   Se dice que lo del xhost + nombreDelHost es inseguro (aunque menos que
>   un
> xhost +), �hay alguna otra forma de poder hacerlo?
> 
>   Espero que sirva de algo :). Ta llueu.
> 
> - --
>   Linux 2.4.19 - AMD Athlon - Linux User #99754
>       Clave GPG: http://muxin.yi.org/~koxo/
>   MSN: koxo@hotmail.com   Yahoo! Messenger: laffdez
>   ICQ: 5881541    AOL: khoxo    IRC (hispano): KoXo
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.7 (GNU/Linux)
> 
> iD8DBQE9scANsrzbHhG/hp8RAuAIAKDGk8JioVQ5GFFGQEJ0kq+ds9RtxgCfYdZ6
> itWsI2CMB67YFLRt3chqrRI=
> =3/NK
> -----END PGP SIGNATURE-----

He hecho lo que me habeis comentado y me sale esto:
micasa:/usr/java/j2re1.4.1/bin# ./java -jar xxe_app.jar
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native 
Method)
        at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
        at com.xmlmind.xmleditapp.app.Start.main(Start.java:104)
Caused by: java.lang.UnsatisfiedLinkError: 
/usr/java/j2re1.4.1/lib/i386/libfontmanager.so: libstdc++-libc6.1-1.so.2: 
cannot open shared object file: No such file or directory
        at java.lang.ClassLoader$NativeLibrary.load(Native Method)
        at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1473)
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1389)
        at java.lang.Runtime.loadLibrary0(Runtime.java:788)
        at java.lang.System.loadLibrary(System.java:832)
        at 
sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:50)
        at java.security.AccessController.doPrivileged(Native Method)
        at 
sun.awt.font.NativeFontWrapper.<clinit>(NativeFontWrapper.java:42)
        at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
        at 
sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:125)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:140)
        at 
java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:62)
        at sun.awt.motif.MToolkit.<clinit>(MToolkit.java:72)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:140)
        at java.awt.Toolkit$2.run(Toolkit.java:712)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:703)
        at com.xmlmind.xmledit.awtutil.AWTUtil.<clinit>(AWTUtil.java:16)
        at 
com.xmlmind.xmledit.view.DocumentView.<clinit>(DocumentView.java:93)
        at com.xmlmind.xmleditapp.app.App.registerAllActions(App.java:484)
        at com.xmlmind.xmleditapp.app.App.<init>(App.java:250)
        ... 5 more
internal error: cannot create application: 
java.lang.reflect.InvocationTargetException

Yo no me da el error de la libreria Xlib pero me siguen apareciendo errores,
�puede que sea por la version del runtime?
Technical Details
Message-ID: <aou427$hjh$1@news.wanadoo.es>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!opentransit.net!newsfeed.comtenidos.com!newsfeeder.wanadoo.es!not-for-mail
References: <aorh53$gji$1@reader2.wnet> <3DB191D1.7513DAF4@tengo.no> <slrnar3g0a.g0r.koxo@muxin.koxo.net>

Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII
X-Google-Thread: f86c8,95012702bf7b4e1e
X-Google-Attributes: gidf86c8,public
X-Google-ArrivalTime: 2002-10-20 04:43:00 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!opentransit.net!newsfeed.comtenidos.com!newsfeeder.wanadoo.es!not-for-mail
From: Antonio <aperlu@obelix.umh.es>
Newsgroups: es.comp.os.linux.programacion
Subject: Re: lanzar un .jar
Date: Sun, 20 Oct 2002 13:43:37 +0200
Organization: Wanadoo
Lines: 102
Message-ID: <aou427$hjh$1@news.wanadoo.es>
References: <aorh53$gji$1@reader2.wnet> <3DB191D1.7513DAF4@tengo.no> <slrnar3g0a.g0r.koxo@muxin.koxo.net>
NNTP-Posting-Host: 80.103.114.127
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8Bit
X-Trace: news.wanadoo.es 1035113352 18033 80.103.114.127 (20 Oct 2002 11:29:12 GMT)
X-Complaints-To: usenet@wanadoo.es
NNTP-Posting-Date: Sun, 20 Oct 2002 11:29:12 +0000 (UTC)
User-Agent: KNode/0.6.1