This is a question only regarding Java in Windows. I need a method that will call this window: So essentially the method should be something like: So the statement: opernProperties(new File(test.txt)); should open the above window. So just to clarify, I do not want to read and manage the properties. I just want to open the properties window. Answer I
Tag: windows
Installing Oracle JDK on Windows subsystem for Linux
When trying to use the Linux version of Oracle’s JDK on the latest Windows 10 build having support for bash, I am running into a problem with the prompt hanging whenever attempting to invoke the java binary. Typing even something as simple as java -version hangs and I have to terminate the process to resume control. Anyone got this working
Why is Git Bash not using the correct Java path as defined in the PATH environment variable?
In an instance of Git Bash, typing in java -version gives me: Error: could not open ‘C:Program Files (x86)Javajre7libi386jvm.cfg’ However, my actual Java path is in D:Program FilesJavajdk1.8.0_45bin. This is shown in my %PATH% variable if I type in either echo $PATH or env | grep PATH. Where is Git Bash getting this nonexistent Java path from? P.S. To add
gradle command is failing as it is not able to start daemon
I am trying to run the gradle command. This has worked initially. However it has started failing after some time, as it is not able to start daemon. I am using Gradle 2.5 with IBM jdk 1.6 on Windows 7 Enterprise. I have cleaned up the .gradle directory in my user home directory and restarted my system. This is working
Windows scaling
Windows 8/10 has started to include a slider for how much GUI elements should scale, right click on desktop -> display. For a colleague with a laptop 4k-screen it’s 250% while another colleague using the same resolution on a 4k 28″ screen it’s 150%. How do I read that value programmatically? I need to adjust some graphics so it looks
Switching between different JDK versions in Windows
I’m working on few projects and some of them are using different JDK. Switching between JDK versions is not comfortable. So I was wondering if there is any easy way to change it? I found 2 ways, which should solve this problem, but it doesn’t work. First solution is creating a bat files like this: And after running this bat,
ODBC connection to Access database in 64-bit Windows
I am using this tutorial to create a database connection from a java application to a Microsoft Access 2010 database. The tutorial creates a system dsn in windows, and then connects to that system dsn using the following line of java code: The problem is that, when I click the link to add a new system dsn at: It does
Error occurred during initialization of VM (java/lang/NoClassDefFoundError: java/lang/Object)
I’m trying to install Java to use Eclipse (I followed all instructions to install Java and Eclipse) but my Eclipse is not starting due to some bad configuration I guess. I can’t figure out why it’s not working for me. Eclipse Installation: Extracted Eclipse at C:eclipse Created a shortcut to my desktop having target C:eclipseeclipse.exe When I try to run
JFileChooser change default directory in Windows
I want to change the default directory of my JFileChooser to “My Music” on Windows. This directory is C:UsersFreMusic on my account because my username is Fre The default is set on C:UsersFreDocuments (depends on OS i think). How can I change this? Answer You can use the API method setCurrentDirectory when initializing your JFileChooser objects: Sample usage might be
Can’t start Eclipse – Java was started but returned exit code=13
I am trying to get my first taste of Android development using Eclipse. I ran into this problem when trying to run Eclipse, having installed version 4.2 only minutes ago. After first trying to start Eclipse without any parameters to specify the Java VM, I got an error message saying it couldn’t find a Java VM called javaw.exe inside the