About 10,200,000 results
Open links in new tab
  1. java - How to configure port for a Spring Boot application - Stack …

    From property in SPRING_APPLICATION_JSON (Spring Boot 1.3.0+) Define environment variable in U*IX shell: SPRING_APPLICATION_JSON='{"server.port":7788}' java -jar <path/to/my/jar> By using Java system property: java -Dspring.application.json='{"server.port":7788}' -jar <path/to/my/jar> Pass through command …

  2. java - How to run a JAR file - Stack Overflow

    Dec 4, 2016 · There are several ways to run java application: java -jar myjar.jar - is the default option to run application; java -cp my-class-path my-main-class or java -classpath my-class-path my-main-class; java --module-path my-module-path --module my-module/my-main-class; Deployment to an enterprise server. It's when you have war or ear file. We'll ...

  3. java - Setting active profile and config location from command …

    Jun 25, 2015 · Option 1: Java System Properties (VM Arguments) It's important that the -D parameters are before your application.jar otherwise they are not recognized. java -jar -Dspring.profiles.active=prod application.jar Option 2: Program arguments java -jar application.jar --spring.profiles.active=prod --spring.config.location=c:\config

  4. java - Using env variable in Spring Boot's application.properties ...

    Feb 21, 2016 · @PropertySources({ @PropertySource("classpath:application.properties"), @PropertySource("classpath:application-${MYENV:test}.properties")}) Here MYENV value is read from system environment and if system environment is not present then default test environment property file will be loaded, if I give a wrong MYENV value - it will fail to start ...

  5. How can I package a Java desktop application? - Stack Overflow

    Oct 27, 2011 · If you are using Java 16, jlink and jpackage will do what you need - build a desktop application and installer. Here is a GitHub template that uses Maven to build a small / reduced JVM + JavaFX application. It uses Java modules and jlink to produce the small JVM, but uses the normal class path for running your application.

  6. java - Your security settings have blocked an application signed …

    Goto Control Panel -> Java -> Security -> Edit Site List; Add you application url, wildcards are accepted. Kindly note that you might have to close the browser and start again, to be able to read the new configuration. In the java control panel security tab, reduce the security level to medium, apply, ok and restart your browser. It should work.

  7. How to send post request with x-www-form-urlencoded body

    Jul 14, 2017 · Use Java 11 HttpClient. The HTTP Client was added in Java 11. It can be used to request HTTP resources over the network. It supports HTTP/1.1 and HTTP/2, both synchronous and asynchronous programming models, handles request and response bodies as reactive-streams, and follows the familiar builder pattern.

  8. How do I change the default application icon in Java?

    I'm using NetBeans, trying to change the familiar Java coffee cup icon to a png file that I have saved in a resources directory in the jar file. I've found many different web pages that claim they...

  9. java - How to access a value defined in the application.properties …

    May 29, 2015 · To read application.properties or application.yml attributes follow the following steps: Add your attributes in application.properties or application.yaml; Create config class and add your attributes; application.jwt.secretKey=value application.jwt.tokenPrefix=value application.jwt.tokenExpiresAfterDays=value ## 14

  10. How to get the real path of Java application at runtime?

    Oct 27, 2010 · Different parts of the application can also be running on different nodes. Access to the world outside the application is provided by the application server. Use java.util.logging or Apache Commons Logging if you have to maintain compatibility with legacy log4j. Tell the application server where the log file is supposed to go.

Refresh