Board index » jbuilder » is it possible windows to linux debugging without x server running?

is it possible windows to linux debugging without x server running?


2005-05-26 10:55:06 PM
jbuilder22
Hello.
I made all as presented at 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 De{*word*81} 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.de{*word*81}.remote.server.DebugServerFrame.<init>(Unkn
own Source)
at
com.borland.jbuilder.de{*word*81}.remote.server.DebugServer.<init>(Unknown
Source)
at
com.borland.jbuilder.de{*word*81}.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 De{*word*81} 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.de{*word*81}.remote.server.DebugServerFrame.<init>(Unkn
own Source)
at
com.borland.jbuilder.de{*word*81}.remote.server.DebugServer.<init>(Unknown
Source)
at
com.borland.jbuilder.de{*word*81}.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?

Norayr wrote:
Quote
Hello.
I made all as presented at 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 De{*word*81} 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:
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
www.google.ca/advanced_group_search
Other Newsgroup Searches:
www.borland.com/newsgroups/ngsearch.html
Joi Ellis's FAQ-O-Matic:
www.visi.com/~gyles19/fom-serve/cache/1.html