Basic File Manipulation With Java
Java Configuration File API
This is a simple Java Configuration file API. It provides methods for reading key-value pairs from a file. The main benefit over using Java's standard Properties class is support for nested array configuration values. This implementation is inspired by, but somewhat more basic than libconfig, a very useful C/C++ Configuration File Library.
How to Create File and Directory
In this Java File Tutorial we will basics of File and Directory in Java, How to Create File and Directory in Java, Utility methods provided by File API and Common Exception or Error you will face during File and Directory Creation or access time. Creating File is different than creating Thread in java as you don't have to implement any interface for making a Class as File in Java.
Primitive types are the most basic data types available within the Java language; these include boolean, byte, char, short, int, long, float and double. These types serve as the building blocks of data manipulation in Java. Such types serve only one purpose — containing pure, simple values of a kind. Because these data types are defined into the Java type system by default, they come with a number of operations predefined. You can not define a new operation for such primitive types. In the Java type system, there are three further categories of primitives:
How to make hidden files in Java Program with Example
we will see how to hide file in Java or make hidden file in Java. As we said File API in Java doesn’t provide any method to make a file hidden in Java but still you can apply some quick tricks to hide files from Java program. Like in Unix environment any file whose names begin with dot (.) is hidden so you can name your file starting with dot (.) and your File will be hidden in Linux or Unix Environment.
File Handling in Java
A look at the file handling methods that Java provides, and an introduction to the complex I/O system that comes packaged in java.io. Read This Useful Java Tutorial
How to read and write in text file
Reading and writing from file in Java is very simple once you are familiar with readers, streams, input stream and output stream in Java. code example and explanation of how to read from file in java.
Creating Java Servlets With NetBeans
Learn to create Java servlets in the NetBeans IDE. The tutorial creates a basic mailing list and explores file access along with some DOM XML. Also covered is deploying the servlets with Glassfish.
MySQL and Java DB
So, finally, more on Java DB-- It’s the Sun-supported version of Apache Derby with all development done with the Apache Derby community. It’s a complete relational database engine, written in 100% Java with a small footprint of 2MB of a JAR file. It runs on Java EE, and Java SE and more. It has a multi-tiered design for different use cases.
How to check permissions on File and Directory
In this article we will learn how to check whether file is read only , whether file has write permission or not etc. In Java we know we have file object to deal with Files if we have created any file in our application using the file object , we have the privilege to check the access permission of that file using simple method of File class in Java.
How to Set Path for Java in Windows
In this Java PATH tutorial we will see what is PATH for Java, How to Set Path for Java and how to troubleshoot PATH related issues.
PATH is one of fundamental Environment variable on shell or DOS but it’s commonly associated with Java mainly because if we try to run a java program which doesn't include Java executable in PATH then we say PATH is not set for Java and we need to set path for Java. I have also seen developer getting confused over path and classpath in java.
Java beginners course
1: Basic Java
2: Procedural Java
3: Introduction to Objects
4: More Objects
5: Introducing Applets
8: LayoutManagers, Windows, and Dialogs
9: Images and Menus
10: I/O and Streams
12: Network Programming
13: Cut and Paste, Printing, Future Directions
How to use Memory Mapped File
Memory Mapped File in Java are special files which allows java program to read and write directly to memory which is extremely fast compare to stream based IO and allows programmer to code high performance java application.
Building XML With Java And DOM
This tutorial covers building basic XML structures in Java. Learn basic XML structure, and how to build XML in Java with DOM. Also learn to use the TransformerFactory to convert the DOM to strings.
How to change File Permissions
Setting file permission in Java is made convenient by methods provided in Java File class like canRead, CanWrite allows you to set read and write permission on file. you can also change permission by using same code.
Dynamic Property Loader Using Java Dynamic Proxy Pattern
While reading through Stackoverflow, I came up to this interesting question: Java Properties File binding to Java Interface. The idea is simple but quite helpful.
How To Create A Java Executable Jar File
This is a tutorial that should help you learn how to make a jar file quickly and easily for all of your programs. Creating a jar file is not difficult to do, and it is something that should certainly be learned by beginning Java programmers.
A simple example to show how to use java properties file
I am trying to make a simplified Database class for Database connection and query operations. It’s a good idea to put the database config information to a properties file. In this way, when the code is packaged to a jar file, other users can just put the different database configuration in the config.properties file. This can also avoid editing code in several different places. When your project is changed at work, you can update the .java file only. When you work at home, you then can download that .java code file only and work on it. Sometimes, this works as well as SVN if you don’t have one.
Java Properties File Examples
Normally, Java properties file is used to store project configuration data or settings. In this tutorial, we will show you how to read and write to/from a properties file.
Difference between a primitive type and a class type
Every variable in Java has a type, which essentially tells Java how that variable should be treated, and how much memory should be allocated for that variable. Java has basic types for characters, different kinds of integers, and different kinds of floating point numbers (numbers with a decimal point), and also types for the values true and false – char, int, float, and bool. All of these basic types are known as primitive types.
Love and hate for Java 8
Java 8 may be the most anticipated version of Java ever. Originally slated for release in September, Java 8 has been delayed until March of next year, supposedly to buy time to make security fixes aimed mainly at client-side Java (JavaFX/Swing).