🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.jbuilder.debugger
2 messages
2 total messages Started by Norayr Thu, 26 May 2005 14:55
is it possible windows to linux debugging without x server running?
#226
Author: Norayr
Date: Thu, 26 May 2005 14:55
181 lines
6282 bytes
Hello.
I made all as presented at http://info.borland.com/techpubs/jbuilder/jbuilder2005/bajb/distdebugging.html in case of  "Launching and debugging a program on a remote computer."
So I had run server on a linux machine but it's crashed with errors

Builder X Remote Debugger Server
Copyright (c) 1996-2003 Borland Software Corporation. All rights
reserved.

Exception in thread "main" java.lang.InternalError: Can't connect to X11
window server using ':0.0' as the value of the DISPLAY variable.
at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
at
sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:134)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:141)
at
java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnviron
ment.java:62)
at java.awt.Window.init(Window.java:231)
at java.awt.Window.<init>(Window.java:275)
at java.awt.Frame.<init>(Frame.java:401)
at java.awt.Frame.<init>(Frame.java:366)
at javax.swing.JFrame.<init>(JFrame.java:154)
at
com.borland.jbuilder.debugger.remote.server.DebugServerFrame.<init>(Unkn
own Source)
at
com.borland.jbuilder.debugger.remote.server.DebugServer.<init>(Unknown
Source)
at
com.borland.jbuilder.debugger.remote.server.DebugServer.main(Unknown
Source)

Then I set 'set -o xtrace' in debugserver script had output:

/usr/local/java/remote_debug # ./run.sh
+ serverjar=/usr/local/java/remote_debug/debugserver.jar
+ launcher=/usr/local/java/jre/bin/java
+ alt_launcher=/usr/local/java/bin/java
+ sparcdebugpath=/usr/local/java/lib/sparc
+ i386debugpath=/usr/local/java/lib/i386
+ pa_riscdebugpath=/usr/local/java/jre/lib/PA_RISC
+ test '!' -f /usr/local/java/remote_debug/debugserver.jar
+ test '!' -f /usr/local/java/jre/bin/java
+ test -f /usr/local/java/lib/sparc/libjdwp.so
+ test -f /usr/local/java/lib/i386/libjdwp.so
+ test -f /usr/local/java/jre/lib/PA_RISC/libjdwp.sl
+ echo '/usr/local/java/jre/bin/java -Xverify:none -jar
/usr/local/java/remote_debug/debugserver.jar -port=12345 -timeout=20000
'
/usr/local/java/jre/bin/java -Xverify:none -jar
/usr/local/java/remote_debug/debugserver.jar -port=12345 -timeout=20000
+ /usr/local/java/jre/bin/java -Xverify:none -jar
/usr/local/java/remote_debug/debugserver.jar -port=12345 -timeout=20000

JBuilder X Remote Debugger Server
Copyright (c) 1996-2003 Borland Software Corporation. All rights
reserved.

Exception in thread "main" java.lang.InternalError: Can't connect to X11
window server using ':0.0' as the value of the DISPLAY variable.
at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
at
sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:134)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:141)
at
java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnviron
ment.java:62)
at java.awt.Window.init(Window.java:231)
at java.awt.Window.<init>(Window.java:275)
at java.awt.Frame.<init>(Frame.java:401)
at java.awt.Frame.<init>(Frame.java:366)
at javax.swing.JFrame.<init>(JFrame.java:154)
at
com.borland.jbuilder.debugger.remote.server.DebugServerFrame.<init>(Unkn
own Source)
at
com.borland.jbuilder.debugger.remote.server.DebugServer.<init>(Unknown
Source)
at
com.borland.jbuilder.debugger.remote.server.DebugServer.main(Unknown
Source)

Debugserver shell script is :

#!/bin/sh
#
# "DebugServer (debugserver.jar_dir) (jdk_home_dir)
# [-port (port_number)] [-timeout (milliseconds)] "
#
case $# in
0 | 1 )
echo ""
echo ""
echo "usage: DebugServer (debugserver.jar_dir) (jdk_home_dir) "
echo " [-port (port_number)] [-timeout (milliseconds)] "
echo ""
echo " 1. debugserver.jar_dir -- required. This the dir where this
file "
echo " is located. "
echo ""
echo " 2. jdk_home_dir -- required. This is the home dir of your java
jdk. "
echo " (example: /usr/jdk1.3) "
echo ""
echo " 3. -port (port number) -- optional. By default, port 18699 is
used. "
echo ""
echo " 4. -timeout (milliseconds) -- optional. By default, timeout it
set "
echo " to 60000 milliseconds. "
echo ""
exit
;;
esac

#
serverjar="${1}/debugserver.jar" 1>&2
launcher="${2}/jre/bin/java" 1>&2
alt_launcher="${2}/bin/java" 1>&2

sparcdebugpath="${2}/lib/sparc" 1>&2
i386debugpath="${2}/lib/i386" 1>&2
pa_riscdebugpath="${2}/jre/lib/PA_RISC" 1>&2
#

if test ! -f $serverjar
then
echo "$serverjar doesn't exist"
exit 1
fi

if test ! -f $launcher
then
if test ! -f $alt_launcher
then
echo "$launcher doesn't exist"
exit 1
else
launcher=$alt_launcher
fi
fi

if test -f ${sparcdebugpath}/libjdwp.so
then
LD_LIBRARY_PATH=$sparcdebugpath:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
else
if test -f ${i386debugpath}/libjdwp.so
then
LD_LIBRARY_PATH=$i386debugpath:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
else
if test -f ${pa_riscdebugpath}/libjdwp.sl
then
LD_LIBRARY_PATH=$pa_riscdebugpath:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
fi
fi
fi


case "$#" in
2)
echo "$launcher -Xverify:none -jar $serverjar "
$launcher -Xverify:none -jar $serverjar
exit
;;
3|4)
echo "$launcher -Xverify:none -jar $serverjar $3=$4 "
$launcher -Xverify:none -jar $serverjar $3=$4
exit
;;
5|6)
echo "$launcher -Xverify:none -jar $serverjar $3=$4 $5=$6 "
$launcher -Xverify:none -jar $serverjar $3=$4 $5=$6
exit
;;
esac
Re: is it possible windows to linux debugging without x server running?
#227
Author: Lori M Olson [TeamB]
Date: Thu, 26 May 2005 15:41
38 lines
2391 bytes
Norayr wrote:
> Hello.
> I made all as presented at http://info.borland.com/techpubs/jbuilder/jbuilder2005/bajb/distdebugging.html in case of  "Launching and debugging a program on a remote computer."
> So I had run server on a linux machine but it's crashed with errors
> 
> Builder X Remote Debugger Server
> Copyright (c) 1996-2003 Borland Software Corporation. All rights
> reserved.
> 
> Exception in thread "main" java.lang.InternalError: Can't connect to X11
> window server using ':0.0' as the value of the DISPLAY variable.
> at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
> at

I'm not convinced that your issue is having an X server running.  Most 
machines have the frame buffer server available just for this case.  The 
FAQ-o-matic has this answer that might be relevant:

http://www.visi.com/~gyles19/cgi-bin/fom.cgi?_recurse=1#file_288

-- 

Regards,

Lori Olson [TeamB]

------------

Save yourself, and everyone else, some time and search the
newsgroups and the FAQ-O-Matic before posting your next
question.

Google Advanced Newsgroup Search
     http://www.google.ca/advanced_group_search
Other Newsgroup Searches:
     http://www.borland.com/newsgroups/ngsearch.html
Joi Ellis's FAQ-O-Matic:
     http://www.visi.com/~gyles19/fom-serve/cache/1.html
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads