System.getProperty() in Java
Hello,
When running Java programs, this version was compiled Java byte code with a particular. This creates a dependency, the Java version on the target system needed for that, right? As it is now possible at the start of the program to check whether the installed JRE requirements of the compiled version of Java meets the? And the one custom error message will appear if the execution fails because the version and not just a cryptic error message of the JRE. Even if no Java is installed, there is probably no way to verify this platform independent, right? Something like a small program, which with System.getProperty ("java.version") determines the current version, even with Java 1.0 (?) was compiled and a class loader for all of the following classes have / use? What do you think?
Re: System.getProperty() in Java
An external program that is written in java not or need a command line tool (then hold for each platform), which with java-version the version reviewed one (or. Nevertheless, errors delivers when it java and thus the JRE) not found.
Re: System.getProperty() in Java
Thank You for the answer. Is it not a common problem? How is because normally dealt with? Come on a little lame, if someone will download your program, running, and only a cryptic error happens because the installed there VM is too old.
Re: System.getProperty() in Java
It's called "System", which applies everywhere and it is defined, so that potential users can clarify beforehand whether a software of its mill probably will be run on respectively. what they must do to ensure that the case is. If you are not aware of the basics of java, then I would recommend you some reading on java core and then move forward.
Re: System.getProperty() in Java
That may be so, but it is for the normal user, a much larger effort, in addition a VM to install (from the existing situation of absolute confusion on the sun homepage Quite apart), instead of looking only to whether sufficient RAM is available. For. NET, I feel the same in the rest.
Re: System.getProperty() in Java
I have a problem. The command System.getProperty ("user.dir"); gives me instead of my workspace directory, directory of my eclipse. what is this? How do I get my workspace directory instead?
Re: System.getProperty() in Java
You will get either a workspace directory, nor an Eclipse directory. You get exactly what is in the API documentation, namely the current working directory. I am working on the assumption that you your application directly from Eclipse (using the Run dialog), or start up. What does it say there in the "Arguments" tab (second tab) the "Working directory"?