Bluemix: Is it possible to change app runtime settings (JVM, environment variables)? - ibm-cloud

does Bluemix allow to change app runtime settings (JVM, environment variables)?
-thanks in advance

Java applications are run in a Java runtime environment (JRE) that is provided and configured by the Liberty buildpack. The Liberty buildpack also makes it possible to configure the JRE version or type, customize the JVM options, or overlay the JRE functions. Please take a look at Customizing the JRE for more information.
Generally speaking, you can add environment variables to a runtime both using the Bluemix Dashboard and the cf CLI (cf set-env command) and you can access them from your applications. I suggest you to also take a look at the docs for each specific runtime in order to know what are the possible customizations for each one of them.

Related

Dynamic Web Module 3.0 requires Java 1.6 or newer ECLIPSE JEE - Dynamic web project

I downloaded Eclipse. When I tried to create a new Dynamic web project I got this error:
This answer is different from this.
I installed Eclipse JEE, and I am trying to create a Dynamic Web Project.
It's probably because you are not specifying any Target Runtime and the default configuration probably is on an older version.
You can try to configure a new Runtime Environment like below and select it to create your project after with it.
Then you select your server (the example is done with Tomcat but other servers should be similar):
Then select the JRE associated to your runtime:
And finish by creating your Target runtime and use it, it should solve the problem:
Hope it helped!
PS:
You can also configure your Target runtime in Windows->Preferencces->Server->Runtime Environments

Maven build removes configured access restriction rules

I'm using Eclipse 4.4 Java EE with maven. I need to work with some methods that are marked as restricted. So I configured the required access restriction rules in eclipse. An everything's working.
But then I run Maven/Update Project and after that all the previously configured rules are gone. So the question is: how to tell maven about the rules?
If the methods are restricted due to the Java execution environment that Maven configures on your project (e.g. you want to use Java 7 methods while the project is configured for a Java 6 execution environment), then you should configure the Maven compiler plugin in the POM to use the Java version that you want to use (e.g. via the maven.compiler.source and maven.compiler.target) properties.

auto-updating JavaFX/ScalaFX client installation

Is there any ready-made installer, component, api or any combination, that would let a JavaFX application, or any JVM based client for that matter, automatically and securely check for a new version of itself, and get, install and re-launch the new version?
Although not ideal, is it doable at least with sbt?
in the Moment there is only a feature request for Java 9
Take a Look at this aproach which seems straight forward
AutoUpdate by Reportmill
Install4J is a a tool for creating installers for JVM applications, it provides for creation of auto-updates
https://www.ej-technologies.com/products/install4j/features.html
You can also build Install4J projects from SBT using the sbt-install4j plugin (disclaimer: I am the author of the plugin).
I have come to believe that the most practical (partial) solution is Java Web Start. Mature, documented, and comes along with the JRE and JDK. I wonder if anyone had experience with it for ScalaFX or JavaFX applications.

Can install4j be used to build installer for non java application?

I would like to know whether anyone has used install4j to build an installer for a non java-based application? I'm looking to select a cross platform installer which has support to build java-based as well as non java-based applications. In the install4j official web site, it's introduced as cross platform installer for java-based applications. But I would like to know whether anyone has tried to build an installer using install4j for a non java-based application?
It's certainly possible, but keep in mind that the installer needs a JRE to run. You can bundle a JRE with the installer.
The Java-functionality around generating launchers will not be useful to you if you're not distributing a Java application, but most of the installer actions are not tied to Java launchers.

Maven build deployment

I have to manually deploy my servlet war packages on an Apache tomcat instance running on an AWS (Amazon Web Services) machine (remote server).
Also i have Maven setup for dependency management and build packaging in local development environment.
What I want is to setup my maven install/deploy task such that my packaged war files are deployed and configured(i.e executing specific shell scripts) on the remote server automatically.
Is it possible ?
If yes!!
How can it be done? (Please suggest relevant references.)
Thanks in advance
Ashish
Yes it is possible, you can use the cargo plugin to deploy to a server. See the Getting Started page for some examples.
If your scripts aren't catered for by the plugin, perhaps you could post some more details to see what options there are to address them.
If you are talking about Amazon's Elastic Computing Cloud (EC2), maybe you could check out cloudtools and its maven plugin (see the announcement on Chris Richardson's blog). Never tested myself though.
+1 for cargo plugin, I was not aware of that but could use it myself.
In case it helps you or someone else, you can run any script upon launch of an instance. This blog describes how.