Category Archives: Java

Obtener JAVA_HOME mediante jrunscript

Para poder automatizar ciertas tareas nos puede interesar poder obtener el JAVA_HOME de la versión que tengamos instalada de java. Vamos a ver como podemos hacerlo mediante jrunscript:

jrunscript permite ejecutar javascript, por lo que simplemente deberemos obtener el valor de java.home y imprimirlo:

# jrunscript -e 'java.lang.System.out.println(java.lang.System.getProperty("java.home"));'
/usr/lib/jvm/java-7-openjdk-amd64/jre

Podemos ver un ejemplo de uso en el modulo de puppet eyp-tomcat para realizar la instalació de la tomcat native library:

    exec { "configure native library ${srcdir}":
      command => 'bash -c "./configure --with-apr=/usr/bin/apr-1-config --with-java-home=$(dirname $(jrunscript -e \'java.lang.System.out.println(java.lang.System.getProperty("java.home"));\'))"',
      require => [ Package[$tomcat::params::develpkg], Exec["tar xzf native library ${srcdir}"] ],
      cwd     => "${srcdir}/tomcat-native-library/jni/native",
      creates => "${srcdir}/tomcat-native-library/jni/native/Makefile",
    }

Tags:

Microsoft and Azul Systems say Zulu Embedded will encourage IoT in Windows

internet of things farmingAzul Systems and Microsoft are to give Java developers open source development tools, device I/O libraries and a Java runtime targeting Internet of Things (IoT) applications on Windows 10.

The two vendors have created Zulu Embedded for Windows 10 IoT, which is a Java Development Kit (JDK), Java Virtual Machine (JVM) and a set of device I/O libraries. The libraries are based on OpenJDK, which has been certified by Azul for use with Windows 10 IoT Core and is compliant with the Java 8 SE specification.

Microsoft Windows 10 IoT Core, is a modified version of Windows 10 that has been tailored to suit cheap, small-footprint embedded devices such as those based on Raspberry Pi 2 and Minnowboard Max.

The aim of the partnership is to ensure Zulu Embedded meets Java development and runtime requirements for Microsoft’s IoT initiatives. The success of the joint effort will be gauged by the number of Java compatibility updates, security patches and the levels of support for additional IoT device connectivity, control and communication, according to a joint statement.

There are Java developers around the world using Windows 10 IoT core, according to Steve Teixeira, Director of Program Management for the Windows Internet of Things team at Microsoft. These new initiative means they will be assured of a high-quality foundation for their Java projects if they use the latest advances in OpenJDK.

“Developers have many development and deployment choices for their IoT applications,” said Teixeira. By giving them more support, they are more likely to stay in the Microsoft cloud camp, he said. “Microsoft and Azul have made it easy for those who prefer Java to build premier IoT devices running Windows.”

Azul Systems is committed to updating and evolving Zulu Embedded to meet the specific requirements of Microsoft’s IoT platforms, said Scott Sellers, CEO of Azul Systems.

Zulu Embedded for Windows 10 IoT is free to download and use and may be distributed without restriction.

Three App Strategies for Document Collaboration, When To Use Each

When you have a document or file which needs editing or updating by more than one person, in more than one place, controlling the process to avoid the dreaded “intervening update” problem can be a challenge.

In the early days of personal computers the answer was often the “sneakernet”. Create document or file, write to a diskette, put on your Chuck Taylors and walk it to your collaborator, then get it back the same way. Later, LAN technology allowed the file to be placed on a local server and opened across the LAN for editing, with a lock on the file at the server while editing is being performed. When needing to get beyond the local LAN email attachments could be used, or FTP if you had a pre-Web internet connection. Management of “check-in/check-out” and  resolving update conflicts was done by humans, not software.

Sounds like the stone age now, but it beat printing a document and editing with a red pen.

The advent of the Web and its browsers, along with widespread, always-on internet connectivity brought new opportunities for using that connectivity and various software design strategies to support collaboration.

There are three essential design strategies for addressing the problem: pure web app (think Google Drive, née Google Docs),  file syncing (think Dropbox), and local editing with central locking (think MS Office+Web Folders/WebDAV). Each has its pros and cons, and which approach will work for a given task depends on factors like file type, file size, editing feature set, and client platforms supported.

The Pure Web App Approach

A real web app runs in a browser using javascript and (more and more often) HTML5. This approach in theory can support any device that has a modern browser, including tablets and smartphones, as well as Macs, Windows PCs and Chromebooks. Perhaps the premier example of this approach is the applications available in Google Drive. Simple documents, spreadsheets, presentations, and drawings can be created, edited and shared easily. Collaboration is as close to instantaneous as networking technology allows. Documents are always in synch. The first time you co-edit a word processing document with a colleague on the other side of the world, and you see  edits in real time, you should pause for a moment and marvel at how amazing this technology is.

That’s the good. The bad includes:

  • Google buy-in (or buying into some other platform).
  • Limited document/file type support. Although you can now upload and download any type of file to Google Drive, you have to convert to a Google format to edit online. You won’t be editing Quickbooks files, for example.

This is using Google as an example. There are other services using the web app approach. SkyDrive from Microsoft for example, or Quickbooks Online from Intuit. The bottom line is all these online apps have limitations, never mind cost (Quickbooks Online costs between $12.95 to over $70 per month).

The File Synchronization Approach

File synchronization apps like Dropbox work by running applications on all your devices, with a special folder that communicates with their servers to propagate new and updated files to other devices. This works well when the only person involved is you, and you have multiple devices (work desktop, laptop, home PC, and sometimes mobile devices). Another plus is the ability to synchronize a wide variety of file types. Each device that will be used to edit or update a file or document will need the appropriate application installed on the device, and all copies or versions of the aforementioned application must be able to handle the internal format of the particular file. For instance, Quickbooks file formats for Windows and Macs are incompatible.

The typical problem for apps using the file synch approach is lack of “file locking” to keep two people from updating a file at the same time. Some file sync apps attempt to resolve intervening updates but usually with little success.

The Local Editing With Central Locking Approach

Server-based file locking apps keep the file on a central server, and use specialized server plus client applications to do the following each time a file needs to be edited or updated:

  • “Lock” the file on the server to tell other copies of the special client application that the file is “checked out” for update by someone else.
  • Download the file to a client application on a PC, Mac, or other supported platform (usually as a “temp” file).
  • Open the correct application for editing.

After editing the process is reversed:

  • File is saved locally in the temporary location.
  • File is uploaded back to the central server, where it replaces the old copy.
  • The “Lock” is removed so other users can take their turn at editing.

It is also a good idea for this approach to offer a “View Only” or “Read Only” copy of a locked file for others to look at (but not edit).

An early example of this approach is WebDAV (DAV stands for “Distributed Authoring and Versioning”). Microsoft refers to its WebDAV support in Windows as “Web Folders”, and supports locks and editing in Office applications such as Word and Excel. The problem with WebDAV and Web Folders is that virtually no other applications other than Office have implemented support for WebDAV locks.

A more general application that can support almost any file type while also supporting central file locking is available from My Docs Online via their java-based Desktop App. The Desktop App uses a “Lock & Open” to lock the file on the central server, downloads the file to a temporary location on the PC or Mac, and then launches the right application based on the file extension. When the editing session is complete the file is saved and closed locally, and then the user does a “Save & Unlock” in the Desktop App to send the updated file back to the server and release the lock.

The ability to support virtually any file type is a strong benefit of this design.

Potential issues with the approach include “network latency”. The bigger the file the longer it takes to download and open the locked copy, or sent it back to the server. The use of Java brings support for multiple operating systems, including all versions of Windows or Mac OS X, but does require Java be installed and kept up to date on the machine.

Choosing an App Whose Design Strategy Meets Your Needs

Which approach will work best for you? It depends on particular needs, and you may need more than one solution depending on particular file types or business processes involved.

If you and all your collaborators already have Google accounts, and if the goal is collaboration on a reasonably basic document or spreadsheet, it’s hard to beat Google Drive. If you mostly use Office, then SkyDrive might be a good fit, and so on. Consider a two-step approach, where, as an example, you use Google Drive to do the early drafts of a document when collaboration needs are heaviest, and then export to a more powerful desktop application for final production.

If your collaboration needs don’t require editing by multiple people, but mostly involve pushing updated versions of files and documents for viewing and reviewing, then a file synchronization app like Dropbox could work well.

If you are using specific file types like Quickbooks, CAD, as well as Excel, Word, or OpenOffice formats, and you need to let multiple people in multiple locations edit without fear of wiping out the edits of a colleague, consider an application like the My Docs Online Desktop App.

VMware Sells Some WaveMaker Assets to Pramati

Pramati has acquired certain assets of WaveMaker from VMware. WaveMaker, acquired by VMware in March 2011, is a visual Rapid Application Development (RAD) software platform that will be used to grow and enhance Pramati’s cloud-based Java development capabilities. Terms of the transaction were not disclosed.

WaveMaker simplifies the process of building enterprise Java applications to boost both developer productivity and quality, without compromising flexibility. WaveMaker applications are cloud-ready, highly scalable, multi-device, and backed by a strong developer community that has doubled to 35,000 active monthly users over the last two years. With its long heritage of mission-critical Java application development, Pramati expects to accelerate this growth going forward.

“The acquisition of WaveMaker is integral to Pramati’s ongoing strategy to efficiently bring together skills, capital, customer relationships and leading technologies that can quickly take advantage of market opportunities,” said Vijay Pullur , President of Pramati. “WaveMaker elegantly enhances our existing Java and cloud development capabilities. Over the years, Gartner and other respected voices have recognized us as a leader in Java technologies. The WaveMaker acquisition uniquely allows us to extend our leadership, while extending the reach of Java to non-expert developers and users.”

WaveMaker uniquely helps its users build standard enterprise Java applications using a visual drag-and-drop paradigm that streamlines development time, significantly reducing written code.

“WaveMaker was designed to bring high-quality Java applications to market quickly and efficiently,” said Charles Fan , senior vice president of R&D, Storage and Application Services, VMware. “Pramati is an established technology company with expertise in cloud and Java technologies. We are delighted that WaveMaker customers are in good hands.”

The addition of WaveMaker underscores Pramati’s support for Java standards in the cloud computing era. The Pramati portfolio of companies includes SocialTwist, a social referral marketing platform focused on customer acquisition and retention, and Imaginea, a technology services company that offers advisory, strategy, product development, and implementation services.

jClarity’s Censum, Waratek’s Virtualization Combined for Java Analytics

jClarity’s Java analysis tool Censum will be integrated with Waratek’s virtualization technology, providing its customers with operational insight into Waratek’s Java Virtual Machine (JVM) and cost savings.

Founded by leading Java experts, jClarity’s debut product jClarity Censum offers Java analytics and insight for developers as opposed to solely supplying raw data. Censum locates Garbage Collection (GC) performance problems and advises how to fix them in an easily comprehensible manner. Launched in December 2012, jClarity Censum has already been hailed as ‘technology you can’t and won’t miss in 2013′ by Nerdability.

The Waratek CloudVM for Java allows enterprises, data centres and providers to run Java in the Cloud with genuine multitenancy, addressing serious incompatibilities that have previously undermined Java’s place in this new computing space.

“Waratek’s technology represents a significant step towards reducing data centre footprint & increasing application density, both of which are hugely important in today’s market conditions” says jClarity’s CEO Ben Evans. “By adopting the combination of Waratek & jClarity, IT departments can feel confident that they can realise cost savings whilst still fully understanding their production plant.”

Inefficient Garbage collection can affect application performance, using Censum to monitor live application behavior can bring enhanced performance and cost savings to the Cloud” says Waratek’s CTO and Founder John Matthew Holt. “The use of Censum with the Waratek CloudVM for Java, provides a seamless and cost effective way to host elastic multitenant Java applications with fine-grained performance metering and control.”

jClarity Launches Java Optimization Tool

Java startup jClarity just  unveiled their first analysis tool, jClarity Censum, designed to assist developers with Java issues.

Founded in 2012, jClarity is a London-based tech start-up that creates intelligent products to optimize Java.  The company is headed up by Java technologists and regular conference speakers Ben Evans, Martijn Verburg and Kirk Pepperdine.

jClarity Censum is the team’s initial product, offering analytics and insight as opposed to solely supplying raw data. The program defines Garbage Collection (GC) performance problems in plain English and advises how to fix them. GC is a difficult, specialized area that can be very frustrating for busy developers, devops and operations teams. Easy to install and use, jClarity Censum delivers the parsing, number crunching and statistical analysis in order to solve GC performance issues and provides solid recommendations to act upon.

Through jClarity, we want to build products and services that truly bring change to the Java / JVM landscape and Cloud performance space” says CEO Ben Evans. “Censum advises developers what to do when Java falls over in an easily comprehensive manner, removing the need for a PhD in Computer Science.”

jClarity is backed by Aimar Capital, a technology-based venture capital fund based in London and New York.

jClarity Censum is available to download at www.jclarity.com for £595 per user per year.

Citrix Fosters Innovation with Investment in Cloud Startup CumuLogic

Citrix Startup Accelerator, a corporate initiative investing in early stage startups, today announced an investment in CumuLogic, an innovative new Cloud Application Platform software provider that enables enterprises, cloud providers and ISVs to develop and deploy Java applications in public, private and hybrid cloud environments.

Focused on entrepreneur-led innovation, the Citrix Startup Accelerator program provides seed investments, office space, and mentorship to select startups from around the world, enabling them to benefit from the global Citrix presence, its entrepreneur-friendly environment, large customer base and seasoned go-to-market strategies. The IT landscape is in a period of dramatic change, shifting expectations, and transformational new computing capabilities. As mobile workstyles and cloud services redefine the technology landscape, many of the best ideas will come from innovative startups with the flexibility to approach programs in entirely new ways. The Citrix Startup Accelerator is designed to tap into the innovation of most promising of these entrepreneurs, while helping them come to market successfully.

CumuLogic was selected by Citrix because of its unique ability to bridge between traditional datacenters and clouds at the application level. As a result, enterprises and cloud providers can begin deploying enterprise-class applications in cloud environments today, without waiting for all the development standards to evolve and mature. By transforming virtualized environments and Infrastructure-as-a-Service (IaaS) clouds into a high-value Platform-as-a-Service (PaaS) cloud, CumuLogic technology simplifies the development, deployment and runtime management of mobile, web and enterprise applications in public, private and hybrid clouds.