web stats
Building Mirth in Netbeans Mini-HowTo? - Mirth Community

Go Back   Mirth Community > Mirth Connect > Development

Reply
 
Thread Tools Display Modes
  #1  
Old 04-06-2007, 11:34 AM
bdilworth bdilworth is offline
OBX.2 Kenobi
 
Join Date: Aug 2006
Location: Toledo, Ohio USA
Posts: 79
bdilworth
Default Building Mirth in Netbeans Mini-HowTo?

Hi All!

I've been doing a lot of playing around with Mirth and I like it a lot! I'm slowly getting the hang of things by using the available examples and modifying them to try different things. Unfortunately I find myself wanting to step through some of the code to see how various components work, or at least run Mirth in a more or less controlled way from a development GUI like Netbeans. I've seen some of the message board traffic discussing stuff like this but I haven't found enough detail on getting Mirth into Netbeans in order to successfully compile it (the client). I also realize all you folks are busy with development, etc. and apologize in advance if my questions (below) are a bit basic. Anyhoo, here goes ...

I've downloaded the 1.4.0 source tree from https://www.mirthproject.org/svn. I've used Netbeans 5.5 to do some java development so I'm generally familiar with the environment (although I've never attempted to grab and load an existing large app into the thing). If I wanted to create a new Netbeans project to examine, compile, and run the Mirth GUI (client) exactly what pieces parts of the source tree do I need? Do I need both "trunk/client" and "tags/1.40/client"? In Netbeans, do I create a General project with existing source or an Enterprise project with existing source? When asked for the source do I include both the trunk and tags, or just the trunk?

Better yet, does someone have a list of the steps required to get the Mirth GUI (or server for that matter) into Netbeans?
Any guidance or pointers in the right direction would be greatly appreciated!!!!

Thanks in advance!!!!!!

Bob D.
__________________
Bob Dilworth
University of Toledo Medical Center
Toledo, Ohio
bob.dilworth@utoledo.edu
Reply With Quote
  #2  
Old 04-06-2007, 12:06 PM
chrisl chrisl is offline
Mirth Employee
 
Join Date: Aug 2006
Posts: 967
chrisl is an unknown quantity at this point
Default Re: Building Mirth in Netbeans Mini-HowTo?

Bob,

One of the engineers on the client will reply back shortly, but just to steer you in the right direction:

1. You will just need trunk/client
2. You will also need mirth-client-core.jar from the distribution. Add this to your project classpath
3. You will create a general project with existing source and include just the trunk.

Hope this helps!
-Chris
__________________
Chris Lang
Reply With Quote
  #3  
Old 04-06-2007, 12:54 PM
brendanh brendanh is offline
Mirth Employee
 
Join Date: Aug 2006
Posts: 191
brendanh
Default Re: Building Mirth in Netbeans Mini-HowTo?

Bob,

1. Make 2 new Java projects in Netbeans. Let's call the first one Client and the second one Server.
2. Check out the trunk from the SVN repository for the client into the base directory for the Client project.
3. Check out the trunk from the SVN repository for the server into the base directory for the Server project.
4. Modify build.bat int he Server directory so that it corresponds to your folders.
5. Run build.bat
6. Now open your Client project in Netbeans. Add all the .jar files in the lib directory of the Client folder to the libraries for that project.
7. You should now be able to build the client.
8. To build the server, follow the same steps for adding the files from the lib directory to the projects libraries.

I only use Netbeans to make modifications to form components in the Client. Other than that, I would recommend using Eclipse as its debugging features are muchhhhhh better.

-Brendan
__________________
Brendan Haverlock | Mirth Software Engineer | Mirth Corporation
Reply With Quote
  #4  
Old 04-06-2007, 01:13 PM
bdilworth bdilworth is offline
OBX.2 Kenobi
 
Join Date: Aug 2006
Location: Toledo, Ohio USA
Posts: 79
bdilworth
Default Re: Building Mirth in Netbeans Mini-HowTo?

Cool! Thanks so much for the info. I'll give it a shot & see what happens.

Bob D.
__________________
Bob Dilworth
University of Toledo Medical Center
Toledo, Ohio
bob.dilworth@utoledo.edu
Reply With Quote
  #5  
Old 04-10-2007, 07:33 AM
bdilworth bdilworth is offline
OBX.2 Kenobi
 
Join Date: Aug 2006
Location: Toledo, Ohio USA
Posts: 79
bdilworth
Default Re: Building Mirth in Netbeans Mini-HowTo?

Hi Again!

I'm having trouble building Mirth from the svn acquired source. Here's what's happening ...

1. I downloaded https://www.mirthproject.org/svn/trunk/client to c:\mirthclient

2. I downloaded https://www.mirthproject.org/svn/trunk/server to c:\mirthserver

3. I modified c:\mirthserver\build.bat-template to:
set SERVER_PATH="c:\mirthserver"
set CLIENT_PATH="c:\mirthclient"
set VERSION=1.4.0
cd %SERVER_PATH%
call ant create-client-core
copy %SERVER_PATH%\mirth-client-core.jar %CLIENT_PATH%\lib\
cd %CLIENT_PATH%
call ant -buildfile ant-build.xml create-client
copy %CLIENT_PATH%\dist\mirth-client.jar %SERVER_PATH%\webapp\lib\
copy %SERVER_PATH%\mirth-client-core.jar %SERVER_PATH%\webapp\lib\
copy %CLIENT_PATH%\lib\*.jar %SERVER_PATH%\webapp\lib\
cd %SERVER_PATH%
call ant create-setup -Dversion=%VERSION%
pause

4. I'm using javac for Java jdk1.5.0_06. The compiler is in my PATH. When I run build.bat I receive hundreds of java compiler errors. Here's a representative sample (not all inclusive):

C:\mirthserver>set SERVER_PATH="c:\mirthserver"

C:\mirthserver>set CLIENT_PATH="c:\mirthclient"

C:\mirthserver>set VERSION=1.4.0

C:\mirthserver>cd "c:\mirthserver"

C:\mirthserver>call ant create-client-core
Buildfile: build.xml

init:
[echo] Version: ${version}

clean:
[delete] Deleting directory C:\mirthserver\logs
[mkdir] Created dir: C:\mirthserver\logs
[delete] Deleting directory C:\mirthserver\classes

compile:
[mkdir] Created dir: C:\mirthserver\classes
[javac] Compiling 340 source files to C:\mirthserver\classes
[javac] C:\mirthserver\src\com\webreach\mirth\client\core\ Client.java:135: <identifier> expected
[javac] public synchronized List<Channel> getChannel(Channel channel) throws ClientException {
[javac] ^
[javac] C:\mirthserver\src\com\webreach\mirth\client\core\ Client.java:528: ';' expected
[javac] }
[javac] ^
[javac] C:\mirthserver\src\com\webreach\mirth\client\core\ Error.java:92: '(' or '[' expected
[javac] List<NameValuePair> list = new ArrayList<NameValuePair>();
[javac] ^
[javac] C:\mirthserver\src\com\webreach\mirth\client\core\ MessageListHandler.java:80: <identifier> expected
[javac] public List<MessageObject> getAllPages() throws ListHandlerException {
[javac] ^
[javac] C:\mirthserver\src\com\webreach\mirth\client\core\ MessageListHandler.java:128: ';' expected
[javac] }
[javac] ^
[javac] C:\mirthserver\src\com\webreach\mirth\model\Alert. java:14: <identifier> expected
[javac] private List<String> channels;
[javac] ^
[javac] C:\mirthserver\src\com\webreach\mirth\model\Alert. java:15: <identifier> expected
[javac] private List<String> emails;

...

[javac] C:\mirthserver\src\com\webreach\mirth\model\x12\Co mpositeType.java:47: illegal character: \64
[javac] @XmlAccessorType(XmlAccessType.FIELD)
[javac] ^
[javac] C:\mirthserver\src\com\webreach\mirth\model\x12\Co mpositeType.java:48: illegal character: \64
[javac] @XmlType(name = "CompositeType", propOrder = {
[javac] ^
[javac] C:\mirthserver\src\com\webreach\mirth\model\x12\Co mpositeType.java:58: illegal character: \64
[javac] @XmlElement(name = "data_ele", required = true)
[javac] ^
[javac] C:\mirthserver\src\com\webreach\mirth\model\x12\Co mpositeType.java:59: illegal character: \64
[javac] @XmlJavaTypeAdapter(NormalizedStringAdapter.class)
[javac] ^
[javac] C:\mirthserver\src\com\webreach\mirth\model\x12\Co mpositeType.java:59: <identifier> expected
[javac] @XmlJavaTypeAdapter(NormalizedStringAdapter.class)
[javac] ^
[javac] C:\mirthserver\src\com\webreach\mirth\model\x12\Co mpositeType.java:59: <identifier> expected
[javac] @XmlJavaTypeAdapter(NormalizedStringAdapter.class)

...

I seem to be missing a component or missing some step in the process. Any thoughts would be greatly appreciated!

Bob D.
__________________
Bob Dilworth
University of Toledo Medical Center
Toledo, Ohio
bob.dilworth@utoledo.edu
Reply With Quote
  #6  
Old 04-10-2007, 09:47 AM
albertosaez albertosaez is offline
 
Join Date: Sep 2006
Location: Valladolid, Spain
Posts: 842
albertosaez is an unknown quantity at this point
Default Re: Building Mirth in Netbeans Mini-HowTo?

Are you sure you're usging javac 1.5 ?

What version of ant are you using ?
Reply With Quote
  #7  
Old 04-10-2007, 12:02 PM
bdilworth bdilworth is offline
OBX.2 Kenobi
 
Join Date: Aug 2006
Location: Toledo, Ohio USA
Posts: 79
bdilworth
Default Re: Building Mirth in Netbeans Mini-HowTo?

Double checking I find that I'm using javac under jdk 1.5.0_06 and ant version 1.6.5. To obtain this info I put a "javac -version" and an "ant -version" at the top of build.bat followed by a pause, then ran build.

Bob D.
__________________
Bob Dilworth
University of Toledo Medical Center
Toledo, Ohio
bob.dilworth@utoledo.edu
Reply With Quote
  #8  
Old 04-10-2007, 02:07 PM
brendanh brendanh is offline
Mirth Employee
 
Join Date: Aug 2006
Posts: 191
brendanh
Default Re: Building Mirth in Netbeans Mini-HowTo?

Those errors are strange because it seems to have a problem with every line where a generic is being used, which would normally signify that you aren't using JDK 1.5.
__________________
Brendan Haverlock | Mirth Software Engineer | Mirth Corporation
Reply With Quote
  #9  
Old 04-11-2007, 05:08 AM
jbartels jbartels is offline
Mirth Guru
 
Join Date: Oct 2006
Posts: 727
jbartels is on a distinguished road
Default Re: Building Mirth in Netbeans Mini-HowTo?

Is it possible that he has an old JDK kicking around on his system that is conflicting? Maybe a PATH variable that isn't set?
__________________
Jon Bartels

Zen is hiring!!!!
http://consultzen.com/careers/
Talented healthcare IT professionals wanted. Engineers to sales to management.
Good benefits, great working environment, genuinely interesting work.
Reply With Quote
  #10  
Old 04-11-2007, 05:27 AM
bdilworth bdilworth is offline
OBX.2 Kenobi
 
Join Date: Aug 2006
Location: Toledo, Ohio USA
Posts: 79
bdilworth
Default Re: Building Mirth in Netbeans Mini-HowTo?

Here's my PATH:

H:\>echo %PATH%
C:\Perl\bin\;C:\WINDOWS\system32;C:\WINDOWS;C:\WIN DOWS\System32\Wbem;C:\WINDOWS\
system32\nls;C:\WINDOWS\system32\nls\english;C:\Pr ogram Files\Symantec\pcAnywher
e\;C:\eGate\client\bin;C:\Program Files\MySQL\MySQL Server 4.1\bin;C:\Program Fi
les\Common Files\GTK\2.0\bin;C:\Program Files\QuickTime\QTSystem\;C:\Sun\AppServ
er\bin;C:\Program Files\SSH Communications Security\SSH Secure Shell;C:\Program
Files\TextPad 4;C:\apache-ant-1.6.5\bin;C:\Program Files\Java\jdk1.5.0_06\bin;C:
\Sun\AppServer\bin;C:\maven-2.0.4\bin;W:.;X:.;Y:.

I do indeed have a couple of older JDKs on the system but shouldn't the above PATH point to jdk1.5.0_06?
__________________
Bob Dilworth
University of Toledo Medical Center
Toledo, Ohio
bob.dilworth@utoledo.edu
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
howto unpack/repack Mirth quimicefa Development 1 03-10-2008 10:39 AM
Building Mirth 1.6.1 djfmirth Development 2 01-23-2008 03:00 AM
Issues with building Mirth in Netbeans/Eclipse TheFrequency Development 5 11-25-2007 09:04 PM
mirth 1.5 howto thinhvn Support 0 06-09-2007 02:09 PM
For those of you building Mirth... brendanh Development 1 11-22-2006 01:03 PM


All times are GMT -8. The time now is 01:43 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Mirth Corporation