How to create a LAN using java
i want to create a LAN like environment using java [ maximum 4 clients] - how do i do this using socket programming .
Create 4 independent network clients and this will work like four clients on different machines.
Similar Messages
-
How to run .jar on linux & how to create .jar file using java?
hi, may i know how to run .jar on linux & how to create .jar file using java? Can u provide the steps on doing it.
thanks in advance.Look at the manual page for jar:
# man jar
Also you can run them by doing:
# java -jar Prog.jar -
How to create sub domain using java ?
how to create sub domain using java ?
for example:
name1.domainname.com
name2.domainname.com
is it possibe ?You don't do that using Java.
Consult the documentation of the application server in question how to configure it. If you're using for example Tomcat 6.0, then you should be consulting this document: [http://tomcat.apache.org/tomcat-6.0-doc/virtual-hosting-howto.html]. -
How to create a TOOLBOX using Java - a real CHALLENGE for U
Hello,
I want to create a Toolbox using Java which will contain different components of my interest.I should be able to select one component and paste it in a frame also be able set the property of individual component after placing in the frame,just like VB toolbox.
Can anybody suggest with code samples??
Regards,
Suraj.You are essentially asking how to write an IDE (Integrated Development Environment). This is a big question. You might start by looking at existing IDE's (JBuilder, Forte...) and see how they do it. If you want source, there is probably an open source IDE you can lift most of your code from.
-
How to create sql database using java frame or appelet?
hi ! i am working on database project i want to create a database using java frame or applet where it asks user to select the location for database to be created , after user have specified the path then the programs creates the database, again i want that database to be read and write by another frame or applet but as user select the path how do i make the connectivity. i just have basic knowledge on java. please give me idea how can i process further.
thanks a lotWhile duffymo is correct in regard to most major database products, it's my understanding (warning! wild-ass guess coming) that the Hypersonic DB is more "application-centric" and the dynamic creation of databases is part of its design. It's pure Java database software, and therefore is not appropriate for all database projects, in particular those that require extremely high-performance.
See http://hsqldb.org/
I've not used it yet (but soon though), and I can't really advise anyone about it.
However, I'm wondering if you phrased you question in a way that is confusing us. To most of us in casual conversation, a "database" is both (1) a large organized collection of data and (2) the software that is used to organize and access it. However, the phrase "create a database" usually means creating a (1) database (a collection of data) using an already created (2) database software, such as Oracle, MySQL, DB2, HSQDB, etc., etc. If you'r question is, how do a create some new database software using Java, the answer is that this is a very very big and hard thing to do for the general case and probably not something you want to be doing. -
How to create a Folder using java.
Hi All,
I have a doubt. I want to create a folder using java.
Inputs are the destination where the folder should be created and the name of the folder. Plz help me in this regard.
thanks and regards,
Vincent .R.check out javadoc for java.io
File reldir=new File("NewDir");//relatively where your program runs
reldir.mkdir();
File absdir=new File("C:/NewDir");//absolute path
reldir.mkdir();
File newdir=new File(absdir,"SubDir");//defines another dir under absdir
newdir.mkdir();
Gil -
How to create a class using java script..
Hi all,
Iam new to java script and I tried out the following program but its not working..I basically created a class just like a java prog' but Iam not getting any output or error.Iam attaching the code below.
If I created one function inside the script and create one object its working fine but what should I do when I have a lot of function??so I created a class and put all the function and created an object but its not working..
Do let me know what changes should I do..Iam attaching the code which I had written. or give me an example of how to create a class with couple of functions using JAVASCRIPT
Thanks
Avis_su
<html>
<head><title>JSP Page</title></head>
<body>
<SCRIPT language = "JavaScript">
<!--
//Created classes
class book
var title: String;
var author:String;
function author()
doucument.write("Author is " +this.author);
function tile()
doucument.write("Title is " +this.title);
function printall()
var counter = 0;
function author();
function title();
var chapters = Array[String];
for(chapter in this chapters)
counter++;
document.write("Chapter" counter" :"+this.chapters[chapter]+"<br>");
var thisbook = new book()
thisbook.author = "Sivagami";
thisbook.title = "MS in CS giude";
thisbook.chapters = new Array[10];
thisbook[0] = "Prepare to Excell in all ";
thisbook[1] = "Learn to be happy";
thisbook[2] = "Learn to be healthy mentally emotionally physically";
thisbook[3] = "Siva and Subbu along with kidssssss will be successful in future";
thisbook.printall();
//-->
</script>
</body>
</html>Run this program to get your answer:
public class AnswerToYourPost {
public static void main(String args[]) {
System.out.println("TRUE/FALSE: This question
ion belongs on a Java forum.\n"
+ "ANSWER: " + ("Javascript" == "Java"));
}Since when do we compare objects for equality using operator == ? -
How to create a database using Java?
Hi there..
I'm a student who is currently studying IT and was asked to do a project based on database but create using Java.. since i'm a beginner..i was wondering whether is it possible to do that?
and if it is possible.. can you kindly show me a sample of code on how to start the project...
thank you
yours sincerely,
ShafiniWhile duffymo is correct in regard to most major database products, it's my understanding (warning! wild-ass guess coming) that the Hypersonic DB is more "application-centric" and the dynamic creation of databases is part of its design. It's pure Java database software, and therefore is not appropriate for all database projects, in particular those that require extremely high-performance.
See http://hsqldb.org/
I've not used it yet (but soon though), and I can't really advise anyone about it.
However, I'm wondering if you phrased you question in a way that is confusing us. To most of us in casual conversation, a "database" is both (1) a large organized collection of data and (2) the software that is used to organize and access it. However, the phrase "create a database" usually means creating a (1) database (a collection of data) using an already created (2) database software, such as Oracle, MySQL, DB2, HSQDB, etc., etc. If you'r question is, how do a create some new database software using Java, the answer is that this is a very very big and hard thing to do for the general case and probably not something you want to be doing. -
How to create the chart using java
Hi Friends,
I have one urgent requirement.I need to create the chart by using the table value.The value is stored in database like as follow..
Attribute IG
Home 0.05
Married 0.72
Gender 0.05
Employed 0.05
Rate 0.05
I need to get the highest value and create the parent node and lowest value is child node llike that i need create ...
plz any body help me....You don't do that using Java.
Consult the documentation of the application server in question how to configure it. If you're using for example Tomcat 6.0, then you should be consulting this document: [http://tomcat.apache.org/tomcat-6.0-doc/virtual-hosting-howto.html]. -
How to create tagged PDF using java iText
Hi
I want to create PDF for accessibility purpose using java and iText
Please help.
Thanks in advancei did this some yrs ago ..scratched and found some code for you. Have a look
package com.oq.utility;
import com.lowagie.text.Cell;
import com.lowagie.text.Document;
import com.lowagie.text.Element;
import com.lowagie.text.Font;
import com.lowagie.text.HeaderFooter;
import com.lowagie.text.Image;
import com.lowagie.text.PageSize;
import com.lowagie.text.Phrase;
import com.lowagie.text.Rectangle;
import com.lowagie.text.Table;
import com.lowagie.text.pdf.BaseFont;
import com.lowagie.text.pdf.PdfWriter;
import com.oq.model.Sale;
import java.io.FileOutputStream;
import java.util.ArrayList;
import java.util.List;
public class iTextExample
public static void main (String[] args)
iTextExample eg = new iTextExample();
Sale sale = new Sale();
sale.setOdrNumber("1");
sale.setOdrDate("12-12-12");
sale.setOdrCatCode("Örder");
sale.setTotalInvValue("1234");
sale.setRefNumber("in the line of fire");
Sale sale1 = new Sale();
sale1.setOdrNumber("1");
sale1.setOdrDate("12-12-12");
sale1.setOdrCatCode("Örder");
sale1.setTotalInvValue("1234");
sale1.setRefNumber("fire line");
Sale sale2 = new Sale();
sale2.setOdrNumber("1");
sale2.setOdrDate("12-12-12");
sale2.setOdrCatCode("Örder");
sale2.setTotalInvValue("1234");
sale2.setRefNumber("in the line of firel");
List<Sale> list = new ArrayList<Sale>();
list.add(sale);
list.add(sale1);
list.add(sale2);
eg.printPDF(list);
public void printPDF(List list) {
Document document = new Document(PageSize.A4, 50, 50, 50, 50);
try
// creation of the different writers
PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream("iTextExample.pdf"));
// various fonts
BaseFont bf_helv = BaseFont.createFont(BaseFont.HELVETICA, "Cp1252", false);
BaseFont bf_times = BaseFont.createFont(BaseFont.TIMES_ROMAN, "Cp1252", false);
BaseFont bf_courier = BaseFont.createFont(BaseFont.COURIER, "Cp1252", false);
BaseFont bf_symbol = BaseFont.createFont(BaseFont.TIMES_ROMAN, "Cp1252", false);
// headers and footers must be added before the document is opened
HeaderFooter footer = new HeaderFooter(
new Phrase("This is page: ", new Font(bf_courier)), true);
footer.setBorder(Rectangle.NO_BORDER);
footer.setAlignment(Element.ALIGN_CENTER);
document.setFooter(footer);
HeaderFooter header = new HeaderFooter(
new Phrase("This is a header without a page number", new Font(bf_symbol)), false);
header.setAlignment(Element.ALIGN_CENTER);
document.setHeader(header);
document.open();
Image img = Image.getInstance("arrow-ff.gif");
img.setAlignment(Image.RIGHT | Image.TEXTWRAP);
Table goodTable = new Table(2);
Cell cell1 = new Cell(img);
goodTable.addCell(cell1);
document.add(goodTable);
Cell c = new Cell("Header");
c.setHeader(true);
goodTable.addCell(c);
Cell c1 = new Cell("Header1");
c1.setHeader(true);
goodTable.addCell(c1);
Cell c2 = new Cell("Header2");
c2.setHeader(true);
goodTable.addCell(c2);
goodTable.endHeaders();
int j=0;
while (j< list.size())
Sale sale = (Sale)list.get(j);
c = new Cell(sale.getOdrDate());
goodTable.addCell(c);
goodTable.addCell(sale.getRefNumber());
j++;
document.add(goodTable);
// add text at an absolute position
document.close();
} catch (Exception ex) {
System.err.println(ex.getMessage());
} -
How to create poll functionality using java(struts)
Hiii,
How to create the poll functionality to place into the site. I am using struts and XML file to store the data. We should able to view the result of the poll in horizontal bar graph.
Please give me an idea how to implement it or provide a link which has the implementation.
ThanksWhatever happened to good, old-fashioned thinking? All we see here now is "how to write <common application> with minimal input from myself?"-type questions. It's only a matter of time until we get people coming here asking "how to write <massively-scoped enterprise app>? What class I need for that?". Oh, wait. We already do get that
-
How to create mysql backup using java
please i am trying to create a backup of my database using mysqldump with the runtime class. But it is not working out. Please can anyone give me a code that creates mysql backup in java?. I will be grateful.
It might help to know what
ushahemba wrote:
it is not working outmeans.
Please can anyone give me a code that creates mysql backup in java?.Now, I'm sorry, but why should anyone do your work for you?
Read this thoroughly and conpletely, and implement the recommendations there. -
How to create a Directory using Java
Hi friends,
I want to create a file in side a directry. File should be place inside that directry. If directry is not exist then a new directory should be created.
Eg., c:\upload\source\log.txt
If the folder source is present inside the upload then there is no probs. If it does not exist then this foldder structure is needed to be created
Thanks in advance,
BalamuraliTry reading the API documentation for the java.io.File class:
http://java.sun.com/j2se/1.4.2/docs/api/java/io/File.html
Many questions like yours can be answered simply by reading the API. -
How to Create Symbolic link using pure Java code?
Hi,
I would appreciate if someone can tell me how to create symbolic link using JAVA API. I have looked into many forums but couldn't get a better answer.Java is likely not the tool to use here, as symlinks are not present in Windows while "pure" Java attempts to be platform independent. You could use Runtime.exec to execute the ln -s command
http://forum.java.sun.com/thread.jspa?threadID=664475&messageID=3892685
Good Luck
Lee -
How to send mail attachments using java mail
can any one help how to create mails attachments using java mail
you can do it like this:
Message msg = new MimeMessage(session);
String fileAttachment = "c:/test.txt";
Multipart mp = new MimeMultipart();
BodyPart bp = new MimeBodyPart();
FileDataSource fds = new FileDataSource(fileAttachment);
bp.setDataHandler(new DataHandler(fds));
bp.setFileName(fds.getName());
mp.addBodyPart(bp);
msg.setContent(mp);
...
Maybe you are looking for
-
Starting Desktop impossible in Virtual Box: Unable to delete desktop
Hi @all, another recurring problem is that some desktop won't start. Trying to do so neither implicitly via regular login nor explicitly via VDI-Manager works. Error throuwn by the Job says: The desktop VDI3-VBox-Adm01 could not be deleted from host
-
Why does the screen flicker on new MacBook Air when I scroll?
I just bought a new MacBook Air a few days ago. I notice that the screen flickers when I scroll and is not anywhere near as smooth as on my old MacBook Pro.
-
Solution Directory----Merging two projects in Solution
Dear Team, I am working in Sol Man 4.0 SP 13. we have created two projects in Sol Man & we have done our entire implementation thro Sol Man. Now the two projects are gone live. Now we want to maintain "Solution Directory" merging these two project
-
Multithread socket programming
Hello, I'm new to socket programming world. I've to send/receive the data from a external system thru socket. Since # of data to be processed is huge, I'm thinking to have multiple threads to send/receive thru socket. It looks like socket is NOT thre
-
When I upgraded Adobe Flash it disabled my Themes and i cannot reinstall it.
Installed Adobe Flash (AdobeFlashPlayerInstaller_11au_aih.dmg) yesterday and it disabled my Theme and I cannot restore the Theme. I have tried restarting, etc. I'm using an iMac running Firefox 20.0