create app on Jhipster using java7? - java

I am trying to use jhipster, so far Ive seen how it works on java8, I even found an example repo with java7 that is certainly java 8 (https://github.com/jhipster/jhipster-sample-app-java7).
I was wondering if there is any way I can generate an app to run with java7? I know is deprecated from jhipster but seems like if I can run jhipster v 1.7.0 I could do it, any idea how?
So far this is what jhipster -help shows
C:\Users\user>jhipster -help
Usage: jhipster [command] [options]
Commands:
app Create a new JHipster application based on the selected options
aws Deploy the current application to Amazon Web Services
ci-cd Create pipeline scripts for popular Continuous Integration/Continuous Deployment tools
client Create a new JHipster client-side application based on the selected options
cloudfoundry Generate a `deploy/cloudfoundry` folder with a specific manifest.yml to deploy to Cloud Foundry
docker-compose Create all required Docker deployment configuration for the selected applications
entity [name] Create a new JHipster entity: JPA entity, Spring server-side components and Angular client-side components
export-jdl [jdlFile] Create a JDL file from the existing entities
heroku Deploy the current application to Heroku
import-jdl [jdlFiles...] Create entities from the JDL file passed in argument
info Display information about your current project and system
kubernetes Deploy the current application to Kubernetes
languages [languages...] Select languages from a list of available languages. The i18n files will be copied to the /webapp/i18n folder
openshift Deploy the current application to OpenShift
rancher-compose Deploy the current application to Rancher
server Create a new JHipster server-side application
service [name] Create a new Spring service bean
upgrade Upgrade the JHipster version, and upgrade the generated application
completion Print command completion script
Options:
-h, --help output usage information
-d, --debug enable debugger
-V, --version output the version number

You're referring to a 2 years old project sample. Current version of JHipster 4.x requires JDK 8, there's no way to generate a project compatible with JDK 7 with it.
The only solution would be to install an obsolete version of JHipster like 2.22.0 which is the one used to generate this JDK 7 sample project:
npm install -g generator-jhipster#2.22.0
then follow instructions of this version's documentation: http://www.jhipster.tech/documentation-archive/v2.22.0/

Related

How to run new relic in Java Spring boot jpa application

I am trying to implement newrelic in my spring boot JPA project.
I am using this link to implement this. new relic guid for spring boot
Now I have installed newrelic-java-7.9.0.zip (new relic zip)from this link and changed the yml as per my requirment.
I am not able to understand what to do next as per the link. also how can run this in production environment.
AFter researching on internet I got this command to execute :
java -javagent:<path to your new relic jar>\newrelic.jar -jar <path to your application jar>\<you rapplication jar name>.jar
Now I have new relic jar but i don't have jar of my application in target folder. i am ruuning an application by clicking on play window. (Can not see any jar though target folder is getting created.)
How to run this in local
How to run this in production (How to make this command production ready)

Migrating App Engine Backend services from java 7 runtime to java 8 runtime

I have a project that uses both frontend and backend instances, in java 7 runtime environment, using app engine (https://cloud.google.com/appengine/docs/standard/java/modules/converting)
We now want to migrate to java 8 runtime, however I can't find a way to migrate the backend module/services in this environment.
Because the EAR based structure is not supported in java 8 as mentioned in the first paragraph on the following link https://cloud.google.com/appengine/docs/standard/java/configuration-files
Please help me with finding a way to achieve backend services/module in app engine java 8 runtime.
Any reference material or samples which can guide me to the right direction?
The Cloud SDK-based plugin supports multiple services without requiring EAR packaging, and it is part of the process to migrate from Java7 to Java8, you will have to make some changes for Maven and the Gradle for Java8
For Maven, you will first need to add the new plugin on your pom.xml, and second, update your application.xml if you were using an EAR based multi service configuration
For Gradle, you will add the new plugin to your classpath under dependencies in your build.gradle file, and you will also have to update your run.services file so that you can point to your default, secondary services.

jni4net on Docker Ubuntu Host

I have a application developed in Java 8 with SpringBoot, that use jni4net for consuming a dll library.
It's posibble make a docker container in Ubuntu to run this application ?
Thanks
Spring Boot with Docker
This guide walks you through the process of building a Docker image for running a Spring Boot application.
What you’ll build
Docker is a Linux container management toolkit with a "social" aspect, allowing users to publish container images and consume those published by others. A Docker image is a recipe for running a containerized process, and in this guide we will build one for a simple Spring boot application.
What you’ll need
About 15 minutes
A favorite text editor or IDE
JDK 1.8 or later
Gradle 2.3+ or Maven 3.0+
You can also import the code straight into your IDE:
Spring Tool Suite (STS)
IntelliJ IDEA
If you are NOT using a Linux machine, you will need a virtualized server. By installing VirtualBox, other tools like the Mac’s boot2docker, can seamlessly manage it for you. Visit VirtualBox’s download site and pick the version for your machine. Download and install. Don’t worry about actually running it.
You will also need Docker, which only runs on 64-bit machines. See https://docs.docker.com/installation/#installation for details on setting Docker up for your machine. Before proceeding further, verify you can run docker commands from the shell. If you are using boot2docker you need to run that first.

Deploy Scala PlayFramework Project to IBM Bluemix

I've build a RESTFul Service with Play 2.4 Scala2.11, now I want to deploy this to IBM Bluemix.
play2-war-plugin was used to package the project to a war package since Bluemix use Liberty as container.
But when I push the war package to Bluemix, I got error logs:
[ERROR ] SRVE0918E: The attempted blocking write is not allowed because the non-blocking I/O has already been started by the application registering the WriteListener [play.core.server.servlet31.Play2Servlet31RequestHandler$ResultWriteListener#d2487ee8].
I want to knwo:
Can Scala based PlayFramework project be deployed to IBM Bluemix?
Are there some better ways to package Play project to a war package?
In my circumstances, what can I do to confirm whether this ERROR caused by my codes or caused by the play2-war-plugin.
You don't need to package your Play Framework application in a war file in order to deploy it to Bluemix.
Simply build your application using play dist or activator dist and then use the java_buildpack to deploy it. For example:
$ cf push play-application -p target/universal/play-application-1.0-SNAPSHOT.zip -b java_buildpack
You can see Java buildpack documentation for Play Framework here:
https://github.com/cloudfoundry/java-buildpack/blob/master/docs/example-play_framework.md
Just for people (like me) coming to this page now. Alex de Silva's answer works great but needs some update:
Instead of the command play or activator use sbt The sbt dist or sbt stage command are described here. If you use play it won't work at all & in the case of activator--which is outdated--it will fail with some "can't find dependency" errors. Make sure you have latest version of sbt installed.
The same instructions apply in any sbt-based Scala application, not just Play Framework. You just have to be sure you have the sbt-native-packager plugin set up properly in your sbt build.

What is grails wrapper directory for?

I created an app using create-app with Grails 2.3.7, I noticed there is a wrapper directory with jars inside.
Isn't the dependecies are handled by maven(.m2) or ivy?
What is it for? Why is it located inside the grails application and should I include it under version control?
Grails Wrapper
The Grails Wrapper allows a Grails application to build without having to install Grails and configure a GRAILS_HOME environment variable. The wrapper includes a small shell script and a couple of small bootstrap jar files that typically would be checked in to source code control along with the rest of the project.
The first time the wrapper is executed it will download and configure a Grails installation. This wrapper makes it more simple to setup a development environment, configure CI and manage upgrades to future versions of Grails. When the application is upgraded to the next version of Grails, the wrapper is updated and checked in to the source code control system and the next time developers update their workspace and run the wrapper, they will automatically be using the correct version of Grails.Taken from
See the Wrapper Documentation for more details.
And see this link
But on Grails 2.3.7 there is no shell script for wrapper is described above , but the jar that need to run GRAILS without installing are insalled by default
asm-3.2.jar
asm-tree-3.2.jar
grails-wrapper-runtime-2.3.7.jar
grails-wrapper.properties
springloaded-1.1.5.RELEASE.jar

Categories

Resources