(Answer) (Category) FAQ-O-Matic : (Category) General : (Category) IDE/Editor :
I want to launch my app in its own console window, just like JBuilder2 used to do it.

Here's a Bash script for Linux. (Solaris can use /bin/sh, I think.)

#! /bin/bash
# launchInConsole
# echo "Command: $*" | xmessage -file -
if [ "X$*" = "X" ]; then
  xterm 
else
  echo "#!/bin/bash" >/tmp/crap.sh
  echo "$*" >>/tmp/crap.sh
  echo "sleep 60" >>/tmp/crap.sh
  chmod +x /tmp/crap.sh
  xterm -e /tmp/crap.sh 
fi

These lines are in my /home/joi/.jbuilder4/tools.conf file.

Launch in Console
/home/joi/bin/launchInConsole
($JDKPath)java -classpath ($Classpath) ($FileClass) ($Prompt)


Note the extra blank line at the end of the definition!

For Windows NT 4, here is a tested translation of the above:

@echo off
rem This is file launch.bat
if "%1"=="" goto nocommand

echo cd %1 >c:\jblaunch.bat
echo %2 %3 %4 %5 %6 %7 %8 %9 >>c:\jblaunch.bat
echo echo Done.  Press enter to close this window. >>c:\jblaunch.bat
echo pause >>c:\jblaunch.bat
echo exit >>c:\jblaunch.bat
start "Launch" /D%1 /HIGH /MAX /WAIT c:\jblaunch.bat
echo I think I started it:  c:\jblaunch.bat
goto end

:nocommand
echo Hey!  This needs the following lines appended to your tools.config file. 
echo Launch
echo C:\\WINNT\\Profiles\\joi\\launch.bat
echo ($ProjectDir) ($JDKPath)java -classpath "($Classpath)" ($FileClass) ($Prompt)
echo (blank line here)

:end

The tools.config entry for this version is:

Launch
C:\\WINNT\\Profiles\\joi\\launch.bat
($ProjectDir)  ($JDKPath)java  -classpath  "($Classpath)"  ($FileClass)   ($Prompt)


2001-May-03 4:52pm gyles19@visi.com
[Append to This Answer]
2001-May-03 4:52pm
Previous: (Answer) How to add Pluggable Look and Feels (PLAFs) to JBuilder 4
Next: (Answer) I need to adjust my CLASSPATH but I can't find an project setting for it.
This document is: http://www.visi.com/~gyles19/cgi-bin/fom.cgi?file=146
[Search] [Appearance]
This is a Faq-O-Matic 2.709.
This FAQ administered by gyles19@visi.com.

Other JBuilder Links

Java Community
Java Tools
Code Central
JB OpenTools
Community
Recent
Threads
Borland Chat
Chat FAQ
Feature Matrices
3.0 |  3.5 |  4.0
5.0 |  6.0 |  7.0
Shop for
JBuilder
JBuilder
Downloads
and reg keys
Report Piracy
Online Manuals
4.0 |  5.0 |  6.0
7.0
Borland
DevSupport's
Bug/RFE Form

Quality Central Client
JB Patches &
Updates
JBuilder FAQs TIs
JBuilder
Newsgroups
Tamaracka's
News Archive
Mr. Haki's
JBuilder Machine
JGuru's
JBuilder FAQ
Sun's Bug
Parade
Netring Home - About - Privacy
The
JBuilder Netring Logo
The Borland JBuilder Netring by JBuilder FAQ-O-Matic
[ Join Now | List Sites | Random | << Prev | Next >> ]
[ Previous 5 Sites | Skip Previous | Skip Next | Next 5 Sites ]