Skip to content
Advertisement

Tag: windows

Open a file’s properties window using Java

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

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

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

Advertisement