I received a request to post more specific instructions
for running jBoss in JBuilder's debugger, so here goes.
Note that I'm using jBoss 2.0, Win 98, and JBuilder
Foundation 3.5.  These are very rough.  If anyone spots
something that is missing, wrong, or unnecessary, point
it out.

With each of these, replace <JBOSS-HOME> with the location of
your jboss directory, for example, C:\jboss2.

1. Launch JBuilder.

2. Go to Project|Properties, click the Paths tab, and make sure
   you're using JDK 1.3 as your JDK.  To have 1.3 available, you
   may need to add it or change your default JDK.  First install
   JDK 1.3 (from Sun) on your PC, then point JBuilder to it by
   clicking "new" or "edit" in the Select a JDK dialog.

3. On the Paths tab, go to the Required Libraries tab, click "add"
   and then "new" to create a new one, and call it "jBoss Server"
   (or something similar).  Add the following .jar files and
   directories:

     <JBOSS-HOME>/bin/run.jar
     <JBOSS-HOME>/lib/jmxri.jar
     <JBOSS-HOME>/lib/*.jar
     <JBOSS-HOME>/conf
     <JBOSS-HOME>/bin

4. Click OK on the Edit library dialog, then OK on the Select one
   or more libraries dialog, which should add the new library to
   your project.  The library will now be available to other projects
   as well.

5. Go to the Run tab of the Project Properties dialog.  On the
   Application tab, set the main class to org.jboss.Main.  Note
   that this is project-specific and will need to be done for each
   project running jBoss.

6. While on the Run tab, enter this in the VM Parameters field:
   -Duser.dir=<JBOSS-HOME>\bin.  Again, this is project-specific,
   so make sure you have your jBoss project active.

7. Click OK and close JBuilder.

8. Create a copy of your JBuilder shortcut (in Win98, it should be
   in C:\WINDOWS\Start Menu\Programs\JBuilder 3.5).  Rename the
   copy to something appropriate, such as "JBuilder with
   jBoss working directory".

9. Edit the shortcut's properties by right-clicking and choosing
   properties.  Change the "Start in" folder to <JBOSS-HOME>\bin\.
   Click OK.

10. To debug a project using jBoss, use the modified shortcut to
    launch JBuilder, then open and debug your project as normal.
    To simply run jBoss, launch JBuilder using the custom shortcut,
    open your jBoss-aware project, and select Run|Run Project.

Note that jBoss seems to fire some extra exceptions on startup
when you do this, but it does appear to work.  Specifically,
this seems to be thrown three times:

java.lang.ClassCastException: sun.misc.Launcher$AppClassLoader
        at
org.jboss.util.ClassPathExtension.preRegister(ClassPathExtension.java:47)
        at java.lang.reflect.Method.invoke(Native Method)
        at javax.management.MBeanServer.preRegisterInvoker(MBeanServer.java:2253)
        at javax.management.MBeanServer.createMBean(MBeanServer.java:721)
        at javax.management.loading.MLet.getMBeansFromURL(MLet.java:385)
        at javax.management.loading.MLet.getMBeansFromURL(MLet.java:208)
        at org.jboss.Main.run(Main.java:109)
        at org.jboss.Main$1.run(Main.java:81)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.jboss.Main.main(Main.java:77)


David



--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to