Welcome!

Java IoT Authors: Liz McMillan, Elizabeth White, Yeshim Deniz, Zakia Bouachraoui, Pat Romanski

Related Topics: Java IoT

Java IoT: Article

Java and The Mac

Java and The Mac

When Java Development tools initially appeared on the market, Mac programmers were some of the last people to have tools available to them. While Sun chose to release the JDK for most popular platforms, it waited quite a while before releasing the MacJDK. A variety of third party developers began to release Java development tools, but they too have decided to wait before releasing tools for the Mac programmer. Fortunately, there are options open to the Mac programmer now, but these options are nowhere near as vast as those options open for users of Windows95 or UNIX platforms. General resources related to MacJava are also few and far between. Before I send you running from your Mac, it should be stated that the situation is no longer as bleak as it once was. There are currently development tools available from many companies, and more have been announced; there is also a large amount of published information available. You should keep in mind however, that while it is important to have platform specific resources, Java is extremely portable, and almost all information resources are helpful.

There are three available compilers for the Mac. These are Sun's JDK, Symantec's Caffeine, and Natural Intelligence's Roaster. The decision to include Caffeine in that list was actually debated over. While it does allow a programmer to develop in Java, it is not really a compiler. Rather, it is a GUI front-end for Sun's JDK.

Sun's JDK is comprised of two components: a Java compiler, and also an applet runner. It is not an Integrated Development Environment (IDE), and requires the use of a text editor like BBEdit, or SimpleText to create source code. BBEdit is an incredible text editor. While it does not support syntax coloring, it does offer automatic indentation and code balancing. Caffeine is a free upgrade to owners of Symantec C++, and adds some nice features to the JDK. These include a project manager, a scripted interface to the JDK, and Java specific syntax coloring.

The JDK is a nice product, and the Caffeine/JDK team is even nicer. Currently the JDK is the only Java compiler to offer full networking and audio support. It also will run on 68k machines, which Roaster will not. While Natural Intelligence will offer all of these features in the next version of its product, at the time that this article is being written there is no support for these features.The JDK does have its problems however, and since it forms a backend to Caffeine, both products share these problems. Starting out, the most obvious problem is related to speed, or rather complete lack of speed. Compiling with the JDK (even for small projects) is a long ordeal. Developing with the JDK often takes so long that before byte code is ready, one not only has time to brew Java, but also to finish a pot or two. To demonstrate this problem with speed, I wrote a simple applet which prints a message to the screen. The applet is only twenty-four lines long, and imports java.awt.Graphics, java.awt.Font and java.awt.Color. Time to generate byte-code with Roaster running on a PowerMac 6100/66 with 16 Megs of RAM (plus RAM doubler), and system 7.5.3 is 9.853 seconds, while to compile this same source with the JDK I waited 12.500 seconds. This time difference, while relatively small, grows exponentially as the size of applets grow. Note that times were based on the average of twenty human timings.

Without the addition of Caffeine, one is also forced to suffer from the lack of a real interface. In addition to allowing for a more pleasant interface, a GUI brings tools like a project manager, which is invaluable when working on large projects. Natural Intelligence has provided an excellent project manager in Roaster. The tool supports full drag and drop, and also presents a pop-up-menu with all file methods next to its entry in the window. One advantage the JDK has over other tools is its price. It's free!

What is really helpful when working with the JDK is its ability to open source code into a configurable text-editor. Not only will it open your source, but it will drop you on an offending line of code. This is really helpful, especially when using editors which don't use line numbers. While it is nice that an editor can be configured to run with the JDK, development is hindered by the fact that there are no text editors which support syntax coloring. Rumor has it that the next version of BBEdit will offer this ability.

While Symantec chose to develop a GUI front-end to the JDK, Natural Intelligence, on the other hand, chose a different path. The application which they put out is totally their own. The application incorporates two Java compilers with a suite of development tools into a full GUI. The reason for two compilers is that in addition to bundling a speedier version of Sun's javac compiler (the compiler which ships with the JDK) they also wrote their own compiler. Both are PowerMac native, but as of DR1.1 only the javac compiler is recommended. Natural Intelligence classifies their compiler as "icky", and while I am not too sure that I would choose this word, I would definitely agree. It often gives odd errors, or will completely crash when attempting to compile an applet. Their version of the javac compiler is not perfect either; it is definitely much faster than Sun's version, but is less descriptive when reporting errors in one's source. There are trade-offs to using Natural Intelligence's compiler, but I rarely find that it is worth it to give up speed for more verbose error messages.

Roaster's text editor, shown in Figure 1, is based on Natural Intelligence's QuickCodePro. This version of their already popular text editor is an excellent environment to develop in. It supports a full suite of utilities including various search functions, a balance checker, multiple clipboards, and custom macro support. There also was much thought put into human-computer interface, as all functions are accessible via fully customizable tool bars, and keyboard shortcuts.

I find that when I am unable to find an error, Roaster and the JDK, in combination with each other, provide for a healthy relationship. I usually write all of my code in Roaster. If I have troubles debugging the code, I run it through Sun's compiler. As far as debugging is concerned, Roaster does incorporate a source-level debugger. This is somewhat helpful, but does mean that you must deal with interpreting byte-codes. It is still nice though, to be able to step through an applet while it is running.

Of all the current options available to the Mac programmer, Roaster does look to be the most promising. DR2.0 will be packed with all the features which 1.1 is missing, and it will definitely become an excellent product. Natural Intelligence reports that they were able to speed the product up even more, making Roaster the speediest Java compiler available for the Mac. Soon after DR2.0 is released, Natural Intelligence will be releasing a different product titled RoasterPro. Among other enhancements, this product will allow programmers to compile Java into code native to a multitude of platforms. Also look for a Windows version of Roaster in the Fall.

More Stories By Luke Cassady-Dorion

Luke Cassady-Dorion is currently finishing his degree in computer science at Drexel University in Philadelphia, PA. Additionally he heads up Java Development for Odyssey Systems Corporation in Manayunk, PA.

Comments (0)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


IoT & Smart Cities Stories
The deluge of IoT sensor data collected from connected devices and the powerful AI required to make that data actionable are giving rise to a hybrid ecosystem in which cloud, on-prem and edge processes become interweaved. Attendees will learn how emerging composable infrastructure solutions deliver the adaptive architecture needed to manage this new data reality. Machine learning algorithms can better anticipate data storms and automate resources to support surges, including fully scalable GPU-c...
Machine learning has taken residence at our cities' cores and now we can finally have "smart cities." Cities are a collection of buildings made to provide the structure and safety necessary for people to function, create and survive. Buildings are a pool of ever-changing performance data from large automated systems such as heating and cooling to the people that live and work within them. Through machine learning, buildings can optimize performance, reduce costs, and improve occupant comfort by ...
The explosion of new web/cloud/IoT-based applications and the data they generate are transforming our world right before our eyes. In this rush to adopt these new technologies, organizations are often ignoring fundamental questions concerning who owns the data and failing to ask for permission to conduct invasive surveillance of their customers. Organizations that are not transparent about how their systems gather data telemetry without offering shared data ownership risk product rejection, regu...
René Bostic is the Technical VP of the IBM Cloud Unit in North America. Enjoying her career with IBM during the modern millennial technological era, she is an expert in cloud computing, DevOps and emerging cloud technologies such as Blockchain. Her strengths and core competencies include a proven record of accomplishments in consensus building at all levels to assess, plan, and implement enterprise and cloud computing solutions. René is a member of the Society of Women Engineers (SWE) and a m...
Poor data quality and analytics drive down business value. In fact, Gartner estimated that the average financial impact of poor data quality on organizations is $9.7 million per year. But bad data is much more than a cost center. By eroding trust in information, analytics and the business decisions based on these, it is a serious impediment to digital transformation.
Digital Transformation: Preparing Cloud & IoT Security for the Age of Artificial Intelligence. As automation and artificial intelligence (AI) power solution development and delivery, many businesses need to build backend cloud capabilities. Well-poised organizations, marketing smart devices with AI and BlockChain capabilities prepare to refine compliance and regulatory capabilities in 2018. Volumes of health, financial, technical and privacy data, along with tightening compliance requirements by...
Predicting the future has never been more challenging - not because of the lack of data but because of the flood of ungoverned and risk laden information. Microsoft states that 2.5 exabytes of data are created every day. Expectations and reliance on data are being pushed to the limits, as demands around hybrid options continue to grow.
Digital Transformation and Disruption, Amazon Style - What You Can Learn. Chris Kocher is a co-founder of Grey Heron, a management and strategic marketing consulting firm. He has 25+ years in both strategic and hands-on operating experience helping executives and investors build revenues and shareholder value. He has consulted with over 130 companies on innovating with new business models, product strategies and monetization. Chris has held management positions at HP and Symantec in addition to ...
Enterprises have taken advantage of IoT to achieve important revenue and cost advantages. What is less apparent is how incumbent enterprises operating at scale have, following success with IoT, built analytic, operations management and software development capabilities - ranging from autonomous vehicles to manageable robotics installations. They have embraced these capabilities as if they were Silicon Valley startups.
As IoT continues to increase momentum, so does the associated risk. Secure Device Lifecycle Management (DLM) is ranked as one of the most important technology areas of IoT. Driving this trend is the realization that secure support for IoT devices provides companies the ability to deliver high-quality, reliable, secure offerings faster, create new revenue streams, and reduce support costs, all while building a competitive advantage in their markets. In this session, we will use customer use cases...