public class OpertingSystemInfo
{
public static void main(String[] args)
{
String nameOS = "os.name";
String versionOS = "os.version";
String architectureOS = "os.arch";
System.out.println("\n The information about OS");
System.out.println("\nName of the OS: " +
System.getProperty(nameOS));
System.out.println("Version of the OS: " +
System.getProperty(versionOS));
System.out.println("Architecture of THe OS: " +
System.getProperty(architectureOS));
}
}
How to get my computer details in java
If you searching for a third partyAPI that helps you to get other information than above
SIGAR api is one of them
The program show a small demonstration of how Audio chat works in java. Click on the link to get the code. Two or more user can audio chat with the application. The program is developed using networking and java packages.
Please try audio chatting program... dont forget to post your feed back.
did you ever tried two way chatting using java code. Here we use socket communication, thread for this program. click the below link to download the code. javablzy
Java Chat application using TCP java socket programing example. The program communicates with other through port number 3000 and 2000, developer can change this to what ever they want. avoid using first 1024 reserved ports. The program search the other system by its computer name, so please provide the name correctly. The program is so simple, easy to understand. The interface here used is to create two variable for storing port number. And explaining the code: Getting user input as string, converting them to bytes, storing it in a variable then sent through datagram socket as datagram packets through a port number specified. On the other hand the program keep on listening to that port number, if a request comes through that socket , it will receive it as byte convert to string the display the message. JAVA thread is used for listening
System 1
/**
Chatting example in java
javabelazy
*/
import java.io.*;
import java.net.*;
interface pen{
final int cp=3000;
final int sp=2000;
}
public class Cli5 implements pen{
public static void main(String[] args)throws Exception {
How to create a bi directional chat application using java networking
/**
Chatting example in java
javabelazy
*/
import java.io.*;
import java.net.*;
interface pen{
final int cp=2000;
final int sp=3000;
}
public class Cli4 implements pen{
public static void main(String[] args)throws Exception {
This is a small example in java to show how media files works. copy paste the code in some ide or also you can use notepad to run the application. Click on the Program to get the source code.
Thanking you....
Access restriction: The type Network Interface is not accessible
Eclipse IDE
Dear Friends, Hope any one had gone through this error once in your life if you had worked on any java networking projects or programs
This post will help you to clear the error " Access restriction : The type network interface is not accessible" which happens while java developers works on eclipse.
Scientific Calculator source code developed in java swing
Description : A simple Java Swing Calculator, Example for setBounds in java, Example for actionListener interface. Here i tried to Implement a simple Java Calculator. copy and paste the code to a notepad. compile the program with javac and run using command prompt java calculator
Reflection in java makes it possible to inspect and call classes, methods, attributes etc dynamically at run time. Reflection is not possible in other programming languages such as c++.
Here i wrote a simple java program to know how reflection works.
StudentModel.java
/**
* JavaBelazy Java source code download
*/
/**
* @author +belazy
*
*/
public class StudentModel {
private String name = "javasourcecode";
private int id = 622;
private boolean isPassed = false;
//private double totalMark = 788;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public boolean isPassed() {
return isPassed;
}
public void setPassed(boolean isPassed) {
this.isPassed = isPassed;
}