Is there an easy way to discover a File's creation time with Java? The File class only has a method to get the "last modified" time. According to some ... |
What compiler (I'm using gcj 4.x) options should I use to generate an "exe" file for my java application to run in windows?
|
I have an ant build that makes directories, calls javac and all the regular stuff. The issue I am having is that when I try to do a clean (delete all ... |
Is there a programatic way from java to force a file deletion on windows even if the file is locked by some process? I cannot kill the process that locks the ... |
I'm trying to perform a once-through read of a large file (~4GB) using Java 5.0 x64 (on Windows XP).
Initially the file read rate is very fast, but gradually the throughput slows ... |
Same question, different langauge.
How do you do it in Java? Do you use JNI? run exe? or are there any library read/write *.lnk like POI read/write *.xls?
I used to ... |
On a Unix systems it's very easy to compile the CLASSPATH by using find:
LIBDIR=`find lib/ -name \*.jar`
for DIR in $LIBDIR:
do
CLASSPATH="$CLASSPATH:$DIR"
done
java -classpath $CLASSPATH com.example.MyClass
What would be the aquivalent ... |
|
I have some model objects I'm using in my Java client application. Later these model objects will be populated / retrieved from remote services (e.g. SOAP). Now I want to do ... |
Our build is annoyingly slow. It's a Java system built with Ant, and I'm running mine on Windows XP. Depending on the hardware, it can take between 5 to 15 minutes ... |
I'd like to have my desktop Java application to have single sign on related to
Active Directory users. In two steps, I'd like to :
- Be sure that the particular user has ...
|
We have a Java application server running on Sun Solaris. We now need to be able to write files and read files to/from a separate machine, which is running WindowsXP. ... |
I have issue with Win2003 that Java Applet Closes IE for Users not Admins.
I found out the following solution but it refers to missing JAVAPOLICY.EXE file:
http://www.experts-exchange.com/Programming/Languages/Java/J2SE/Q_22694925.html
where is this javapolicy.exe ... |
I have a command-line executable which I need to run from Java on Windows XP. It uses files as input and output. But I want to avoid the overhead of ... |
Java's File.renameTo() is problematic, especially on Windows, it seems.
As the API documentation says,
Many aspects of the behavior of this
method are inherently
platform-dependent: The rename
... |
You can see in the following posts
http://forums.sun.com/thread.jspa?threadID=603815
http://forums.devshed.com/ldap-programming-76/active-directory-services-using-java-api-89586.html
an example of accessing LDAP using the InitialLdapContext class in Java. This requires a login and a password to be passed ... |
I need to parse the file version and product version from windows exe and msi files.
Could you point me to the file specification or the library (preferably in Java) that does ... |
is there a way to associate a custom file extension with my java program on windows? I have installAnywhere to create an installer. But I'm not sure how this ... |
I have a SWT Java app that runs on Windows XP / Vista / 7 and Mac OS X. I'm currently saving a config file to:
System.getProperty("user.home") + filename
With the changes in ... |
I'm trying to lock a file with Java in Windows environment with FileLock and I got an issue :
after I lock the file it can still be accessed by ... |
How can I check whether a file exists, before openinging it for reading in Java? (equivalent of Perl's -e $filename).
The only similar question on SO dealt with writing ... |
We have a Java application that includes components that run as SYSTEM on Windows machines. On Windows 7 x64, one component fails when trying to unpack the jnidispatch library:
Exception in thread ...
|
If there's one thing that annoys me about Java it's that you can't double-click a class file so as to run. I assuming there's an entry in the registry that has ... |
I want to implement Single Sign On with Kerberos in Java and have successfully managed to create a ticket for the Service using the ticket from the Windows logon. Unfortunately, I ... |
I have a Java program that is launched by a batch file with a line like this:
javaw -Xms64m -Xmx1024m com.acme.MyProgram
However, on some computers the program will not launch and displays the ... |
I have a Java program that opens a file using the RandomAccessFile class.
I'd like to be able to rename that file while it is opened by Java. In Unix, this isn't ... |
I know the Resource Monitor in Windows7 can do such thing.
But I need a monitor on other windows platforms.
Any idea?
Thanks.
|
Can I do this on Java? I'm using windows...
|
How to create a file in Windows that would have attributes FILE_ATTRIBUTE_TEMPORARY and FILE_FLAG_DELETE_ON_CLOSE set using Java?
I do want my file to be just in-memory file.
To precise: delete-on-exit mechanism does not ... |
I'm using a JTree to browse the content of a folder and I want that when a user click on a file, the software shows a preview of it (a screenshot ... |
I have a simple Java program which reads a file directory and outputs a file list.
I sort the files by name:
String [] files = dirlist.list();
files = sort(files);
My problem is that it ... |
The title may seem a little weird but what I find around the internet is methods to sign on to stuff automatically with windows domain authentication (Single Sign On), but that ... |
I'm currently using a temp folder for my Java application to create a lock so that only one instance can be running at a time. This lock file MUST be deleted ... |
While attempting to find a way to merge existing PDF files and forms, I came across Sid Steward's PDFTK (http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/) and then found Andrew Heiss' PDFTK-php Class (code.google.com/p/pdftk-php/; www.andrewheiss.com/blog/2009/07/29/installing-pdftk-php/). ... |
I am working with an application that consists of 10 or so Java processes that communicate through JINI, JMS, Sockets, and an HSQL db running on Windows XP.
It seems that each ... |
How to get system icons corresponding to specified file type in Windows and paste them into html?
|
If you right-click on a file in Windows and select Properties, you can manage some properties in de Summary tab, such as Title, Subject and Author, like in this example:
 |
I have to authorise users using its Windows account in a web application.
I use LDAP to validate with the Active Directory if the user/pwd in a specific domain is correct, but ... |
I'm having some problems deleting a file in Windows with java. For some reason, java is keeping a lock on my file, and I don't know why. Here is my code:
private ...
|
Somehow I can't get my UTF-8 sources to play nice with Ant.
I get a whole lot of "warning: unmappable character for encoding ascii". I'm going crazy, really. Hours and hours and ... |
I've noticed that JFileChooser hides Windows System files. Files like hiberfil.sys, pagefile.sys, $Recycle.Bin, a number of shortcut folders that you can't open, etc...
I could hide .sys files in my application but ... |
I want to change the ACL of a file and set "full permissions" to a special user.
I know the cacls-command cacls . /e /t /p Everyone:f
But this only works if the ... |
Since Windows 7 the directory windows/system32/drivers/etc is specially hidden. Windows 7 itself doesn't show it, but it is there if I open it manually.
Today I was playing around with a Java ... |
I'm working on updating an old app. It has some dependency files that live in the same directory as the app. Obviously this broke when Windows Vista came out ... |
How to start .jar application from command line and wrote errors ( exceptionsand warnings, all what is in Console in eclipse during execution ) in errors.text on Windows ?
|
I have to create a file based on a string provided to me.
For this example, let's say the file name is "My file w/ stuff.txt".
When Java creates the file using
File ...
|
I will need to export a certificate in windows store to a p12 file. Similar to what you can do from firefox/IE browser but in JAVA. The only way I am ... |
I'm Rakesh I'm developing an application that needs to archive files with same names again and again. The files thus zipped are stored in a folder. Now let me get into ... |
Can I get my minimized Java app to react to files being dropped on it (on Windows) so that a user can drag files onto the icon on the toolbar ... |
Below is my JavaProcess.mxml
<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
...
|
I want to use the Desktop API to lauch .cmd file on Windows.
Desktop.getDesktop().open(new File(config.getCommandFilePath()));
But this launches the .cmd file as if it were called from the current directory. So it isn't ... |
Given a simple batch file, c1.bat, containing:
start notepad 1> nul 2> nul
exit
and a Java program:
import java.io.InputStream;
public class ProcessTest {
public static void main(String[] args) throws Exception {
...
|
I am trying to use this GUI mod for a Minecraft Server. I wrote a batch file so the server can start with more RAM. When I run just the .jar ... |
I am calling the below command using java
This is the java initialization
String fileName="C:\\temp\\A a.txt";
String sCmd = "cmd /c start \"\" \"" + fileName + "\"";
This is what I ... |
I'm trying to create a static method that let me hide a file.
I've found some possible way to do that and I wrote this:
public static void hide(File src) throws InterruptedException, IOException ...
|
I am looking out for a solution/suggestions for the below problem with JNI:
I am trying to load a library file (*.lib) which is created on the fly from my code and ... |
So, when I double click a file in windows explorer, Intellij fires up, but instead of just showing me the file I want to see, shows up the following message:
 |
Can someone please tell me why this java command in a .bat file won't run my java program on WinXP? I have all my jar files in a folder called lib ... |
How can a Java program get the list of File Types in Windows (those listed in Control Panel/Folder Options/File Types)?
|
I want to create a "virtual" file that, when accessed, will be d/l (by my background application). This should work if the file is accessed by windows explorer, or by other ... |
I have a Java app that writes to a file with:
BufferedWriter bw = new BufferedWriter(new FileWriter(outputFile));
bw.write(line + lineTermination);
Line termination is defined as:
\r\n
I get the odd, mysterious blank line inserted into my ... |
I can get a list of drives plugged into a computer with File.listRoots(), but I only get the drive letter. How can I get the actual name of the drive ... |
I created a program that generates an excel spreadsheet (.xls), then asks if the user wants to open it immediately (if so, it uses java.awt.Desktops open() command to do so). This ... |
Is there a way to show the file count without listing the files?
I have a Java program in which I want to list the total number of files on the hard ... |
I want to design a function in Java which will have prototype like this.
public String FindVersion(String FullPath)
{
}
where FullPath can be: C:\tmp\readme.txt
or C:\windows\system32\xcopy.exe
or like C:\windows\system3
|
Our clients are frequently reporting issue that they are getting "Access Denied" exception when they used to run application that has been installed with downloaded setup file. Our installer, installs executable ... |
I'm aware I can call out to Active Directory and do queries provided I have a cleartext username and password. (I don't want to do that)
In VB, I can set authorisation ... |
In Windows os, I have a file, for example "README" .
Using java, File("readme").exists() will return true
How to get the true file name, something like this:
new File("readme").getTrueFileName() //return ...
|
I am running some java apps and I need to shutdown/close all apps gracefully from windows bat script.
So my question is:
How to invoke shutdown hook by windows bat script and ... |
I wish to place a file named as myFile.file in
C:/Windows/System32/ location.
Here is use java code to place my file. while I execute my program it throws "Access Denied:C:/Windows/System32/myFile.file".
why ... |
I want to check whether JAVA_HOME is present in environment or not
So I wrote the below script a.bat
if "%JAVA_HOME%" == ""
(
echo Enter path to JAVA_HOME:
set /p javahome=
)
if not "%JAVA_HOME%" ...
|
I am making a Java Desktop Application that is going to Shred or Swipe or More Permanently Delete files. I can do the swiping but first I have to find and ... |
The entire problem description is in the subject for this one. I just need to get the file name for the currently displayed wallpaper in Windows 7. I have ... |
I am now using java Desktop API to manipulate file explorer.
I know how to open the file explorer but I don't know how to open it and highlight the specified ... |
I have a signed java applet that CAN write to the local filesystem say c:\myappletfolder\myappletfile but I would like to write to a common folder like the one used in the ... |
I want to be able to run my Java program VMArgumentsFromFile (detailed below) from the command line and print out "Success" in the command prompt. The command line entry should look ... |
I 'm trying to create new file in windows 7 using
file.createNewFile()
but the file is not created and I got the following exception
Message:
The system cannot find the path specified
Stack Trace:
[java.io.IOException: ...
|
Is there a way to read a file from a network shared location on windows?
Let's say for instance I've this simple code that reads a text file called readMe.txt from the ... |
A customer cannot run our Java program. The shortcut executes a 32-bit copy of javaw.exe (the Java runtime) and then it passes the .jar file as a parameter (the Java program)
I ... |
I've requested trial license for Callback File System and tried to write simple application using java! So, I've written next few lines and run it and received exception eldos.cbfs.ECBFSError: ... |
I have a number of student with java programming assigment written using (most probabaly) Mac OS.
The trouble here is I can't compile their code (in Windows) to see the executable ... |
Does Java NIO need special permissions on Windows?
When I run the following Java code on Windows Server 2003, it fails with an "access denied" error (that's the whole message in the ... |
I have an application, which proccesses some text and then saves it to file.
When I run it from NetBeans IDE, both System.out and PrintWriter work correct and non-ACSII characters are displayed/saved ... |
In particular, I'd like to use the (unfortunately not visible) sun.nio.fs.Globs.toUnixRegexPattern(String glob).
Ok, stepping back and giving a bit of context
I have an iterator of pathes into a remote, unix-like file system ... |
I cannot find on the Internet where SWT tries to write the dll files. I have a computer where the jar does not run only because SWT cannot write DLLs.
UPDATE 1
java.lang.reflect.InvocationTargetException
...
|
What I am trying to accomplish is detect whenever a file is read.
Basically, it is going to be a sort of on-access scanner.
After searching google and SO, the only things ... |
I am trying to write a file on a C:\ drive, but I get an exception.
java.io.IOException: Access denied.
Code:
public class Test {
public static void main(String[] args) ...
|
I have a Windows service that executes a .bat file. This .bat file executes some Sava code that reads some files' information. The files I need to access are not in ... |
I'm trying to find a way to keep track of files even when they are moved or renamed in the file system.
One idea I had was to use the new UserDefinedFileAttributeView ... |
At my company we are using Java Web Start to distribute client software to the customers. They are using different Windows versions: XP, Vista and 7.
We've deployed a version through JWS ... |
I'm looking for a way to get a unique file id in a Java application, and came across this:
Unique file identifier in windows
Now, I tried the answer supplied by Ashley ... |
I have a implemented a listener that notifies if we receive a new file in a particular directory. This is implemented by polling and using a TimerTask.
Now the program is ... |
Hello everyone, I am writing a program in Java that needs to ensure that the user who opened it is in a particular group that allows access to the program. I ... |
|
Hi friends, For some reason the ports in my windows 2000 machine(also tested in winNT) are not being recognised. This is the testing code I have(modelled on a sample program from jguru): import java.io.*; import java.util.*; import javax.comm.*; public class SimpleReadWrite implements Runnable, SerialPortEventListener { static String DEFAULT_PORT = "COM1"; InputStream in; OutputStream out; /***********************************************************************/ public static void main(String[] args) { ... |
|
I find myself in a situation where I need to write to a tape drive on a Win32 system. Not being a Win32 programmer, I don't even know where to begin. Is there anyone out there that has done this that can give me some help? I realize this is probably going to require the use of JNI. |
Dear friends, I need to make one application which search the whole network for the specified folder / file. We hv a windows network in our company. Is that possible make an aplication which runs through browser and search all the shared folder on an individual IP address. Should i use java.net / Java native interface(JNI) interface ? Thanks in advanced. ... |
|
Hi there A part of my application needs to rename some files. I have having problems with it when I have longer filenames. It throws me right out of the application without even an exception but gives a windows error. So I am wondering if there is a maximum length of filename and extension that Java can handle on the windows ... |
hi all, i am trying to execute the adminscript for Starting/Stoping the Web Server IIS5.0 in windows 2000. The following is the code -------------------------------------------------------------------- Process r = ob.exec("c:/inetpub/adminscripts/startweb.vbs -a 1,2 -c globalv"); r.waitFor(); -------------------------------------------------------------------- i get the exception as below. --------------------------------------------------------------- Exception in thread "main" java.io.IOException: CreateProcess: c:\inetpub\admins cripts\startweb.vbs -a 1,2 -c globalv error=193 at java.lang.ProcessImpl.create(Native Method) at java.lang.ProcessImpl.(Unknown Source) at ... |