speedsiteiq.blogg.se

Java code runner for mac
Java code runner for mac








I put this code in the main class of my Mac/Java application, bundle the app as usual, and then launch the application. Val listOfArguments = runtimeMxBean.getInputArgumentsįor (a <- listOfArguments) logger.log(s"ARG: $a") get the jvm's input arguments as a list of strings Val runtimeMxBean = ManagementFactory.getRuntimeMXBean

java code runner for mac

(The app is actually written in Scala, but as you’ll see, the code is close enough to Java that it’s easy to understand.) In the process of doing this, I’ve been trying to set a lot of Java command line arguments, such as -Xms64m, -Xmx256m, -XX:+UseG1GC, and so on.Īs I’ve been debugging the application I started wondering, “How do I know if these command line parameters are really being set?” I can see that they’re all in the app’s ist file, but how do I know they’re actually being applied?Īfter digging around the internet for a while I was finally able to find this solution, which helps to show the JVM command line arguments:

java code runner for mac java code runner for mac

#JAVA CODE RUNNER FOR MAC FOR MAC OS X#

Java FAQ: How can I read/see Java Virtual Machine (JVM) command line arguments/parameters from within a running Java (or Scala) application.įor the last few days I’ve been working on a Java Swing application for Mac OS X systems, and bundling the application so it seems just like any other Mac app.








Java code runner for mac