I hava a Java program that needs to monitor a directory tree for changes. I have JNI code that uses ReadDirectoryChangesW(). The directory is opened like:
HANDLE dirHandle = CreateFile(
...
|
I am contemplating writing a program that will move some newly created dirs to another that puts them into date-stamped folders; either by week-month-year or month-year. I can probably write/debug/test this ... |
Is there a way (keyboard shortcut?) to open the folder of the currently opened file in Windows Explorer?
What I mean is this: When a java source file is open in IntelliJ, ... |
when running a Java application as service with the user 'LocalService', the temp directory ("java.io.tmpdir") points to 'c:/windows/temp' (for example).
Running a Java application normally gives 'c:/documents and settings/user/local settings/temp' instead.
How can ... |
I'm running Windows and I'm trying to refer to a directory. My function starts off like this:
File file = new File("C:\\somedir\\report");
if (!file.exists()) {
file.mkdirs();
}
doStuffWith(file);
I got a NullPointerException within the doStuffWith ... |
I am trying to run the java prog I've built, but I want to run it from a specific directory. When specifying the relative path to the class file I ... |
I am working on a java application that targets both mac and PC. Recently I discovered a strange problem with Windows 7. My application has a projects directory that ... |
|
Well, this question refers directly to windows 7.
I run the same code on windows xp and on windows 7.
In windows XP it's true, and in windows 7 it's false!!
if (file.exists() || ...
|
I'm doing a Windows Service in Java, this service list the files in a directory and write the results in a file. My problem is that when i call Java.File.isDirectory() when ... |
I'm using this script on WINDOWS
public void copyFile(File sourceDirectory, File targetFile, File targetDirectory) throws IOException{
String temp = targetFile.getAbsolutePath();
String relativeD = temp.substring(sourceDirectory.getAbsolutePath().length(), targetFile.getAbsolutePath().length());
...
|
My app creates a directory(file folder) on C:/ drive, since I don't want to expose all the data in it, and I don't want to encrypt all files in it, I ... |
I am using Java JNotify to listen for directories events.
However, whenever i'm running the program below, the program is terminating immediately with no error nothing
Instead, i think the program should wait ... |
I am trying to learn Java in few day. I trying to write content to temp file and save this file in temp folder in Windows (that's my task).
I find some ... |
I,m looking for some method that can let me obtain (in windows) the directory where windows is saved (for example in my PC it will return "C:\windows".
I need it because I ... |
I followed the Watching a Directory for Changes Java7 nio2 tutorial to recursively monitor the entire contents of a directory using the code sample WatchDir.java.
While this works ... |
When preparing for the SCJP exam, we were going through the following code:
package certificaton;
public class OtherClass
{
public void ...
|
I have meet this error ,do anyone know why is it? Java Version: 1.6.0_16
java.lang.UnsatisfiedLinkError: shell32.dll: Cannot load shell32.dll from system directories.
at sun.awt.windows.WDesktopProperties.init(Native Method)
...
|
I have a program that puts some information in a user's My Documents folder. I find this folder by using System.getProperty("user.home"); Now I have a customer for whom this ... |
I tried to open a directory present in c drive in java code, but failed. It throws an exception as Access denied. I am using windows 7. How can I open ... |
I'm writing a program that uses File I/O to traverse through a directory given by the user and then adds the directories to a generic linked list. The program I wrote ... |
I'm creating directories using myFileObject.mkdirs(). In Windows, every directory that gets created is marked as read-only. Although I can (oddly) still write to the directory, it creates aggravation when it comes ... |
There are a lot of jdk and jre in my program files. I want to know the directory which contains the java runtime of my Windows XP system. How to achieve ... |
I have an exe process that is running with a shortcut.
In the "Start in" property of the shortcut I set it to the folder where all app resources are. The ... |
|
Hi All, Can any one tell me .how to get windows root directory in java. i need code pr api which returns root directory of windows such as C:\WINDOWS,or D:\WINDOWS. i want to store one dll other than current directory so i want to store in windows root directory.i should not hard code the path as i am not sure C,D ... |
When preparing for the SCJP exam, we were going through the following code: package certificaton; public class OtherClass { public void testIt() { System.out.println("otherclass"); } } And this: package somethingElse; import certification.OtherClass; public class AccessClass { public static void main( String args[]) { OtherClass o= new OtherClass(); o.testIt(); } } I placed both the above files in the following directory: C:\scjp\temp8 ... |
I m trying to get the default user directory under windows XP SP3. To do so, I'm using System.getProperty("user.home"); I was expecting to get a path like "C:\Documents and Settings\user", nstead of that I get "C:\Documents and Settings\user\Destop". I checked the %USERPROFILE% and %HOMEPATH% window's environment variables and both of them are correctly set ( set to "C:\Documents and Settings\user"). Is ... |
To compile from D:\ D:\>javac -d "Your\ dir for\Output Files" "Path\To Your\ClassFile.java" but please avoid silly questions... Make a try BEFORE posting Sorry, but i have to correct myself about a previous post Even if your class belongs to a package you have to D:\>javac Your\Class\Name.java (the package declaration doesn't matter here) and even on Windows upper/lowercase in filenames is different. ... |
I've written a java program in Windows XP, and I'm using the RXTX library. But I'm having problems when I try to run it. I'm getting an exception error: "UnsatisfiedLinkError: no rxtxSerial in java.library.path", and of course it refers to that it cannot find the file rxtxSerial.dll. This can be solved by placing the dll file in the directory. But ... |
I installed a new hard drive and upgraded my version of Java to 1.6.0_20 (I think the old hard drive had 1.6.0_14). A Java program that I have had running for some time was not writing files to the project directory in Netbeans (where it had always written them). Log4j was also not writing its .log files there either. I found ... |
Ok, yeah. I see what you mean about the protected modified for the method. I guess there is no way for a java app to force windows to request a name/password for a protected directory. Oh well. I will recommend the mapped drive solution. That's an easier fight for me that trying to recommend 3rd party libraries. Thanks for you help. ... |
armalcolm wrote: The applet would have to be signed in order to do this. Personally, there's no way in hell I would want an applet writing stuff to my disk Unless you do -- we have an applet that interfaces between Web apps and a 3rdParty EHLLAPI .DLL, so that the users can do some things in the Web app, and ... |
Seems like a weird title, I know, but I couldnt figure out something better. Well here are my problems: 1) I have compiled a .exe using the well known launch4J application and it is working pretty well when the exe is launched whether the jar is wrapped or not. The problem is, if I try to drag an external file onto ... |
Well with block I mean...when someone click twice on any directory instead of open directly the directory ask for a password if it is right then open the directory if not just show an error message...I read about it and there are many programs that already do this but I want to make my own just for fun and to practice ... |
|
Hi All, I am trying to move a file from one directory to another. i don't have any files in the directory where i am moving. so there is no possibility of same file exist. i also unable to find the reasons why it is not moving... Can anybody help me on this?? How to debug such problems? I think this ... |
I write a file to a windows shared directory on my computer that has my security, without any problem, but I can not put my application on another server since I have not logged in to that server. Is there anyway to send the login information to access the shared directory from that server? I can not use FTP since FTP ... |