Question about Computers & Internet

1 Answer

Java programming: file access

Specifications:
-a simple java program that asks the user to input a file name
-the program then reads the file
-it outputs how many times capital A's -- 'A' has occurred in the file that the user specified

i would greatly appreciate if anyone would do this tonight for i need this tomorrow..

Posted by on

1 Answer

(R.id.note) this is the error in java, How can I rectify it;

Posted on Sep 03, 2008

1 Suggested Answer

6ya6ya
  • 2 Answers

SOURCE: I have freestanding Series 8 dishwasher. Lately during the filling cycle water hammer is occurring. How can this be resolved

Hi,
a 6ya expert can help you resolve that issue over the phone in a minute or two.
best thing about this new service is that you are never placed on hold and get to talk to real repairmen in the US.
the service is completely free and covers almost anything you can think of (from cars to computers, handyman, and even drones).
click here to download the app (for users in the US for now) and get all the help you need.
goodluck!

Posted on Jan 02, 2017

Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

1 Answer

How to download fexplorer in .jar format


thumbsup.gif FileExplorer v3.0 alpha
FileExplorer v3.0 alpha

[img src="http://handheld.softpedia.com/images/software/screens/FileExplorer-Java-0.jpg" border="0" alt="">

FileExplorer is a program for managing files on the phone and memory card.

Current features include hiding/unhiding of folders and files, password protected access to the program and copying and moving files.

It also features a slideshow viewer and image viewer. Will NOT open other files except jpg and png. This is NOT the final version. Its a pre-release build.

IMPORTANT Settings before running FileExplorer:

After FileExplorer has been installed you'll need to configure the Access Permissions to allow FileExplorer to access the phone local file system and the internet. How this is done depends on your phone. Please read the below section for instructions for your phone type.

Configuring Access Permissions for FileExplorer

Sony Ericsson phones:

Go to either Applications or Games (depending on where you installed FileExplorer). Highlight FileExplorer, but instead of opening it, press More->Permissions.

Select Read User Data and set the access permissions to "Ask once" or "Ask Always". Select Write User Data and set the access permissions to "Ask once" or "Ask Always".

Nokia Series 60 phones:

Go to Tools > Manager > FileExplorer > Options > Suite settings

Select Read User Data and set the access permissions to "Session" or "Ask Always".
Select Write User Data and set the access permissions to "Session" or "Ask Always".

Nokia Series 40 phones:

Go to FileExplorer->Options->Application access->Phone access

Select Read User Data and set the access permissions to "Session" or "Ask Always".
Select Write User Data and set the access permissions to "Session" or "Ask Always".

Torch Keys:

Left Softkey(Nokia): Change color
Right Softkey(Nokia): Go back
UP/DOWN arrow: Increase/decrease brightness
LEFT/RIGHT arrow: Cycle through preset colours
8 key: Toggle Circle light or Full screen light
0 key: Reset all settings

What's new in this release:

· Shows hidden files and folders with separate icons than the normal ones.
· Improved the support for Sony Ericsson phones. Should work but haven't tested though. Do send feedback
· Added support for zip files and nokia themes but it's under work and will not work.
· Changed the UI a bit adding a shortcut to jump directly to a path
· Added a torch with different colors. The flashlight doesn't work yet.
· Added Nokia Theme creator UI. Still under development.
· Support for zipping files and upzipping them. Working on them. To get torch which remains ON permanently press the UP arrow which changes the brightness level.


http://www.symbianize.com/attachment.php?attachmentid=52054&d=1216885320
Symbianize Forum

Apr 24, 2014 | Nokia ASHA 200 Dual Sim Gsm Unlocked...

1 Answer

Wd my passport retrieve data


Step 1:
You might not have the appropriate software installed on your computer to show / read the files
IE: adobe flash , directx , win zip , codec , word ...... Determine if access is denied by a sharing violation because the folder and its files are in use by someone else or the computer itself. Wait several minutes, and then attempt to access the folder again. Go to the location where the file or its folder are stored on your computer. Lock files are hidden files in Microsoft Windows. Select "Show hidden files." The lock files for Windows applications have a ~ symbol in front of the file name. For example, for test.txt, the lock file is named ~test.txt. In UNIX, the lock file may be identified by an extension of .lock or .swp within in the file name. Delete the lock file. The locked file or folder unlocks. Reboot your computer, and bring it up in Safe Mode. This prevents the startup of many of the system services and programs that could be locking the files or folders. Attempt to access the folder location and its contents. If the folder is available, save the folder or its contents in a directory to which you have access. Record the active processes running on the computer and the programs available in Safe Mode. Then, log into the computer after a normal boot up. Review the applications running in the background in normal setup. One of these applications may be preventing access to the file folder and its contents. If there are applications that run in normal mode that do not run in Safe Mode, turn off those applications. Then, try to access the file folder again. b> Are the Security Permissions for the Folder or Its Contents Preventing Access? b> Check the file folder permissions by right-clicking on the folder and selecting "Properties." In the "Properties" dialog box, select the "Security" tab. The "Name" list box includes the user and group permissions. If there is no "read," "read and execute," or "write" permissions in your user profile, you do not have permission to view the file folder or its contents. These security permissions are typically set by system administrators. System administrators may be trying to prevent end users from altering system files that are critical to the computer running smoothly. Contact your system administrator, and request local administrative rights to the computer. This allows you to gain access to the files and folders that are restricted to administrators. Edit the system policies using administrative tools via the gpedit.msc program. Users can add, read and modify permissions for folders and other objects via this program. Full control is the best system policy, because it includes read, write, execute and modify rights. However, access to the gpedit.msc program may be restricted, as well. Go to the command line (press on the "Windows" and the "R" keys on your keyboard at the same time), and enter the CACLS command for the folder name. Use the command format: C:\> cacls <foldername> /E /G <username>:F CALCS stands for Change the Access Control ListS. This command allows you to add your user name to the security settings to permit access to the protected system folder when the gpedit.msc program is not available.

Downloads to Recover Your Files and Save Your Bacon and 10 Best Free Hard Drive Utilities. Some addition links found on Google
http://www.datarecoveryreview.net/

http://www.cleverfiles.com/

http://www.easeus.com/resource/hard-disk-data-recovery.htm

Feb 08, 2013 | Western Digital 1TB My Passport Essential...

1 Answer

Iomega 1tb drive have files hidden


You might not have the appropriate software installed on your computer to show / read the files
IE: adobe flash , directx , win zip , codec , word ......
Determine if access is denied by a sharing violation because the folder and its files are in use by someone else or the computer itself. Wait several minutes, and then attempt to access the folder again. Go to the location where the file or its folder are stored on your computer. Lock files are hidden files in Microsoft Windows. Select "Show hidden files." The lock files for Windows applications have a ~ symbol in front of the file name. For example, for test.txt, the lock file is named ~test.txt. In UNIX, the lock file may be identified by an extension of .lock or .swp within in the file name. Delete the lock file. The locked file or folder unlocks. Reboot your computer, and bring it up in Safe Mode. This prevents the startup of many of the system services and programs that could be locking the files or folders. Attempt to access the folder location and its contents. If the folder is available, save the folder or its contents in a directory to which you have access. Record the active processes running on the computer and the programs available in Safe Mode. Then, log into the computer after a normal boot up. Review the applications running in the background in normal setup. One of these applications may be preventing access to the file folder and its contents. If there are applications that run in normal mode that do not run in Safe Mode, turn off those applications. Then, try to access the file folder again. b> Are the Security Permissions for the Folder or Its Contents Preventing Access? b> Check the file folder permissions by right-clicking on the folder and selecting "Properties." In the "Properties" dialog box, select the "Security" tab. The "Name" list box includes the user and group permissions. If there is no "read," "read and execute," or "write" permissions in your user profile, you do not have permission to view the file folder or its contents. These security permissions are typically set by system administrators. System administrators may be trying to prevent end users from altering system files that are critical to the computer running smoothly. Contact your system administrator, and request local administrative rights to the computer. This allows you to gain access to the files and folders that are restricted to administrators. Edit the system policies using administrative tools via the gpedit.msc program. Users can add, read and modify permissions for folders and other objects via this program. Full control is the best system policy, because it includes read, write, execute and modify rights. However, access to the gpedit.msc program may be restricted, as well. Go to the command line (press on the "Windows" and the "R" keys on your keyboard at the same time), and enter the CACLS command for the folder name. Use the command format: C:\> cacls <foldername> /E /G <username>:F CALCS stands for Change the Access Control ListS. This command allows you to add your user name to the security settings to permit access to the protected system folder when the gpedit.msc program is not available. Hope this helps.

b>

Dec 10, 2012 | Iomega 1TB Prestige External USB 2.0 Hard...

1 Answer

How to install jdk1.6


download the Java Development Kit for your specific operating system from the sun java website. For windows, the installer will be an executable file so just run it and follow the prompts.

For linux, ubuntu or debian, Download the jdk bin file. Go to your terminal or konsole then set yourself as a super user and run the file by typing ./jdkxxxxxx.bin or whatever your bin file was. For mandriva and red hat, download the .rpm.bin file. run the bin file and it will load the rpm file. Just follow the steps.

For Mac. I think Mac does not support that version yet.

I hope this helps.

May 04, 2010 | Sun Java Programming Language (cdj-275)

4 Answers

Java is not working


Hello there :
first you are going to want to ensure that your your current version of java is installed correctly and is not corrupted and if it needs to be reinstalled
download the latest java version and reinstall this . www.java.com
this should be able to take care of the problem that you are having ok?
best regards michael

Aug 23, 2009 | ArcMedia JavaScript Source Code 3000 Pro...

1 Answer

I want to read text file which is located in c drive using java code can anybody help me out


import java.io.*;
import java.util.Scanner;

public final class ReadWithScanner { public static void main(String... aArgs) throws FileNotFoundException {
ReadWithScanner parser = new ReadWithScanner("C:\\Temp\\test.txt");
parser.processLineByLine();
log("Done.");
}

/**
* @param aFileName full name of an existing, readable file.
*/

public ReadWithScanner(String aFileName){
fFile = new File(aFileName);
}

/** Template method that calls {@link #processLine(String)}. */
public final void processLineByLine() throws FileNotFoundException {
Scanner scanner = new Scanner(fFile);
try {
//first use a Scanner to get each line
while ( scanner.hasNextLine() ){
processLine( scanner.nextLine() );
}
}
finally {
//ensure the underlying stream is always closed
scanner.close();
}
}

/**
* Overridable method for processing lines in different ways.
*
* <P>This simple default implementation expects simple name-value pairs, separated by an
* '=' sign. Examples of valid input :
* <tt>height = 167cm</tt>
* <tt>mass = 65kg</tt>
* <tt>disposition = "grumpy"</tt>
* <tt>this is the name = this is the value</tt>
*/

protected void processLine(String aLine){
//use a second Scanner to parse the content of each line
Scanner scanner = new Scanner(aLine);
scanner.useDelimiter("=");
if ( scanner.hasNext() ){
String name = scanner.next();
String value = scanner.next();
log("Name is : " + quote(name.trim()) + ", and Value is : " + quote(value.trim()) );
}
else {
log("Empty or invalid line. Unable to process.");
}
//(no need for finally here, since String is source)
scanner.close();
}

// PRIVATE //
private final File fFile;

private static void log(Object aObject){
System.out.println(String.valueOf(aObject));
}

private String quote(String aText){
String QUOTE = "'";
return QUOTE + aText + QUOTE;
}
}

Jun 22, 2009 | Sun Java Programming Language (cdj-275)

1 Answer

Gidday, I have windows XP on my laptop, and use Avira Antivirus Personal Free Edition. I have disabled my windows firewall as reccommended. I use a trading platform, CMC Marketmaker, and cMC has advised me...


Read through this I think it will help:-
Processes to be omitted for the Guard
All file accesses of processes in this list are excluded from monitoring by the Guard.
Input box
In this box you can enter the name of the process that is not included in the on-access
scan. No process is entered as the default setting. The names of the individual process
can most easily be obtained via the task manager. The "Processes" tab in the task
manager contains the names of all currently active processes. Select "your" process and
enter its name under "Image Name".
Note
You can enter up to 20 processes.
Warning:
Only the first 15 characters of the process name (including the file extension) are
considered. If there are 2 processes with the same name, Guard excludes both processes
from the monitoring.
Warning
Please note that all file accesses by processes recorded in the list are excluded from the
scan for viruses and unwanted programs! The Windows Explorer and the operating
system itself cannot be excluded. A corresponding entry in the list is ignored.
Add rule
With this button, you can add the process entered in the input box to the display
window.
Delete
With this button you can delete a selected process from the display window.
File objects to be omitted for the Guard
All file accesses to objects in this list are excluded from monitoring by the Guard.
Note
The entries on the list must not result more than 6000 characters in total.
Input box
In this box you can enter the name of the file object that is not included in the on-access
scan. No file object is entered as the default setting.
The button opens a window in which you can select the file object to be excluded.
Add rule
With this button, you can add the file object entered in the input box to the display
window.
Delete
With this button you can delete a selected file object from the display window.
Please observe the following points:
– The file name can only contain the wildcards * (any number of characters) and
? (a single character).
– Directory names must end with a backslash \, otherwise a file name is assumed.
– The list is processed from top to bottom.
– Individual file extensions can also be excluded (inclusive wildcards).
– If a directory is excluded, all its sub-directories are automatically also excluded.
– The longer the list is, the more processor time is required for processing the list
for each access. Therefore, keep the list as short as possible.
– In order to also exclude objects when they are accessed with short DOS file names
(DOS name convention 8.3), the relevant short file name must also be entered in
the list.
Note
A file name that contains wildcards may not be terminated with a backslash.
For example:
C:\Program Files\Application\applic*.exe\
This entry is not valid and not treated as an exception!
Note
In case of dynamic drives which are mounted as a directory on another drive, the alias of
the operating system for the integrated drive in the list of the exceptions has to be used:
e.g. \Device\HarddiskDmVolumes\PhysicalDmVolumes\BlockVolume1\
If you use the mount point itself, such as &lsquor;C:\DynDrive’, the dynamic drive will
be scanned nonetheless. You can determine the alias of the operating system to be used
from the report file of Guard: Set the protocol function of the Guard to Complete in the
configuration under Guard :: Report. Now access the mounted drive with the activated
Guard. You can now read the drive name used from the report file of the Guard. The
report file can be accessed in Control Center under Local protection :: Guard.
Examples:
C:
C:\
C:\*.*
C:\*
*.exe
*.xl?
*.*
C:\Program Files\Application\application.exe
C:\Program Files\Application\applic*.exe
C:\Program Files\Application\applic*
C:\Program Files\Application\applic?????.e*
C:\Program Files\
C:\Program Files
C:\Program Files\Application\*.mdb

Apr 01, 2009 | Computers & Internet

2 Answers

Rename a folder in c drive using java code


import java.io.*;

public class RenameFileOrDir{

public static void main(String[] args) throws IOException{
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
System.out.print("Please enter the file or directory
name which has to be Renamed : ");

String old_name = in.readLine();
File oldfile = new File(old_name);


if(!oldfile.exists())
{

System.out.println("File or directory does not exist.");

System.exit(0);

}

System.out.print("please enter the new file or directory name : ");

String new_name = in.readLine();

File newfile = new File(new_name);

System.out.println("Old File or directory name : "+ oldfile);
System.out.println("New File or directory name : "+ newfile);
boolean Rename = oldfile.renameTo(newfile);

if(!Rename)
{

System.out.println("File or directory does not rename successfully.");

System.exit(0);

}

else {

System.out.println("File or directory rename is successfully.");

}

}

}

Mar 30, 2009 | Sun Java Programming Language (cdj-275)

3 Answers

Error to compile java program


The main cause of this error is you havent set the environment variables correctly, you can do it as follows

Right click on "My Computers" select properties the click "Environment variables" then under "User variables for pcname"

select new and add the following paths

1)var name:path
var value:C:\Java\jdk1.5\bin

2)var name:classpath
var value:C:\YourJavaCodeDirName

click ok and its done

Feb 28, 2009 | Sun Java Programming Language (cdj-275)

3 Answers

What is servlets?


Java Servlet technology provides Web developers with a simple, consistent mechanism for extending the functionality of a Web server and for accessing existing business systems. A servlet can almost be thought of as an applet that runs on the server side--without a face. Java servlets make many Web applications possible.  » Read More The reference implementation is included in the Java EE 5 SDK and also in the open-source Java Platform, Enterprise Edition (Java EE) application server, available through the GlassFish project, which you can download from java.net. The reference implementation source code is available from the servlet-sources project on java.net.

Dec 29, 2008 | Microsoft Windows Vista Ultimate Edition

Not finding what you are looking for?
Computers & Internet Logo

Related Topics:

85 people viewed this question

Ask a Question

Usually answered in minutes!

Top Computers & Internet Experts

Les Dickinson
Les Dickinson

Level 3 Expert

18386 Answers

kakima

Level 3 Expert

102366 Answers

David Payne
David Payne

Level 3 Expert

14161 Answers

Are you a Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...