Execute java swing programs

Help with setting up and configuring custom user tools in UltraEdit (based on command line input)

Execute java swing programs

Postby freestyle » Sun Aug 08, 2004 2:35 pm

Hi,

Does anyone know how to execute a java Swing program from within ultraedit?

I'd like to be able to click the tool icon and have the current Swing program be executed and the window be displayed.

I've configured a tool to do this, and I checked the "Windows Program" box, but when I execute the tool, the dos window opens for a brief second but the java window from my program never displays.

I think the problem has something to do with the dos window closing so quickly - because I am able to do this with... dare I say! ... Textpad... and there the dos window does stay open while the java window is open. Once I close the dos window, the java window closes.

So... if there's a way to tell UE to keep the dos window open, maybe that would work.

Thanks in advance for your suggestions,
Josh
User avatar
freestyle
Newbie
 
Posts: 3
Joined: Sat Aug 07, 2004 11:00 pm

Re: Execute java swing programs

Postby DanKirkd » Mon Aug 09, 2004 1:13 pm

What do you currently have your tool command set to?

Dan
User avatar
DanKirkd
Basic User
Basic User
 
Posts: 39
Joined: Wed Jul 14, 2004 11:00 pm

Re: Execute java swing programs

Postby freestyle » Mon Aug 09, 2004 11:16 pm

Dan,

I currently have it configured as:
command line - java "%f"
working directory - blank
windows program - checked
output to list box radio button - selected
show dos box - checked
capture output - checked

I've tried various combinations of the radion buttons and checkboxes.

btw - I'm using version 9.00b

Thanks,
Josh
User avatar
freestyle
Newbie
 
Posts: 3
Joined: Sat Aug 07, 2004 11:00 pm

Re: Execute java swing programs

Postby DanKirkd » Tue Aug 10, 2004 3:36 pm

Assuming that the compiled classfile is in the same location and the source file...

Try this:

Command Line: java "%n"
Working Directory: %p
Only options checked: Output to List Box, Capture Output

The key is setting the Working Directory to the path of the code. This is a little odd, but it does work. Keep in mind you likely wouldn't be editing the .class file, and you want to have something like "java MyApp", not "java MyApp.java".

HTH,

Dan
User avatar
DanKirkd
Basic User
Basic User
 
Posts: 39
Joined: Wed Jul 14, 2004 11:00 pm

Re: Execute java swing programs

Postby freestyle » Wed Aug 11, 2004 10:50 pm

Dan,

Hey that's great - it works! Thanks for your help. Now I can come back from the dark side (ie, Textpad...).

btw - judging from your resume you have quite a bit of java experience... which ide do you prefer? I'm new to java so looking to see what people use and why. I've been using netbeans, but I'm finding that editing slows rapidly as the file size grows.

Josh
User avatar
freestyle
Newbie
 
Posts: 3
Joined: Sat Aug 07, 2004 11:00 pm

Re: Execute java swing programs

Postby DanKirkd » Wed Aug 11, 2004 11:02 pm

Glad that helped.

I actually worked with UltraEdit as my primary development tool for a while. This year I've been using Eclipse, or WebSphere Studio (based on Eclipse) most of the time, although I still use UltraEdit for a lot of things the editors in those tools can't help me with. I wish IDM would develop a plug-in for Eclipse for UltraEdit. Maybe if enough people ask them to they will.

I've never liked the look and feel of NetBeans. IntelliJ is another very nice IDE, especially for refactoring, but it isn't free. Supposedly Sun's Creator (ex-Project Rave) is also supposed to be good, but I've not played with it.

Cheers,

Dan
User avatar
DanKirkd
Basic User
Basic User
 
Posts: 39
Joined: Wed Jul 14, 2004 11:00 pm


Return to Custom User Tools/Tool Configuration