Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×
Java Programming

J2EE Development on MacOSX 24

RyanG asks: "So I'm looking to get a new laptop and have found myself very tempted by Apple's iBook for a variety of reasons like cost, performance, size, etc. Now I know Steve Jobs once touted the Mac/OSX as the (future) premier platform for Java development but I'm curious to know what people think of it in practice? I'm particularly interested in hearing from people who work with JSPs and Servlets."
This discussion has been archived. No new comments can be posted.

J2EE Development on MacOSX

Comments Filter:
  • My Experience (Score:1, Interesting)

    by Anonymous Coward
    One month ago, I and one partner were convinced that we should build our
    own web site. He will supply contents and I will program it. So, I
    bought a iBook and downloaded JSDK 2.0, JWServer 2.0,
    JSP 1.1. For database, at this stage is JDBC. Later plan is
    to have JDBC+Oracle. I am a long time Java programmer. But I am new for
    JSP and JWServer. In about 2 weeks, I learned those stuffs. And I am
    very impressed by JSP concepts. Then, after I and my partner agreeed on
    the business plan, I started to code (many time spend on learning JSP,
    JWServer, session, cookie, etc). In about 3 weeks (each day for 5 hr), I
    did set up the programming frame of our site. Now, I have about 20 jsp
    files, and about 10 Bean files to support back end logic and database
    connections, also have about 10 HTML files to do presentations, like
    form, statements. Up to now, I am very happy I made a right decision to
    use JSP tech, instead of old Perl (Do you have other tech which is
    basically free and powerful? So, cold fusion and ASP is not in the range
    of our touch). Anyway, our site is up now, the site is dynamic, and the
    logic is not simple and can really support any logic easily since we
    have a full language is behind of us.

    I experienced some bad things. The bundled JRE of JWServer is JDK 1.1.7,
    which has no many methods of JDK 2.0. Yet, if you use JRE of 2.0, then,
    I experienced some very bad crash of Server, i.e. some perfect JSP pages
    could crash the Server, and I do not know the reason at all. So, I have
    to use JRE of 1.1.7 and changed my codes back to 1.1.7's API. After
    this, the Server crash seems gone. I can have Server runs smoothly for
    several days.

    I think the speed is satisfactory for me. At beginning, I am worried
    about database speed. Not any more. Of course, our site is not connected
    to net yet, all testing is via a 56K modem (actual line speed is often
    less than 30K). Seems our Server serves page quite fast. I can only
    hope when many users visit our site, our this configuration can still
    live well. My guess is that since JSP/Servlets utilize many threads, the
    scalibility is not that hard. If we have powerful machine to handle
    these threads (like multi processors), we have no bottle neck at
    business logic side. The bottle neck will be database and traffic. We
    can't do anything on traffic. For database, only hope Oracle will help
    us. Maybe this is too naive. Since whole codes are written very strictly
    by Sun's standard of Java (all resources are in property files, for
    example), I hope it can move to different machine, Web server, database
    easily. But, this is unknown also.

    Up to now, I would recommend anybody to use JSP/Servlet tech for new web
    developments.

    • Assuming your message isn't a troll, you do seem to be using some software that is a quite substancially out of date in the Java world. Here's a few pointers:

      - JSDK 2.0 is a reference implementation of a servlet dev kit by Sun. It's old. Sun has handed the servlet engine writing over to the guys at jakarta.apache.org , and they're putting out a servlet/JSP engine called Tomcat that's pretty damn good. Get Tomcat version 4.0.1 from

      http://jakarta.apache.org/site/binindex.html

      On a decent spec machine you should definitely experience more snappyness from Tomcat 4's improved engine - and it's a decent web server too. It's pure Java.

      - Tomcat runs best on Java2SE version 1.3 . Assuming you have Mac OX X (your iBook is only a month old, right?) it should be preinstalled on your laptop. For other platforms get it from the java web site at java.sun.com. You really do not need to be using JDK 1.1.7, that's old. J2SE v1.3 might have a slightly bigger memory footprint but overall is definitely worth it.

      -You mention that the bottle neck is at the database. You say you're using JDBC, but JDBC is just a connection protocol, what's your actual database? On windows, Sun provides some useful but non-production JDBC drivers for linking to ODBC data sources. They would definitely be a slow down factor, but if you get a decent database, the supplied JDBC drivers should make that go away. Try MySql from mysql.org, there are proper JDBC drivers available for that. Oracle is a good DB but possibly a bit too expensive!

      Good luck with the site. Have fun and keep learning!

      Roberto
  • WebObjects (Score:3, Informative)

    by Lally Singh ( 3427 ) on Sunday December 16, 2001 @07:39PM (#2712441) Journal
    Webobjects is a great development environment. It's all Java w/v5, well priced (only $99 for students, $699 for everyone else), and is finally getting some good documentation. I'm getting into it myself and I'm pretty impressed.

    If you don't like WebObjects, that's fine. Tomcat runs great on OS X (and you can find a point-n-click installer on the web), and Project Builder is a good dev environment. Besides, where else can you use photoshop, illustrator, gimp, and apache all on one box?

    • Besides, where else can you use photoshop, illustrator, gimp, and apache all on one box?

      Err, Windows. Provided you can get around the brain-damaged memory-management that Photoshop and Illustrator inherited from their mac cousins ("allocate 50% of memory to this app"?).
      • Haha, forgive me. Let me add the clause that they have to work well (that includes the GIMP and apache) all on one box.. And adobe's apps won't inherit the memory problems from the classic versions.
  • by jefflinwood ( 20955 ) on Sunday December 16, 2001 @07:49PM (#2712470) Homepage
    Hi, I bought a Titanium G4 400 for doing exactly that. I struggled with the choice between the iBook and the TiBook for a while, but the bigger screen and G4 processor won me over. Apple supplies an IDE with the free Developer Tools for Mac OS X download. I haven't used it yet - only mucked around with it. I'm using BBEdit Lite and the Mac OS X 1.3 Java runtime and compiler. I forget if that comes with the OS or with the development tools.

    A good website (and you probably already have been there) is http://developer.apple.com/java [apple.com].

    Here's a good overview from Apple of Developing Java Applications on OS X [apple.com]

    Just for another point of reference though, I use the open-source Eclipse IDE [eclipse.org] on my Windows 2000 Athlon, and I love it. I'm used to developing server side Java on Windows, though. As far as I can tell, Eclipse isn't available for OS X yet. They'd have to port the SWT widget set to OS X. However, JBuilder 6 is coming out for Mac OS X, and should have the native Aqua UI.

    And last, just to stoke the flames, I think a lot of the people who use Linux would benefit greatly from taking a look at Mac OS X. Go down to CompUSA or (insert-your-retailer-here) and play with the new G4 boxes. The Aqua UI will blow your mind (XP doesn't even come close).

  • by spike666 ( 170947 ) on Monday December 17, 2001 @01:13AM (#2713492) Journal
    i got an olde tyme powerbook g3(firewire) and its 500mhz, 256mb memory and OSX 10.1.1

    first off, it works really well for development. you can run any of the all java IDEs like netbeans [netbeans.org] or forte from sun [sun.com] or even borland's jbuilder [borland.com]
    i've been using jbuilder4 for a while. i had a bit of a hack getting the linux version to install, but once i did, its all straight up java 2 code, so it ran fine. (i prefer jbuilder4 since its got the ability to load in the vi editor tool from sourceforge - jvi.sourceforge.net [sourceforge.net] i've got tomcat 3.2.1 and 4.0 running fine on my pb, and it all works like a champ.

    i've found that the java integration into osX is outstanding. apple has made it one of the languages to code full on applications for osX with. i've got a coworker who does use the apple IDE projectBuilder to do his java development, so i know its possible. i just havent done it. i use jbuilder on NT at work, so i wanted to keep the same project files.

  • Do yourself a favor and get a lowend Titanium instead of the iBook:
    - It has a better processor.
    - If you plug a monitor in, you're not limited to doing mirroring of the LCD, you can make a big virtual desktop. It's really a nice setup to develop on. Documentation on one screen (javadoc rules...) and dev tools / editor on the other...
    And that's before talking about the LCD size (iBook: 12 inches, G4: 15 inches)

    Quentin
  • I know this is a little sick, but I actually prefer emacs (with JDE [sunsite.dk], which totally rocks). Has anyone used it (succesfully) on OS X?
    • Yes, it comes with the developer tools CD that ships with Mac OS X.
      • That's funny. Didn't the FSF boycott Apple because of their look and feel lawsuits? It always seemed that the Mac ports of emacs were renegade programs. Now Apple ships it. gotta love it.

        • That's the beauty of the GPL, isn't it? The FSF can bitch and moan all they want about Apple, but if Apple wants to distribute or port emacs, they are 'free' to do so, as long as they comply with the terms of the license.
    • I typically use emacs for NT and XEmacs at work. At home on my TiBook I avoid running emacs in the Terminal because I can never remember enough key-bindings to get around. Instead I use XFree86, XDarwin, and built XEmacs. It works great. Even has scroll wheel support.


      I'm a former vi convert. I still use vi for quick and dirty stuff, but emacs (XEmacs) is fantastic for my Java, C++, and Perl coding.

    • Sure, but the default version doesn't give you syntax-coloring in X. To really rock out:

      * Get fink (http://fink.sourceforge.net/)
      * Use fink (or apt-get, which fink installs) to get the rootless XFree86 and the real emacs
      * Get the OroborOSX window manager (http://julia.et.ic.ac.uk/adrian/software/oroboros x/)
      * setenv EDITOR /sw/bin/emacs (or, if you're on an iBook, setenv EDITOR "/sw/bin/emacs -geometry 80x25")
      * tweak your .emacs file with goodness like:
      (set-default-font "-adobe-courier-medium-r-normal--12-120-75-75-m-70 -iso8859-1")
      (setq mac-command-key-is-meta t)
      * Do your happy geek dance.

      --realinvalidname
  • by DeadSea ( 69598 ) on Monday December 17, 2001 @09:35AM (#2714402) Homepage Journal
    When OS X was released I was very excited because Mac users would soon be able to use my java programs. I went and tested what I had written and I was both very impressed and somewhat frustrated.

    I was impressed because almost everything that I have written that is pure java works flawlessly. The GUIs have the nice new bubbly plastic look and feel to them and life is good. This alone is enough to make we want to use OS X as my development platform.

    On the other hand I was frustrated because java programs we so hard to use. Mac OS X.1 added the ability to double click on a jar file to start a java program. Until then you had to go to the command line to start java programs. For an OS that prides itself on being GUI oriented, that is just unacceptable. There is some sort of utility to put some sort of macintosh wrapper around your java files, add and icon and make them look like a mac program. It all looks nice but it means that you will have to offer a separate mac download. That would be ok sometimes, but unfortunatly the utility is only a mac GUI program. I didn't see a way to script the process and add it to my makefile. The program also doesn't run on linux and windows which is where I do most of my builds. If there were a java port of this utility which I could run from a makefile, I would be much happier.

    The other frustration I had also dealt with lack of command line support. I wanted to open a web browser but was unable to find a command line to pop up IE. I finally found some class libraries to open a browser that were hidden (not in the classpath I might add) somewhere on the machine. Getting java to work with other programs is much easier on both Linux and Windows.

    Other than those couple nits, I really think OS X and java have a very bright future.

    • Well, your options would be threefold...

      Batch/Shell script - sucky on any platform, especially bad on Mac OS.

      Double clickable jars - better on any platform, but most end users won't know how to use them, so a file like "How do I launch this fscking app?" would probably need to be in the distro.

      As for MRJAppbuilder - its the only option (other than CodeWarrior or the ProjectBuilder IDE) that will give you that polished application. You might investigate if CodeWarrior on Linux or Windows can make Mac Java apps, but I'd guess not, and it obviously costs money.

      As for MRJ app builder, its written in Java, but it might well need native code. You could certainly write the xml files required, but it uses a small binary launcher stub.

      Then again, since you obviously care about user experience you should really be producing a little .exe launcher on Windows ... which would be just as difficult if you develop on Unix or Mac OS.

      You might be able to build a generic launcher that will launch any java application which follows some naming convention you define (eg, make your jar be called appClasser.jar and your main class be com.myclasses.Main). Certainly this was possible on Mac OS 9 - then you wouldn't need to regenerate the launcher every time you release.

      File a bug with Apple requesting a cross platform solution (developer.apple.com). You need to join up, but its free.

      As for opening IE - if all you do on Windows is

      Runtime.exec("iexplore.exe");
      then you've just annoyed me, because you've ignored my browser preferences.

      What you want is Eric Albert's BrowserLauncher... works out the user's prefered browser and works pretty much everywhere you're likely to want to be, and is free:

      http://browserlauncher.sourceforge.net/
      • There are many classes for opening the system browser. I have them listed on dmoz [dmoz.org]. I use the one I wrote.

        Executable jar files are the generic solution you were looking for to launch java apps. You should just be able to double-click on them. The only thing they lack is an icon. I would have to say that Windows options for launching java programs aren't much better than macintosh, however there are several command line installer builders that I can invoke when I need to use custom windows code.


  • I use netbeans and jedit under linux and windows. I find windows to be the faster of the two, but prefer a unix environment. How does OSX compare performance wise? Startup lag kills me!

    anyone? - cheers.

The use of money is all the advantage there is to having money. -- B. Franklin

Working...