03.08.2020

Wrapping Jar With App Mac

Wrapping Jar With App Mac 4,3/5 7213 votes
  • WrapperJarApp Integration (Windows)

App Wrapper takes care of adding the required App Store properties, creating high resolution icons, code signing the application and its components, correcting the permissions, placing the app.

WrapperJarApp Integration (Windows)

The fourth and final method is to use the WrapperJarApp helper class to launch the application. This is another simple way to integrate with the Wrapper when the application is already configured to run as an executable jar.

There are some things to be aware of when using this method, however. When the Wrapper shuts down the JVM, there is no direct call to an application requesting that it shuts down cleanly. Rather, the Wrapper will exit the JVM by calling System.exit() from within the JVM. If the application has registered its own Shutdown Hook, it will be invoked, giving the application a chance to shut down cleanly. If, on the other hand, a Shutdown Hook is not registered, then the application will suddenly exit like when pressing CTRL-C in the console (command window). Both cases, with and without a Shutdown Hook, provide the exact same behavior as if the application was running without the Wrapper.

When integrating with this Method 4, the WrapperJarApp helper class replaces an application's main class. This gives the WrapperJarApp class a chance to immediately initialize the WrapperManager and register the JVM with the Wrapper. The WrapperJarApp class then manages all interaction with the Wrapper as well as the life-cycle of an application. When the Wrapper sends a start message to the JVM via the WrapperManager, the jar's manifest is inspected and its configured main class is called. The WrapperJarApp creates a new ClassLoader, which is able to load classes from the executable jar as well as any other jar files referenced within its manifest file.

The WrapperJarApp helper class is told how to launch the application by passing the absolute or relative location of the executable jar file, followed by any additional application parameters to the main method of the WrapperJarApp.

This section will walk you through a detailed explanation of how to configure JBoss to run within the Wrapper. Most other applications deployed as executable jars can be integrated by following the same steps.

This tutorial will start with a clean install of JBoss. We used JBoss EAP 7.0.0, so the exact steps may be slightly different depending on the exact version installed. After downloading JBoss, extract the files somewhere. In this tutorial we will use the folder D:JBoss. Then create the following folders:

Installing Wrapper Files

After downloading the Wrapper, extract the files somewhere, that will be referenced as {WRAPPER_HOME}. There are four directories which are required to be configured in order to be able to use the Wrapper.

First, copy the following files into the JBoss bin directory:

Rename the three batch files to reflect the name of your application. Be sure to remove the .in extensions so that the files all end with .bat.

(Depending on how your file explorer is configured on your computer, you may not be able to see file extensions.)

You should now have:

The wrapper.exeProfessional photoshop software for mac. file is the actual Wrapper executable. The three batch files are used to run JBoss in a console, and to install and uninstall it as a Windows Service.

These batch files should not require any modification. They do assume that the wrapper.conf file will be located within a conf directory one level up, ./conf/wrapper.conf. If you wish to place the wrapper.conf file somewhere else, then the three batch files will require appropriate modification.

Copy the following two files into the JBoss lib directory:

The wrapper.dll file is a native library file required by the portion of the Wrapper which runs within the JVM. The wrapper.jar file contains all of the Wrapper classes.

conf directory

The Wrapper requires a configuration file 'wrapper.conf' for each application. The standard location for this file is in a conf directory in the application's home directory. Copy the following template file wrapper.conf.in into the conf directory of JBoss.

Rename the file and be sure to remove the .in extension so that the file is named wrapper.conf.

You should now have:

If you wish to relocate the configuration file wrapper.conf, you are free to do so. You will need to modify the batch files copied into the bin directory above to reflect the new location.

The default configuration file wrapper.conf will place a wrapper.log file into the JBoss logs directory.

If you wish to place the wrapper.log file in another location, you will need to edit the wrapper.conf file and modify the wrapper.logfile property to reflect the new location.

The Java Command Line

The Java command line of an executable jar is quite simple. In the case of JBoss, you would simply go to the JBoss directory and execute:

Any arguments would be passed in as follows:

In order to use the above Java command line with the Wrapper, we need to break up the command line's components into a configuration file. Open the wrapper.conf file into an editor and make the changes below.

For all properties mentioned below, links are provided to their descriptions. Please take the time to review the descriptions of any properties which are modified. In many cases, there are further details on their usage which are not mentioned here.

Java Executable

First, extract the Java executable and assign the location path to the wrapper.java.command property:

Classpath

Next comes the classpath, which is configured using the wrapper.java.classpath.<n> properties. Java does not actually allow you to specify a classpath when running with the -jar parameter but this integration with the Wrapper works a little differently. The Wrapper requires that its wrapper.jar be specified in the classpath:

Main Class

When using the Wrapper and the WrapperJarApp helper class, Java is not executing the jar directly. It is necessary to specify the helper class as the main class of the application. The main class executed by Java when launched is specified by using the wrapper.java.mainclass property as follows:

Application Parameters

Application parameters are set using the wrapper.app.parameter.<n> properties. In this case, the command line to launch JBoss requires some application parameters. It is necessary to tell the WrapperJarApp helper class which jar to execute. This is done as follows:

Java additional Parameters

Java additional parameters are set using the wrapper.java.additional.<n> properties. Some parameters must be set for the JVM in order to start JBoss correctly.

Library Path

In order to use the Wrapper, one more property must be set. The Wrapper makes use of a native library to control interactions with the system. This library filewrapper.dll needs to be specified on the library path supplied to the JVM.

JBoss does not have any native libraries of its own, but if it did, the directories where they were located would also need to be specified. The library path is set using the wrapper.java.library.path.<n> properties.

Putting It All Together

Putting it all together, we get the following:

Notice, while these configurations will work correctly on our test machine, it is highly dependent on the directory structure and platform. By taking advantage of the fact that the Wrapper always sets the working directory to the location of the wrapper.exe file and by making use of a single environment variable, we are able to modify the above properties so that they are completely platform and machine independent:

(See:Windows Versions supported by Wrapper)

The final step is to set the Windows Service Properties. We will just set the properties which should be changed. But there are several others available, see the documentation for details on their usage. Suggested values for these variables are shown below.

The properties are set in the wrapper.conf file found in the conf folder from the Wrapper installation.

Trying It Out

JBoss can now be run by simply executing the batch file binmyJBoss.bat. Because of the way the Wrapper sets its current directory, it is not necessary to run this batch file from within the bin directory. Please try running the application once as a console application to verify the configuration before attempting to run it as a service.

The first time JBoss starts up, it will create its configuration files within the current user's home directory. Note that this will most likely be a different location when running as a service versus when running in a console window.

Congratulations, your application should now be up and running.

If you have any problems, please take a look at the Troubleshooting section for help with tracking down the problem.

Containerization is an alternative for full machine virtualization. You probably have heard of the well-known containerization technology from Docker[1] or Rocket[2].

In the case of Docker or Rocket, the container communicates directly with the operating system (OS) core without the need to deploy an operating system inside the container. Many containers share the same OS functions, which results in lower performance consumption used by the deployed containers and also the applications installed within these containers.

However, in this article, we want to discuss mobile “containerization,” which is used to isolate the mobile application from the mobile operating system or other applications installed on the same device. This type of “containerization” works in a different way.

Mobile “containers” behave similarly to an adapter pattern - a software design pattern that allows the interface of an existing class to be used as another interface. The container is not a box with an application in it. The original system calls from an application are rewritten to communicate not with the operating system library but a different library created by the container. Now, if you think that it is easy to hijack every application’s system calls that way, you are wrong. There are many applications that are uncontainerizationable. And if so, not every call can be hijacked.

Some apps just can’t be contained. One simple reason is that not all of their system calls can be intercepted.

As you can see, mobile “containerization” is not a real container. It's just an adapter between the application and the operating system, and it’s not even a perfect adapter. Let’s call it a wrapper.

What is a wrapper?

The wrapper is not a complicated thing. It is just another application which has a sole function of controlling other applications in advance. Unfortunately, wrappers usually require remote management via centralized management tools like Mobile Device Management (MDM) or Mobile Application Management (MAM).

We don’t have to tell you that MDM and MAM solutions cost a lot of money. To compound the issue, in many enterprise mobility use cases, MDM and MAM solutions simply don't work.

Then what are the benefits of mobile app wrapping?

Mainly protection of the OS and the user. Android and iOS operating systems limit applications from manipulating with some protected OS settings. For example, it is not possible to send an SMS from a 3rd-party application on iOS. You have to use a built-in app for that. iOS limits this feature, and no application can perform this action without manually confirming each SMS. Because of such a limitation, it is not easy for application developers to build an advanced application management system or peform other higher-level kinds of application manipulation.

Wrappers can do it.

Sometimes wrappers are used to protect an app from other apps installed on the same device. Sometimes they are used for better portability of the wrapped application and make life easier for app developers. It is true that this portability feature is more related to the wrapper than to a wrapped app. The reason is obvious. The wrapper hijacks most of the application’s calls, and it is the wrapper that communicates with the operating system.

The downside of app wrapping

1. As for security, app wrapping is not an option.

Security is not about relying on the security of the wrapper and letting the wrapper hijack the app’s system calls. Every company wants and demands secure apps. They don’t want another flawed application, additional tool to manage the wrapper solution or integration issues. A wrapped app has more demand on resources e.g. data storage, processor performance, etc. which impacts the user experience.

Security has to be integrated into the mobile app and become an inseparable part of the app.

2. But what about risks from other applications?

There is no way that the wrapper can prevent every access method from communicating with the wrapped application.

Attackers can hijack all application’s system calls in the same way the wrapper can. If the device is rooted (jailbreak on iOS), the wrapper can detect this and prevent the application from connecting to application's backend systems. However, it cannot prevent access to the application data already stored on the device.

It is simple. If the application doesn’t encrypt data-in-motion and data-at-rest, the data is vulnerable and available for attackers.

Alternatives to container and wrapper technologies

1. Android and iOS

The newly released functions from Google and Apple factories are probably more useful than wrapping. Both Android and iOS can separate applications or provide advanced control and manipulation features to maintain the security of the application and its data (Android for Work[3], Apple iOS 8 Enterprise[4] features).

2. Security-by-design

Are you familiar with the term security-by-design?

Why don’t we build a mobile app that doesn’t rely on other applications for security? Why not use a technology that provides ultimate security protection directly within the app and at the same time without impacting the user experience? Do you know how many people own old smartphones that do not have the capability to support advanced security protocols (e.g., TLS 1.2)?

All of us know and agree that we need to build secure mobile apps. However, pressured by the deadline, heavy workload, and lack of security awareness, it’s very tough to design, build and deliver a secure mobile app that has all necessary security measures.

It is time to rethink and retire with app containerization and wrapping[5].

What is a proper mobile app security technology?

  • Gives visibility into who is accessing and using the mobile app and the application backend to detect the bad actors
  • Integrates easily with actual mobile app
  • Speeds up data transmission
  • Shields the mobile application backend systems from any unauthorized access
  • Operates with millions of devices
  • Meets high availability demands
  • Creates secure private network regardless of the technology used for data transfer, endpoint devices

If you don’t know about such a technology, we do.

Learn more about the most comprehensive application technology for mobile apps by visiting our website or contact us and talk to our security specialists.

Jun 03, 2018  100 Home Design Software For Mac Australia House Electrical Home Design On The App Home Designer Design Software For Diy READ Table Tennis Ranking Points System. Best Home Design Software 2020 Top Ten Reviews. Jun 19, 2020  Object library - The best home design software packages include libraries of free objects, like furniture and fixtures, that number in the thousands. For more flexibility, look for home design software that supports importing even more objects from SketchUp, Trimble 3D Warehouse, or both. Mac home design software has all the tools you need to put your dream home down on paper, whether you want to build a brand-new house or renovate your existing one. This type of software can help you make detailed digital models of major landscaping projects and home remodels, and it lets you see how different wall coverings and upholstery look in new settings. Best house design software. Hoffman Weber House Design Software. Okay, you have to give this software 30 to 60 seconds to load. Once loaded, it’s pretty cool because there are many home exterior features you can customize. While you can’t upload your own photo, there are a good number of provided photos to choose from. You can customize the following: Roof shingles. Home design software free download - DreamPlan Free Home Design and Landscaping for Mac, Sweet Home 3D, DreamPlan Plus Home Design Software for Mac, and many more programs.

Reference:

  1. https://www.docker.com
  2. https://coreos.com/blog/rocket
  3. https://www.google.cz/work/android
  4. http://www.apple.com/ipad/business/ios
  5. http://mobile-mentor.com/why-containers-must-and-will-die
Jar file app

Additional reading:

Wrapping Jar With App Mac Pro

Most Recent Articles

4 Common Mobile Point of Sale (POS) Security Issues Affecting Retailers That POS Providers Need to Act On

As mobile point-of-sale applications and systems are picking up speed at retailers around the world replacing traditional one, they become appealing targets for cybercriminals allured by the amount of consumer data entered in POS systems whether through unauthorized access, mobile malware or hacking the backend.

security mobile pos

Published on January 03, 2017

Who is Responsible for Securing the Connected Car?

Jar apps download

The automotive industry recently witnessed several cases of cyber-hacking that made driving connected cars dangerous if not impossible. Companies like Jeep, Volkswagen, and Tesla all have recently dealt with cases of hackers taking over cars and stopping them while the cars were in use as well as stealing customers' Social Security numbers, financial details, and other sensitive information.

automotive security v2x

Published on April 04, 2017

Future of the Automotive Mobility and Data Security

Mobility has always been at the cutting edge of human innovation and technological advancement. This is unlikely to change in the foreseeable future. Already, mobility as we know it is seeing significant disruption thanks to the entry of nontraditional players who are leveraging the power of computing devices and the Internet. But few things are likely to have a bigger impact on mobility than the enormous volumes of data that will be generated as a result.

automotive security v2x

Published on February 10, 2019