|
duo!@# wrote: Wht are the good points of using it.
It has a simpler object model and fewer low-level facilities than C++. Its bytecode can run on any JVM regardless of computer architecture. Its automatic memory management model spares programmers the burden of having to perform manual memory management. It does not support pointer arithmetic, thus type safety and security are guaranteed.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Hi,
I am getting following error while trying to run a Java appliation written in Swings using WSAD.
Fatal transport error: Connection refused: connect
2008-06-05 18:19:10,279 ERROR TFGHttpRequestHandler : Fatal transport error: Connection refused: connect
java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
at java.net.Socket.connect(Socket.java:461)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.commons.httpclient.protocol.ReflectionSocketFactory.createSocket(ReflectionSocketFactory.java:140)
at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:125)
at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
at com.freedomgroup.common.communicator.TFGHttpRequestHandler.processRequest(TFGHttpRequestHandler.java:247)
at com.freedomgroup.common.request.TFGServiceInvoker.invokeService(TFGServiceInvoker.java:154)
at com.freedomgroup.global.sysadmin.gui.externalbridge.TFGGlobalSysAdminGUIExternalBridgeImpl.getSysAdminConfigByCorp(TFGGlobalSysAdminGUIExternalBridgeImpl.java:1089)
at com.freedomgroup.global.util.TFGGlobalUtilities.getGlbPwdConfigEnable(TFGGlobalUtilities.java:123)
at com.freedomgroup.cws.gui.base.TFGCWSLogonForm.<init>(TFGCWSLogonForm.java:185)
at com.freedomgroup.cws.gui.base.TFGCWSGUIRunner.init(TFGCWSGUIRunner.java:85)
at com.freedomgroup.cws.gui.base.TFGCWSGUIRunner.main(TFGCWSGUIRunner.java:116)
I tried to use various ports to run the application to no avail. For information the default port 80 was being used by some other appliation to I had to choose a different port.
Please help its urgent.
Ashish
|
|
|
|
|
How can i determine client machine's IP using JAVA?
|
|
|
|
|
hi all
i need to determine the right designing points when implementing a voice conference what is the efficient protocol and what is the main points to design a good simple one
thanks in advance
|
|
|
|
|
I think this java forum should be divided in to following categories
1.Core java
2.Spring
3.Struts
4.Hibernate
5.EJB
6.JSF.
7.Jsp
8.Servlets
9.Web Services
10.Swing
11. Other J2EE Stuffs
this java forum requires more java experts, if any one knows java experts invite them to answer in this forums.
|
|
|
|
|
but maybe this board is badly frequented too.
look, I made several replies there, but got no answers...
|
|
|
|
|
This forum hasn't been up and running that long, it'll take a while for people to start coming here to discuss Java. Remember the rest of the code project is a fairly Microsoft centric site so alot of the top posters may not even use Java.
|
|
|
|
|
How to get client information, such as ipaddress, OS version, domain using Jsp.
If client gives a request to my web application, I need to know the OS, Ipaddress of client. How s this possible?
Plz help me...
Thanks in advance
|
|
|
|
|
Hello Everybody.
Can anyone help me openning a socket in remote by using th ip of remote host and to send it the request at port 80.
Thanks
|
|
|
|
|
Hello
You should have a look at Java tutorials-Custom Networking
[^]
for a quick and simple example:
Socket sock = new Socket("server ip", 80);
PrintWriter writer = new PrintWriter(sock.getOutputStream(),true);
writer.println(data);
sock.close();
writer.close();
data is a variable that holds your request.
|
|
|
|
|
how to open folder using bowse and saving that in a different folder using j2ee
|
|
|
|
|
i wish to have the code for shopping cart using sessions with servlets in j2ee. can anybody help me.
modified on Tuesday, May 27, 2008 6:21 AM
|
|
|
|
|
pre>
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.*;
import java.lang.*;
public class Purchased extends HttpServlet
{
public void doGet(HttpServletRequest req,HttpServletResponse res) throws ServletException,IOException
{
HttpSession sessions=req.getSession();
ArrayList previousItems=(ArrayList)sessions.getAttribute("previousItems");
..................
}
}
how can i extract the elements from the previousItems arraylist to a string array?????????
|
|
|
|
|
did you bother reading the javadoc ?
the ArrayList class has the toArray()[^] method, which returns an Object[].
also, as long as you don't tell what type of elements the arraylist contains, i can't help much. please indicate what version of Java you use too.
|
|
|
|
|
Hi I was wondering if I could get some help with my java program, for my computer engineering class.
I need to write a program that does the following:
• Ask the user for a number in the decimal (base 10) number system
• Store this number into a variable with a suitable type and name
• Take this number and convert it into binary (base 2) using the algorithm learned in the previous unit. – take the number, divide it by two, keep track of the remainder, continue until you reach a quotient of 0.
• To find the remainder, you need to use the ‘mod’ function
• It is possible to add to a variable of type String – this is needed to keep track of your binary converted number
Since I didn't really understand the whole adding string variables concept, I decided to stick with what I do know.
- Based on that, I came up with this program, but the thing is, the conversion to binary comes out backwards.
- take the number 11 for example: instead of 1011, I get 1101 when it is converted into binary.
- basically I need help getting it to switch the numbers around
**This is the program that I came up with:
int input;
int r;
System.out.println ("Please input a number in the base 10 number system.");
input = Integer.parseInt (in.readLine());
while (input != 0)
{
r = input % 2
System.out.print(r);
input = input / 2;
}
if (input == 0)
{
System.out.print ("0");
}
Any help with this is much appreciated. Thanks ahead of time.
|
|
|
|
|
Well, a quick fix to your problem of reversed digits in binary ---- convert your int variable to a string and swap the individual binary bits around, then convert back to int if desired or just leave it as a string and print it that way.
John P.
|
|
|
|
|
Please let me know what is the use of appenders that is included in the properties file of log4j. And how it works?
THANKS.
|
|
|
|
|
i am planning to making soma cube.
i am looking for data about soma cube, and find this site.
" http://users.ids.net/~salberg/soma/Soma.html "
i try to control block by using SHIFT, CTORL key but i can't.
i want to know how am i control these block~
i will very thank you for giving me tip.
Have a good day~
firstly, i am sorry, i am from korea.
and i am not good in wriitting english so please understand~
Thank you everyone~
|
|
|
|
|
Suppose I have a multithreaded application which is using log4j and there are three threads t1,t2and t3 running and calling the same logging function passing a message aolng with threadID, for instance log.info("info message"). So how does log4j handles this. Please let me know how does log4j synchronizes these threads so that only one thread runs at a times. Were does this synchronization takes place.
THANKS.
|
|
|
|
|
Hey,
I have a java menu, presented through a SSI.
Problem is, the drop down menus are always hidden behind any Flash paper we use on the site.
Does anyone have any ideas how to get around this?
(i have already tried changing all the Z-Index's)
Regards,
Spike
|
|
|
|
|
<small><big>I know how to extract jar file but I just want to create a jar file<br />
help me </big></small>
|
|
|
|
|
what IDE do you use ?
eclipse ?
|
|
|
|
|
<big>how many paths are to be set in core, advance,j2ee,j2me in Java in the environment variable of the systems property<br />
explain me with variable name and variable value which i can set in systems property and software inforemation which can i use in java</big>
|
|
|
|
|
I'm sorry, but I don't understand anything of what you say.
please rephrase, and explain shortly what you want.
also, please don't format in big colored letters, it's harder to read.
|
|
|
|
|
Hi java Gurus my code is as shown below....
import java.net.*;
import java.io.*;
import java.util.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import java.util.Vector;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
class ConnectionTest {
public static void main(String[] args) {
try
{
URL yahoo = new URL("http://www.overstock.com/Jewelry-Watches/Rings/2360/cat.html");
URLConnection yahooConnection = yahoo.openConnection();
DataInputStream dis = new DataInputStream(yahooConnection.getInputStream());
String inputLine;
//int tablecount=0;
int start=0;
while ((inputLine = dis.readLine()) != null) {
if(inputLine.contains("<table")) {
start++;
}
if(start!=0) {
System.out.println(inputLine);
}
if(inputLine.contains("</table>"))
{
start--;
}
}
dis.close();
}
catch (MalformedURLException me) {
System.out.println("MalformedURLException: " + me);
}
catch (IOException ioe)
{
System.out.println("IOException: " + ioe);
}
}
}
Now my code extracts all the <table>s from the web page I need to display only the product and price table data and block table data like advertisements ,copyright notes and navigation panels.
Java gurus plzzzz help me out in altering the code and getting the result.<pre></pre>
|
|
|
|