Java • 1:07:24
This session presents Java development tools available for Mac OS X, including JBuilder, NetBeans, Project Builder, Optimizeit, InstallAnywhere, CodeWarrior, and others.
Speakers: Alan Samuel, Dave Ewing, Scott Adler, Blake Stone, Michael Acosta, Eric Shapiro, Serge Beauchamp, Ravindranath Kurupati
Unlisted on Apple Developer site
Transcript
This transcript was generated using Whisper, it may have transcription errors.
Good morning and welcome to the chaos here. As you can see, we've been frantically working to put all of these demos together for you. This session is something that Steve Llewellyn and I had talked about sort of as a showcase to all of you folks that are doing Java development as to what tools are available both from Apple's side and from third-party's side. And we wanted to put this together. I'll give you an agenda with who we're going to talk about today. We've got, obviously, Project Builder. We'll have Dave Ewing from the Project Builder team up here to demonstrate Project Builder. I'm not going to talk too much, just a little bit here this morning. We've actually got Scott Adler from our Java team at Apple who will be demoing on behalf of VMGear with a product Optimize It. We'll have Blake Stone. I'm sure some of you have already seen him in some of the earlier sessions demonstrating JBuilder. And then we'll have some new things that I don't think have been seen anywhere, hopefully, from install. Well, actually from Zero-G, two products from them. And then lastly, we'll have Metrowerks showing the latest advances with Java and their CodeWarrior product. So with trying to put together all of those demonstrations and all the various machines, we'll pray that the demo gods are with us today. and everything goes off without a hitch. So with that, I'm gonna go ahead and bring Dave Ewing up to give you guys a demonstration. We're just gonna have him walk through Project Builder and show you some of the great features that are Java specific with Project Builder. - Thanks, Alan.
the demos. So I was going to take a long time here knowing that I was first and didn't have to worry about time, but we've already started late, so I guess I got to get going. There we go. So you guys have all seen Project Builder here. You're going to see it more in lots of other sessions, I'm sure. So the thing to note is that Project Builder does a lot of stuff. Java is just one of them. I don't need to go through all this stuff. That slide is actually similar to slides in lots of other sessions too. So why would you use Project Builder to do Java? Well, for one thing, it's a full Java integrated development environment. Java is a full class citizen in Project Builder. And another reason is that Project Builder from the beginning has supported all of the Mac OS X platform initiatives.
If you're building an application on Mac OS X, even if it's a Java application, you can do it the right way and build it as a bundle. Another thing you might use Java in Project Builder 4 is to do Cocoa development. Cocoa, most of the time people think of Objective-C with Cocoa, but actually Java is a very good way to do Cocoa. And with that, you can use Interface Builder actually to build your UI, even for Java, not just for Objective-C. Of course, Interface Builder supports Cocoa, not Swing, so that's something to remember. I know a lot of people get confused by that. And the final thing I'll mention here is that if you have other source out there that's not Java, a bunch of C source or C++, and you need to get to that too, you can use the Java Native Interface to get to it and develop all that code in the same project together.
And with that, I'm actually going to demo just that, a JNI project here. Okay, so I have this little demo project here. It's actually very simple. It just has one C source file and one Java file. And if we look at the C source code, it does some heavy duty math here. It adds two numbers. Okay, it's a demo, right?
And if we go ahead and then, this will be built into a JNI library, of course. Go ahead and look at the Java source file. Wow, copyright Apple 2000. It's an old demo. In the main class here, Calc Engine, it does a system load library on that JNI library. No big surprise if you do JNI. And at the very bottom, there's a main routine that, guess what, calls the native class.
So it calls the native function there. Okay, well, let's take a little look at how the targets are actually set up for this. We have one main target here that builds everything, and underneath that it has some dependencies set up to the other targets. The first one generates or compiles the Java sources, and then there's a JNI library that has to get built, of course. And I actually have a third target here that generates Javadoc.
Now, Project Builder doesn't actually have integrated Java doc support in it, but it's actually pretty easy to do that. So we just have a shell script build phase in this particular target that calls out to do the Java doc. Not the prettiest, but you know what? You can do it. And that's testament to the flexibility of Project Builder.
Okay, well, let's go and look at the Java sources target. This one's somewhat interesting. I mean, it builds the Java source file. That's no big deal. The one thing it does do at the end is it also has a shell script build phase, and this one calls out to Java H. Now, it's not really necessary to use Java H when you do JNI libraries, but it's a good idea because it allows you to keep your Java source code and your C source code in sync. So that little C example that had--it actually had add and multiply. It had a few routines in it. It just doesn't know how to just add. You know, if you got out of sync, that file really does include the.h file that's used--that's generated here by Java H.
Okay, and then the final target I want to show you is actually the building of the JNI library. Not much here in the build phases. All it does is compile that C source file. No big deal. If we look at the settings, we see that it creates a file called lib calcengine.jnilib. That's what a JNI library looks like on Mac OS X. The final interesting thing in this panel here, down at the bottom, When you're building a JNI library, you want to set the library style to bundle.
and then the other tab just to show you. When we run this little demo here, what we actually run is Java, the executable up here. that sits down inside the Java VM framework. And we want to give it some arguments on the command line, which give the class path to the jar file and the name of the main class.
And another thing to look at here is you can actually choose which debugger you want to use in Project Builder. So you can actually use GDB to debug the native code. And that's using GDB underneath in here. So you debug with the GUI in Project Builder. Or you can use the Java debugger. And we're going to use the Java debugger. So I'm just going to do a quick – I've already built this project. Okay.
At least I hope it's built. It was yesterday. OK. So we stop here in the debugger. Standard pane to look at the variables for the local routine. This particular stack's not very interesting. Just the main routine is on it. We have a pop-up here to switch between threads. And we can go to another thread, the reference handler. And, well, it's taking its time.
I should have been patient. I selected on something else. So anyhow, you can drill down into variables. Pretty standard stuff. Well, let's go ahead and continue to that other breakpoint. You can see in the console view up above, or perhaps you can see that it printed out that first print line. And we stopped at the second one that says the result is result. And you can look in the variable pane. And in fact, you can change that result if you want.
Okay, so we now have a new result. We can step and see that it printed out the new value. And it's a good thing we used JNI for this demo. Got the wrong answer, didn't it? And you know what? That's about it. That's all I need to show here. I think you're going to see Project Builder in a lot of other places. So let's save a little time and get on with the other folks. - Yeah.
So we'll go ahead and invite Scott Adler up. Scott's going to talk a little bit about VM gear. Thanks a lot. It's actually really fun for me to be up here to show Optimize It. The people from VM Gear couldn't be here, and they came by. We've been working with them to get all of their-- all the profiling information into our new VM. And they came to Apple and worked with us a little bit on getting up their product. And it's really fun, because I've been doing Java programming for about five years, and this tool is really useful. I don't know-- are there people in the audience who've used this tool?
A couple? OK, great. So it's an excellent tool for taking your Java application and just figuring out what's going on under the covers. So here's a little overview of what OptiVisor does. It's a good profiling solution. You can also fix all of your performance issues. Now, not all of them, but you'll be able to find the hotspots and determine what's really going on. So let's go to a little bit of what common Java performance problems are. Now, there sort of are two different main areas of Java problems. One is memory allocation that might take a while. This has gotten a lot better in Hotspot, so sometimes it's really good to run through an optimizer to see what's actually happening, how well Hotspot's taking care of this for you. But there are things like the cost of your garbage collections, whether you're allocating things in a tight loop. Sometimes Hotspot takes care of that really well for you. Sometimes there are other things that are going on. So garbage collections really are the big thing. If you're somehow allocating a whole lot and you're hitting the top of your memory limit and the garbage collector is kicking in and you've got a multi-threaded application, it's going to stop all your threads because it has to go parse all these trees of relationships. And then as soon as it's done, all your threads will be let go again. So you don't want to be garbage collecting a lot during your running if you have a UI going or something.
The other thing is memory leaks. And one of the promises of garbage collection is that you don't have memory leaks. The problem is we still make mistakes. We still do things like write a program where we have things that are listening to other objects so they're linked together, and they end up in this complex chain. And you do things like add action listener, and you forget to remove action listener. Well, that's just as bad as not calling delete. So you want to find your references. You want to make sure that you're disconnecting things correctly when you delete objects. And then the other big thing is unsuspected performance bottlenecks. And that's actually huge, because you don't want to sit down and necessarily architect your code for ultimate performance when you don't know what your performance issues are. Obviously, you know some big things, but you don't want to go and write this great, tight algorithm that really isn't your bottleneck and spend three months on that and then realize, well, actually, it's your drawing code that's bad. So that's really useful. You get to code, code clean, code all your objects really well, and then find out what your hotspots are and then go jump into them and send your performance engineers after that. So I'll run through a quick demo. So what I have running here on number-- guest one.
what I should have here. In a second, we'll have it. Well, I'll talk a little bit about it while we're waiting for it to come up. The way Optimize-it works is it actually puts in some hooks into your application. So when you run your application normally, you'd use MRJ App Builder or something like that.
But that would eventually call Java and give it your initial class starting path. What you do with Optimizeit is you actually instantiate their classes, which then instantiate your classes. So they put a couple hooks underneath you. And then that's one way to start it. And then what you can do is you can connect to that remotely. So what I have is I have this really, my canned demo.
This is a little bit of swing set I took in here. And just put some members of the team. And I put some sorting on here so we can just play with a little bit of performance things. Now this I ran just by calling the optimize it classes and then launching my class. So now that this is up and running, I can go to optimize it, which I already started up, just so I can be a little quicker. And here's optimize its settings. And this comes up when you start up optimize it. You've got all these different settings. I'm not sure if you can read these that well, but there's application, applet, servlet, and remote application. So I'm doing the remote application version because it's pretty cool. It lets you start up your application separately from Optimizeit, and it lets you then connect to it. So right here I've got host name, which says local host. This could be two-machine profiling, so if I didn't want Optimizeit to interfere with the profiling performance on the other machine, I can set up another machine and just connect to it over the net. So I also have here the source path set up to my source, and you'll see a little more about that later. So if I just attach to this program, now Optimize will come up. And what it first does is it connects to the program. And let's get rid of my filter here.
And it shows us the-- right here is what mode you're in. And it shows us that we're in memory allocation, profiler mode. And we can see all of the objects that have been allocated. And this is since it's booted up, so since this application started. So we can see we have a ton of char arrays, strings, objects, and all that stuff. And this can be a little useful, but you tend to be overwhelmed by this. So you might want to jump down into things that are in your code. So I know that I have a class called sort something. Wait, maybe it's not sort. It's called table something.
So here are all my table demo classes. Now, if you know in this, this has all my interclasses also, which is kind of cool. They're anonymous interclasses, so they get these numbers if you know about how this works. So I see that I have two table demos. And I might want to say, you know, what's going on?
Why are these around? Where were they allocated? So I can just double-click on these. And I can see that I had two table demos. And this is really useful if you have hundreds, thousands of things. But it's showing me an allocation pathway to each object. So I can go here and say, okay, I've got two instances.
One of them was instantiated here, and I see, oh, this was done in Swing Set 2 preload first demo. And if I want to see, you know, what's actually going on there, I just double-click here. And this brings up the Optimize It source code viewer, and I can see, oh, here's where it was. It just made a new table demo. And if I want to see the other one and see, you know, why are these created in different places, I can look down here and see that I've actually got... through a different source path here. It's processing an event, which is processing an action event through a menu item. So, and I can see where's my action. And my action is here inside of my menu bar that I made. I had a new menu item. So, that's pretty useful for finding where your objects are.
The question is now, let's look at, let's go back to the main window. So now I can do things like mark this whole thing with a mark current instance count, which will put this line at the end of all of my instances, and it'll show me the difference. So now if I go back to my demo and I say new test window, It's now creating a whole new test window, and we should see a whole bunch of instances show up. And what's interesting about this is that now I can look at just the things that have happened since I did that action, and I know I only did that one thing. And then I can, right here, is the garbage collector. And this is, the garbage collector isn't running very often because we don't really need to. So I can click here and run the garbage collector, and it should clean up a whole bunch of things. Not all of them because, obviously, name, color, there are a whole bunch in there. If we look down here, table demo, we should have-- we got two more of them. I'm not sure exactly why. So we could go try to find out where they came from.
And we can see that we've got four of them. Now, I may only want to look at some others. So I go back here and-- So I want to see just the allocation since I put my mark in. So I say show allocations, and I see that I had two allocations. And that might be confusing to me. Why did I have two? I only pressed new menu once. So I can go through here and see that I had an action performed swing set two, and that was through my menu item. And I also see that I'm loading a load demo. So that, to me, says that I've got some error in my code. I'm loading this twice for some reason when I have one menu item, So I can go track it down and fix it. The other interesting thing is if you are trying to find why things are sitting around in memory, you can go here to your-- your reference graph. And this is the object I was just looking at. And this is the table demo itself. And these are all the references to the table demo.
And if you've ever tried to track these down using other tools, it's really difficult. 'Cause you don't know who, whether they actually have their parent links and their children links and how many listeners are connected. And you get to see, same thing, all of their links here, who's listeners of what.
And you can actually see who's adding them, where they're actually adding listeners and things. So this is an inner class which automatically gets a link. You can go here and see that, actually look at the swing code itself and see how swing is creating links to items. So there are a whole bunch of different ways you can track down links to other items. One other thing I wanted to point out is that there's a little overview of your whole VM. And you can have this running in the background if you want. and you can just sit here and say update when invisible, and this will run the whole time. You get to see when you run the garbage collector, you should see garbage collector activity crank up and then back down. Right here are some threads, whether they're active. If I actually go to my demo and tell it to sort, you should see I threaded this little demo, so you've got a thread right here that appears and disappears.
These are the current number of threads they actually have, and usually there's just one, your event, guys waiting for your events. Then you can also look at loading classes and see, you can see what classes, how many classes are loaded. So if you have a dynamic loading application, you should see that you don't load everything right at the beginning and then when you start getting to more parts of your application, things get loaded. So there's one other big portion of this which is the CPU profiler which is really cool and I'll be showing it at the Java performance demo. That's 504. That's this afternoon. It basically lets you profile the whole application and it's really useful. But I don't have enough time to show it here today, right now. So come to 504 and you can see a little more about this. So let's go back to the slides.
So I just want to run over what the strengths are of Optimize It. The biggest thing is that you basically can profile your Java code without any recompiling. All you do is you run it using the Optimize It runtime basically. It's really easy to configure. It's easy to use. It didn't show it exactly back here, but when you -- I'm not going to switch back, but when you first come up you have a whole option to launch it all from Optimize It. So if you don't want to launch it separately, you can just launch it right there. You can set up all your class paths and everything. Yeah, I'm done with that. And then the other thing is that it's very scalable. Now you may not have noticed it during the demo, but when I did things, it didn't automatically load everything that came in. So it wanted -- when I asked for object allocation graphs, it would only load them as I needed them. So that's really important when you've got a giant like servlet runner that has maybe 20 threads running with hundreds or thousands of objects. You don't want to load all of your instance data all right at the beginning. You just want to look at the portions that you're interested in. And if you're loading it all, it might take forever. So that's really important. It's a really good feature. And the other thing I wanted to mention about this, just two quick things. One is the UI for Optimize It is done in IFC. I don't know if many of you know that, but that's why it doesn't look like Aqua. So I encourage you to encourage the other developers at VMGear to work on a swing version. And also, that this needs the 131 VM. So it needs DP1. You need to activate the hotspot VM, and there's information in the 131 release on how to do that. The other thing is they haven't committed to a specific release date. They've said fourth quarter. So again, send them email.
Find out when they're going to have releases. But it's an excellent tool. We use it internally because we have tons of Java code. Our Java implementation has lots of Java code, and we use it all the time. I had an engineer come into my office, and we ran through some of our graphics code, and in 20 minutes found something that was slowing us down like 20 times. So it's really useful. So that's about it. And here's the contact info for VMGear, pretty much VMGear.com. It used to be intuitive if you used Optimize it before.
Thank you, Scott. Next, I want to go ahead and bring up Blake Stone from Borland, and he's going to give us another exciting demonstration for Jay Biller. And then you've got a session later on tomorrow, is it? Today. Actually, it's today, 5 o'clock. I've got so many sessions I can't remember. So. OK, thank you, Alan. I'm just going to jump into a couple of slides here. So we'll quickly run through those. Where's our remote?
And then we'll jump in and do a little bit of demonstration. I have to try to juggle some things. So you see some cool things during the Java address yesterday. We'll show you a couple of interesting things here, but we'll save a lot of the really good stuff for the session at 5 o'clock. So if you want to see a lot of the new features of JBuilder 5, if you want to see things specific to web development, XML development, we'll defer those to the 5 o'clock session, and we'll focus on some of the basics of Java development here.
I wanted to talk a little bit about, specifically, of course, JBuilder 5 for Mac OS X. The real focus of this product is not on saleability, marketability, buzzword compliance, but on extreme productivity. We are Java developers ourselves. JBuilder is written entirely in Java, so day by day we find out what makes us more productive and we improve the tool to make you more productive as Java developers. So rapid coding and visual development are a big focus, and we'll look at that a little bit. Integrated debugging and having just a state-of-the-art debugger that takes advantage of everything that we can get from the VM is a big piece of what we do. And, of course, JDK 1.3.1 is an important piece of the debugging story. So that's underway. And, of course, you'll have a developer preview of that shortly. There's support in there for Java beans-based development, database development, XML, JSP. A lot of the really big things that our customers told us were important to them and that we see we need internally to manage our own systems are things we've put into JBuilder. So it really covers a very broad spectrum of what the pure Java developer is really interested in. That's our primary focus is people doing pure Java development. The product, again, is really written entirely in Java. We have a tiny little stub that gets us launched, gets the VM kicked off. But then the product is Java and winds up being a wonderful torture test for Apple. So we've been working very closely with Apple to make sure that this enormous application works well on their VM. And it really is testament to the hard work they've done that it works because JBuilder has more classes in it than the whole JDK does. So we are not a small app. But we've done some work to specifically tailor it for Mac OS X. So I'll showcase a little bit of that as well. Yes, it's the same source code that we use elsewhere. But we like to make sure that it really looks nice and works well in the Aqua look and feel and added some features specifically for Macintosh users.
Where should I be aiming this? There we go. Feeding the Macintosh spirit was a critical sort of key theme for us. We don't need to produce a product that is some port, some popular Unix thing that you guys happen to get access to and should be happy about it. Instead, we want you to really feel like this is something that is the way Macintosh users would have done it in the first place. Because you guys have a fantastic platform to work on, and you really deserve the best tools possible. So yeah, it's nice that you have the best-selling Java IDE forthcoming for Mac OS X. And we win tons of awards on that basis.
But this is not sort of a stepchild of JBuilder on other platforms in a lot of ways. We showcased, of course, at a technology preview last year, JBuilder 4. Well, what we're showcasing this year is JBuilder 5, which we announced last week. So this isn't a long porting process here. This is something we're keeping right up to date on. We are trying our very best to get to the point where all of the technologies are in place to release this and to give you the full product that you see elsewhere, a world-class product that really takes advantage of the platform.
It's been interesting that JBuilder on Mac OS X has been very tightly connected to WWDC. I've been happy to be here three years in a row now. The first year I was here, just talking to people, seeing, you know, is Java really important to Apple? Is this something you'd be interested in? And talking to a lot of you to say, you know, do you remember Borland from the days when we had Macintosh products? And, you know, would you be excited about something like JBuilder? And we were told resoundingly that, yes, Java was important to the future of Apple. Just wait. There will be cool things happening. And of course, the Java 2 announcement was in the works at that point. And so we started doing a little bit of work in, I guess, the spring of last year to bring a tech demo last year. Now, the tech demo was obviously really early. We're running on a pre-release VM that's running on a pre-release operating system a good year ahead of when it would really be ready for prime time. So we were happy to be able to get that level. But here, of course, we've given you all preview CDs. You have a CD in your bag that will let you look at JBuilder. And please, please, please pull the updated VM before you consider what the performance and stability is like. The updated VM should improve things dramatically over the one that shipped with Mac OS X. Our support from Apple has been phenomenal.
Of course, Mac OS X itself provides a phenomenal foundation for Java 2. Without the robust multitasking, symmetric multiprocessing, multi-threaded environment that Mac OS X is, Java 2 would be enormously difficult to put on the Macintosh. But Apple's enthusiasm and partnership has been a big piece of this. And a really key piece for us is JDK 1.3.1. A lot of people have asked, when are you going to ship? What's holding you? And the answer really is that JDK 1.3.0, through no fault of Apple's, has some pretty enormous debugging issues. And Apple is working hard at integrating a lot of the fixes for those in 1.3.1. And when that release is available, that's when JBolder really starts counting down to release. So we're looking forward to getting there as fast as we possibly can. But this is the missing piece. This is also, of course, what you will get with the update, the developer preview release. So with that, let's just launch in and do a little bit of a demo. I didn't want to spend a lot of time on this, but if we can bring up demo two here.
I did want to showcase some of what I think is particularly exciting about JBuilder, not just the nifty Aqua icon. JBuilder itself, again, is really focused on developers. So rather than spending time hiding your code from you, we really spend a lot of time focusing on what we can do to make your coding environment especially effective.
So if you go into an arbitrary example and open a piece of source code, the source code takes up the majority of your screen. But we spent a lot of time finding ways to add value to the source code editor that we have. The source code editor provides, of course, the usual features you'd expect elsewhere, the ability to indent and unindent blocks of code, the ability to undo an infinite number of steps and redo an infinite number of steps. So just a high productivity editing environment. But a high productivity editing environment keystrokes you're not comfortable with wouldn't be all that useful. I will apologize. I've been using the keystrokes my mind is trained to use here. But we do provide two sets of key bindings specific to Macintosh customers. The Macintosh key bindings will use sort of a classical, more of a project builder, text edit type set of keystrokes. Whereas for those of you who are familiar with BBEdit, Code Warrior, what have you, we've also implemented those key bindings. And you can even go in and customize them. So if we've missed out on some of your favorites, you can go in and tailor those key bindings to your need.
So OK, that gets us productive right away in doing things in the editor. See if we can get that back to where it was. But also, we wanted to provide really rapid browsing mechanisms. So we provide a structural overview of your file here that says you have a class that has all of these members that you can quickly get to, but also that's dynamically updated. So as I define a new class, you can see that that new class simply shows up. As I go ahead and add members to it, then they'll show up. And this is tracked in real time as you're coding. So I'm going to set a really low delay. We normally keep this delay higher to avoid driving you nuts with all the flickering going on. But as I type, you can see that we're actually able to parse the source code and keep that up to date.
So not only do we know about the members and so forth, but in order to figure out what the members are, we need to know whether your code is actually syntactically correct. And whenever you have something that is an illegal piece of code that doesn't follow the Java syntax rules, we can show you why, where that problem is, and help you get to it immediately, rather than having to go through a compile cycle to find that kind of thing.
So that's all pretty cool, but it helps you at sort of the Java syntactic level. And that's one part of the Java programming puzzle. The other major part of the puzzle are the libraries. They're huge. There are an enormous number of Java classes available. There are probably more classes being introduced every day than you can possibly learn in that day. So what you need are tools that help you with these things. And that's what we've provided here. We've provided technology, which we call Code Insight, that allows me to say, if I'd like to create a new J button, then what are the possible constructors?
Well, there are constructors that take these various parameters. I need to pass an icon or an action or what have you. And let's say I want to go ahead and use something from the current scope. I can also get a list of things that are available in the current scope. So if I want to pass a string that I already have declared, let's come up here and create a string foo that contains some information, and I don't remember the name of my local variable, or I've used an extremely long local variable name, then our code insight can assist you. For example, if I had, this is my variable name, Thank you.
then I can just select it from a list by typing the first couple of characters, and we get the rest. So that technology exists for browsing class names, for finding out about parameter types, for finding out about parameter names as well. You'll note that you get not just that this takes a string and an icon, but the string text and the icon icon. Perhaps most importantly for the Code Insight technology, it's completely dynamic. It's not hard coded to understand particular JDK classes, but it understands any class you could possibly throw at it. So for example, if I come in and I say I'd like to create a new com.apple, it says, well, here are the sub packages in com.apple. There's no specific code for this at all. I just know that there's some classes out there and I can browse them. And I go and look for a completely unprepared here class, and we'll see what constructors are there. And it turns out it's actually an interface, so there are no constructors.
But that's interesting in itself. If it's an interface, does it have any interesting constants or static members? Sure. So we can browse and discover all this stuff on the fly. We can discover it so completely on the fly that if I were to go ahead and declare right now my class foo with a public void bar method... And to come down here and create a new foo and go to invoke methods, look who shows up. So we're parsing and analyzing all of your code on the fly all the time.
And that's a really key piece. The one other thing that I wanted to demonstrate really briefly, because I'm assuming I'm eating into other people's time if I don't stop this quickly, is the visual design aspect. Because if you're doing raw coding for Swing, it can take a long time to figure out how to get the effect you want. But if you can just drag and drop components, you can get there really rapidly. So we provide a way of visually designing something that I can say, I'd like a button here, I'd like a text field here, I would like a scrolling region with, say, a tree in it here. And what we do behind the scenes is write the source code that you would have had to write in order to accomplish that. So you see here in JBInit, we have all the constructors and things that do set text. Here we go, for example, on the button, JButton1. But what's really unique to JBuilder's approach is what we call two-way tools. We aren't just generating code for you. The code is the complete repository of our knowledge about the design. So if I go and actually change the code or do something really torturous, like actually put an expression in there and flip back to design, we'll go and actually look at your code and reproduce what you've done.
So I hope that's enough to get you intrigued. We'll be in the Civic at 5 o'clock. And I certainly welcome all of you there. We'll hopefully have time to answer questions there, which we probably won't run into at this session. So thank you very much, Alan, and we'll see you later.
Okay, next we want to bring up Zero G. We've got Eric and Michael. And you've got the clicker and you're set. Excellent. Good morning, everybody. My name is Michael Acosta, and I'm the lead architect for Install Anywhere. I'm here with Eric Shapiro, who is our founder of Zero-G. And we're really excited to be here, one, because we finally got our demo working not 15 minutes ago, but also because you've seen a lot of products here that are helping you to develop your Java applications.
Once you're done developing your Java applications, you're going to need to ship them. And you're going to need to keep them updated, maintained, configured on the machines. That's what Zero-G provides. And Eric's got some slides. He's going to show you. He's going to get the slides up. Can we get the slides back up here? Actually, I think your mic might not be working there. So, okay. So, what we're going to do here, you're just going to have to talk really loud.
So, I'm sure you can do that. What we're going to do here is we're going to show you a bunch of different things. We've been in doing Java development now for about five years. We've been partners with Apple during that entire time, focusing in on after you have completed your applications, after you've written them using any of the great tools out there, some of the stuff that we've just seen, some of the stuff we're going to see. What do you do next?
You want to get it out to your users, you need to create a great installer for that. And we've got two products, one that some of you may have seen before, which is Install Anywhere, another product called Power Update, which we're introducing here, and showing this on Mac OS X. We've been supporting Mac OS 9 and other platforms for the last several years.
So the first thing I want to do is talk a little bit about Install Anywhere. Install Anywhere allows you to create a single installer, an installer that's entirely Java-based and allows you to run that installation, installing your application on any Java platform. We've supported the Mac OS for a while. We support Windows, Linux, Solaris, HPUX, AIX, all across the board, pretty much anything you want to do with a single installer that gives you the same look and feel across all the platforms. Now, I say look and feel, and really what I'm saying here is feel, because we're going to show you in just a minute here is how in the Macintosh, it's incredibly important for us to have the look that people expect, the Aqua looks. We're going to show you that. In addition to that is a technology that's part of installing, and we're called Launch Anywhere. And as many of you know, it's incredibly difficult to convince your users how to run your Java applications. You may have developed on a Macintosh. You don't have a command line if you're using Mac OS 9.
You do have a command line when you're using Mac OS X, but your Windows users have command lines and batch files, and your Solaris users have those as well. And so what are they going to do? Well, our technology, which is called Launch Anywhere, allows you to go ahead and create a single launcher technology that allows your users to double click the application just by clicking on an icon. Now the other thing that we're going to be talking about here is, a little bit about the architecture here is about what you can do with install anywhere installing working bill you installer which can run from a c_d_ rom or you can put onto a deployment server onto a web server and you can do web installs we're gonna show you a little bit about that today you last you do installations right from the web browser we don't have that's working today with Mac OS ten but it will as soon as we get the new release that blake was talking about just uh... little while ago as well and so everybody will get that support as well Power Update is a new thing that a lot of people out there have said, okay, installation's great, but I've got to keep my software updated. How do I do that? Well, Apple's got a great technology software update, but it's not available to third parties. And what Power Update does for you is it gives you the ability to add software updating, live updating to your applications, not just Java applications, any kind of application at all. In fact, the focus of Install Anywhere with our new release that's coming out is that you can install native applications on Mac OS X, and you can add power update to it, and you can get the live updating functionality that you would expect to get from software update as an example. Thank you. The Power Update architecture is a little bit more intense compared to install anywhere in the sense that it does require a server component, Power Update server, which is where you get your software updates from.
And there's a management aspect to that as well. So you can say, here's the versions that I've got. Here's the versions that I want my users to have, et cetera. Now, a real challenge for us has been, as we've been focusing on the great look and feel and trying to make sure that all this stuff looks great on the Macintosh, Well, one of the things that we wanted to do, very important for us, is to show how great the Macintosh platform is as a Java server platform. And in fact, we'll be running the Power Update server on our Mac OS X machines up here, and that's a J2EE application that's got the complete software stack running a Java web server, running a database, running the JSPs and servlets and all the connections and the reporting modules and all that, and we're running that up here as well.
And enough of me talking, let's go ahead into a demo. And what we're going to do here is we're going to do a side-by-side demo because this is really a combination of both a developer tool and an end-user experience. And again, it's really important for us to be having that end-user experience. So what we have here that you'll see on the screen is two different things. On your left-hand side is the end-user experience. This is what your customers will see. On the right-hand side is the experience of what you as the software developer will see. And we're going to tag team our demos here. And I'm going to let Michael go ahead and take over first. If you could look over there while I log us into the developer system on this side.
Can you guys hear me? Yeah. Okay, good. Okay, what we have right here is an Internet Explorer, a web page. And this web page, when you actually build your installers for the various platforms, is automatically generated. And right where you see this right here, this is where the applet would typically be. What the applet allows you to do is actually start the installation from the web.
What that does is it'll download it, it will fire it right off, so all they have to do is click on the button and get ready to go. Alternatively, we list all the different platforms that you've built for and they can just download it directly. Say they want to get something for another platform and then just put it on a central server so they can go ahead and distribute it among the corporation, that's fine as well. But I've already downloaded one and got one ready to go so I'm just going to go ahead and start that for you. Why don't we go ahead and quit those guys so that we don't get confused with the installer that runs in the web page. Okay.
Okay, go ahead. And this is the installer. This is the icon. We've put a lot of effort into making sure that the Aqua look and feel, because this is going out to your end users, that the Aqua look and feel is fully supported in our installer. So the installer is coming up, gives you a quick splash screen. And this is fully configurable. Also, one of the advantages is as well, because Mac OS X supports so many different languages and internationalized support, we also support that as well. When it first comes up, it senses what locale your system is running on and defaults to that, but it also gives you the opportunity to run it under any of the locales that you wish. So go ahead and hit that, and it's loading up the installer.
Now, as Michael is doing that over there, what I'm going to do is I'm going to switch over to this side here and show you what Install Anywhere, the designer environment, looks like. So on this screen over here, what you're seeing is, again, the full Java application uses Swing. It has a little bit of a different color scheme that we put into Install Anywhere. It allows you to control basically all the aspects of the installer in a visual environment. So as Michael is going through the different step panels of the installer on that screen over here, I have this little step over here that's what we call a task, pre-install, and I will actually see the exact same panels here in a visual representation of what my installer is going to look like. Okay. So if you look at this, you'll see for the most part we've mimicked as closely as possible the actual Apple installer. They're going to have a lot of different installers available for OS X. Apple provides installer.app, which is the default and used for a lot of their system software. You want a very consistent and clean interface. And I believe that right now we are the only application that mimics it as closely as to match Apple's installer. So this is the introduction, and we'll go ahead and go to the next. Now, why would we want to go ahead and use Install Anywhere versus Apple's installer? Well, the advantages of using Install Anywhere is one, I mean, almost everyone here I'm sure is a Java developer. So, yes, we definitely want to target Mac OS X because it's going to be one of the best Java platforms, especially because it's pre-installed. You know what version's there, and you're confident of that. But you also are making your Java applications. There's a reason that you've chose Java. And that reason is you can take it across to multiple platforms. When you build and install Anywhere, you can build the installer simultaneously for all platforms, and you get the native look and feel of each platform. Actually, one of the advantages right here is we're running a look and feel that actually mimics the Aqua Look and Feel installer very closely. But as Eric will show you shortly, this is actually skinnable.
You could brand your installer almost any way that you wanted. What I could do is I could actually show that right now if you'd like to see that. We have a step on here called Panel Look and Feel. I can change the installer background image, and just by clicking Preview here, I can see what that image is going to look like. We have the demo going here with the Mac OS X look and feel. So you can put anything you want in there. So if you wanted to put the JBuilder background image on there, if you wanted to put the Metrowerks background image on there for your installer, you could do that as well. Okay. So we have additional steps as well. I'm going to kind of walk through this relatively quickly.
All of our file choosers, et cetera, use the native look and feel, so it's exactly what the end user would expect. One of the options as well that we're supporting that we haven't seen anywhere else as yet ability to install one of your aliases directly into the dock. This is a little bit experimental at the moment.
We're going to try it anyways and see how this works out. And finally, common on a lot of platforms, and you have the option to choose, is the ability to give a pre-install summary. And actually, if you switch over to the pre-install summary, we have a lot of different information that you can provide to the user during the pre-install summary. These are the defaults that are chosen right now. Now, before you go and click the install, I'm sure a lot of people are saying, okay, this looks great. What about installing just Mac applications? So we've been focusing in on install anywhere over the last several years as being the premier multi-platform deployment solution.
But with this new release that we have here, it is going to be the premier installer solution for Mac OS X native applications as well. And one of the things that you'd want to do is considering how the Mac OS X installer, the built-in one that works with the look and feel we've been talking about, what if you want to do things like the custom panels or the custom actions or have rules or certain things that go on during your installer when you need to go into a more advanced more complex type of installation that's when you would choose something like install anywhere also one of the things to remember each one of us here are probably java developers and almost on any other platform we are java developers people ask you are you a native developer or java developer on Mac OS ten if you're a java developer you are a native developer It is one of the native APIs that's supported on the platform. This is basically on Mac OS X a native install solution. And it will be one of the better install solutions available. So let's go ahead and fire off the installation.
You can see it gives you feedback as to what's actually going on. It has the awkward progress bar. But you can also use billboards. And you can see there's one right here. You can have multiple billboards, which will be time-sliced as the installation progresses. Well, don't miss it. The dock's just disappeared and reloaded there. And there we go. Got Office Suite installed into the dock.
Now, what Michael just did there is the full installation, talking about what we have installed, but it's important how you represent what that is. And so a lot of us in the Macintosh like to see a representation of your files and what they're going to be. So again, over here what we see is on our install tab, we have a representation of what your files will look like on the end user system.
This is really important because you don't know what that end user is going to have. You don't know what their directory structure is like. You don't know where their home folders are. you don't know if they're on a solaris machine a windows machine or of course a macintosh and so what you want to do is you want to set up your installer in a way where you're referring to things in a a magical way in a way where it determines what those folders are at runtime at install time we happen to call those things magic folders so as you can see here we have a bunch of files that were installing if you choose to take a file or a folder and you want to put it into a different location including ones for the Macintosh, including ones specifically for other platforms like Unix platforms, or as you can see here, we have some of the Windows platform locations on there as well. Or if you choose those here at the top, these are ones that are platform independent. So if you choose the desktop location, it will figure that out for whatever platform you're on, Mac OS Classic, Mac OS X, Windows, what have you. And if we talk about things like shortcuts or program folders, What those are is we call them aliases. Unix people call them symbolic links.
But basically what you can do is you can specify, you can say, I want to install my shortcuts into wherever the default location is for that operating system. So when I go ahead over here to my platforms tab, I can see that, for instance here, for Windows we have the default location for shortcuts go into the programs menu. But on Mac OS, the default alias location is on the desktop. Now you can choose this independently for each platform.
One additional thing, before we go back to Michael here, is the idea that you do sometimes have files, as we all know, even Java applications occasionally have something that you might need to add in, which is platform-specific. Maybe it's a runtime library or it's some kind of a launcher or something like we talked about before. Well, I can take any file here and I can add a rule to it by simply clicking on the Rules tab here saying Check Platform. Now, if I only want that application to install on Mac OS and Mac OS X, I do that. And now this file here will only install on those platforms, allowing you to build, again, one single installer, which will run on all platforms for all languages around the world. So let's go ahead. I'm going to show you one more thing over here. Leave it right here because I actually want to point out one thing.
The interesting thing about developing with InstalningWare, what makes it so easy, is when you do add your files in, It's basically a what you see is what you get type of environment. And that's why I've switched over here to the list view. If you look at the two views, you'll see that although some of the things might be out of order because of the ordering, the sorting, what you see is what you get. They're basically the exact same. If you drop down com, you'll see they look exactly the same in between. And that's really important so that you know that it's going to be laid out in the designer is exactly what you're going to get on the destination system. Great. Now, we also talked about the idea that you can build this single installer for all platforms. And as we know, the premier platform out there has Java included with it, but not all platforms out there are as well full-featured, let's say, as Mac OS X. So on some of those other platforms, what you might need to do is bundle a Java virtual machine.
So if I click on my build screen here, I'll see a list of platforms with the option for you to include a Java virtual machine. Of course, not necessary for Mac OS X, but for these other platforms, you might want to say that I'd like to select a Java virtual machine which will be used for my installer and for my application. We call these VM packs. And Install Anywhere is the only solution for these platforms which allows you to install the Java VM, run your installer, and do all that from an uninstalled Java virtual machine. Basically meaning you don't have to bootstrap it, you don't have to worry about your users if they have Java installed or not. Install Anywhere takes care of all those details automatically for you.
Now, let's go back over to this side here, and we've done OfficeSuite. I'd like everybody to see, could you run OfficeSuite, and just so we can see what kind of an interesting, say, classic version we have there? Absolutely. I do want to point out two things before we go to that. You do have the opportunity to provide an install log for the end user, which you can do in plain text or XML. And something that's a little unusual on Mac OS, you automatically get, if you desire it, an uninstaller. so that once, if they choose for some reason, unbeknownst to you, that they need to take your application off the system, that's supported, and it will remove everything that was installed. Let's go ahead and launch Office Suite. It is a Java application. As you see, it has a launcher. This launcher was actually created automatically through Install Anywhere, and we would have created a platform-dependent launcher on whatever platform you're installing to. On Mac OS, it actually uses a MRJ app builder derivative. So we go ahead and we are at version 9.1, and you see it comes up, and it's got a very classic look and feel. And I, as a Mac OS X user, am just not very happy about that, so I've contacted my vendor. And I'm the vendor. So I happen to have added Power Update to the application. Now, on the screen over here, what we're seeing is the Power Update management portal. This is the developer portal. This is what you use to keep track of your applications. So I see over here on what is called the products overview page, this is the power update page.
I see a product that I'm managing using power update, and I've added a number of different versions here. This version number 10, 10.0, is the one that is current. It's the newest one that's out there. Now, I have said that that's the newest one, but Michael has installed a previous version maybe from CD-ROM or wherever he got that from. And we're going to show in just a second how we can get him updated to the new version. Before I do that, I again want to point out to you that what this is running on, the way that you control this is through a web browser. The interface for managing power update is all done through the web, and the server is a Java-based server that we're also running on this machine here. It entirely can run that machine without a problem.
Now, you may be wondering, well, how can I try this out, and how can I actually get going with this? because I don't want to have to set up the server. Well, you can also use Power Update through our hosted site, which allows you to do it without having to set up the server, where we manage this for you. You still use the interface, but we run that for you. Now, don't check for updates yet. Well, you can. I'll just tell you you don't have an update yet. But I'm going to go ahead in here, and I'm going to take version 10 and show you what we're going to do. Now, you wouldn't see this, but a developer would see this. I have in here information about what that new version is. I've identified the new version with a name. This can be anything you want. It does not have to be a version number. I can go ahead and specify some information about that version. This will be displayed to your users when they check for updates, if there is an update, before they get their update.
So maybe you'd like to actually tell them what the new features are. So one of the things I'm sure he's going to be happy about is that we've added a new Aqua look and feel to this. So we'll get that in a second. Now, Power Update uses something called a sequence number. That's how you keep track of what the version is that's live or the next version. Sequence number is a real number, a decimal number. It's just basically you can, it doesn't even have to match to your version numbers. In this case, we have matched to the same thing. And you have a bunch of different types of updates that you can do. We can do things like install a single file. You can update several files, which are packaged into zip and with support coming for the old style Mac files, the resource files, et cetera, will be coming as well. or you can run an executable. Why would you want to do that? In the event, for instance, that you want to reconfigure your application or add an entirely new feature.
the next section here is where can i go and get those updates from this one here says where am i going to go and deliver those updates to to the end user and is that version live now i've already made this version live here so let's go back to our overview and we'll see that that version is live version ten user could you please go check for updates so it's very clean simple interface there's actually several different interfaces that you can do you can actually hook up uh... power update directly into your application and run it silently in the background every time you launch your application for instance or as we do in install anywhere you can add a check for updates pull down menu.
So what I'm going to do is I'm going to go ahead and connect to the server it's giving me feedback as to what's going on. Oh, sorry. And there is a new version of Office Suite available with Aqua, excellent. Click next. and it's been successfully updated. So if I go back and I launch Office Suite, let's see if this has worked.
Excellent. From ACO S10. Excellent. And lo and behold, we've given you a little surprise. We also updated your toolbar there with the new Aqua look and feel for Office Suite. For those of you wondering, Office Suite is just a demo application. It actually is not a real product. But if you try installing it anywhere, it does come with it, so you can play around with doing that. OK, so that's our demo. I did want to leave you with one thing, a final thought.
I'm actually not going to be able to do it because it's licensed. Oh well. Oh well, you won't be able to show the Easter egg that's built into the install anywhere. I have a very interesting Easter egg that I had written especially for this. But if you stop by our booth, we'll be giving demos. We're here until the end of the day today. And in addition, you can get more information at our website, www.zerog.com. Thanks a lot, everybody. Thank you. I'm going to go ahead and invite Metrowerks up here and give you a demo of the latest Code Warrior tools.
I'm Ravi Kurupati and Serge Bergkamp. We are the Java team in Metrowerks. As everybody knows, 95% of the people on Macintosh are core warriors. And we would like to actually have the Java supporting core warrior as much as we can. But in the previous release of Core for Java, when we released it, we had public beta. And then we made sure that our tools work on public beta. But the previous version of Java 6.0, all the support is not there on OS X. So what we have here in Early Access is all the Java support functionality on OS X. So all the Java RAD stuff, we got it working on X. And the Java debugger performance is much improved now. So it's far better than what we had in OS 9. So there are a lot of improvements in the Early Access. And Serge will go through the technical details. and he will go through a quick demo, so as we have last time. OK.
Hello, my name is Serge Beauchamp. I'm working for Metroix as a software engineer. I've been working on the RAD tools and the IDE over the past few months. I'm going to show you the new RAD tools that we have running on OS X. I'm going to go quite quick on the slides because we don't have much time left. But basically, the new RAD tools are a very big improvement over the tools that we had on OS 9 too and on OS X. So you can expect much better debugging time and full Java 2 support. We have a full suite of developing tools, including a text editor, debugger, compilers, file compare tools, class browser that I'm going to show you right now. So this demo, you're going to have to use the Java DP1 update for being able to run it. And unfortunately, you're going to have to grab a Java patch from the Metrowerks website with the LXS CD that you just got in the bag. Because we've been doing a few last minute fixes to make this run. OK, so I'm going to show you a little a little rad demo. So we've been adjusting for Aqua all the MetaWorks IDE. And how many of you guys have been using the MetaWorks tools for developing before?
Okay, so yeah, I think most of you guys already know how it works. So I have this layout editor here and what I did for this little demo is I built a jar file with the Java 2D demo from Sun. So I just built the jar file and I included the jar file and the component catalog here. So when I click on it, it lists all the files, all the classes that I can include in the layout editor. out.
So for example, if I drag any of them, it may do something useful and may do something not as useful, depending on what the class really does. So this is run at runtime, so the command has the opportunity to do whatever it wants. So what I'm going to do for this demo, I'm going to use a class that I already know, which is called Rotated3D.
and edit it right here. I'm gonna set the name of it to, for example, Jimbo. And... I'm going to drag a button here. And the label of it, we're going to put start. And-- another button, which is going to be stop. And I'm going to have two lines of code for making this demo work. And the action perform of this component, I will say Jimbo start. And this guy, I'm going to do Jimbo stop.
So that's pretty much all of it. And I'm going to run it. So the code wires generate automatically the jar file, and it creates automatically the MRJ app builder application in the Finder. So it can be double clicked automatically. So here I have the debugging window. So I can put breakpoints in the source file.
So the Java application starts. And we are using the terminal application for running the Java application. So if you have a console application and you want to put some user input from the console, you actually do it from the actual terminal. So you have the exact feedback that you would run it through the terminal. So I can step here. And as you can see, this kind of performance was just a dream on the OS 9 and came just for free on the OS 10.
there's a little demo so I can put start and stop and start there it is So inside our tools, we have the class browser, which is very useful, especially for Java code. So you can inspect all your classes and all the methods there is in it. So you can, for example, edit just a simple method.
in it. You don't have to view all your source file at the same time. You can just inspect a small portion of it and there's a little wizard that you can use to add actually a new big method or add a class to it. So it's all done automatically and all generated source card for it. There's also all the usual Code Warrior tools that you can find in it and you can use for Java. There's the file compare tools that is very useful. And actually, some of our customers are using-- I've been told are using-- or Java tools only for the file compare functionality of it. So I can show you a little bit what it does. Just puts an evil modification in it so it can break. And-- I just select open. I can compare directories, or I can compare files. And it shows the modification.
and I can merge them or not like that. So it's very convenient. Also, you can build directly GNI application within CodeWar if you have the SQL tools with the same environment. You have your design application here that you can inspect all the classes. And basically, we have 15 seconds left and that was our demo for today. We will have a presentation at the Civic Center, so if you can come by and that's your presentation with that or still that will give you more information about the tools thank you Thank you.