 |

|
How do I create an application that uses a linked list. It must be able to do at least the following to the linked list:
check whether the list is empty
display the list
find the length of the list
destroy the list
retrieve the data in the nth node
search the list for a given item
insert an item in the list
delete an item from the list
I need help on how to start it and help in executing the actions from the list above
I'm just a beginner in Java Programming
|
|
|
|

|
how to call webservice in java using javascript with example link
|
|
|
|

|
Uum..... i kinda need help on deal on makin animation using java
Stifler
|
|
|
|

|
Hello,
When i am encrypting a string (One way hashed) using SHA algorithm, the output differs from two different platforms.
When done in windows, an extra CR (CR LF) character is appearing but when done in linux box only LF character is appearing in between the output encrypted value.
FYI - CR (enter) LF(Space)
This leading me with issues in further process of application.
Kindly help for the same
Gowthami
|
|
|
|

|
Hello,
I am trying to code an application, like sync operation between two machines to transfer the files and folders through internet. Is it possible to use ftp or any other in java and write the application?
Regards
Gowthami
|
|
|
|

|
Ho All,
I'm creating a TCP server with which I'll receive few strings.
First a file path
Second a message
Third another message
My code is:
String str;
while ((str = rd.readLine()) != null) {
System.out.println(str);
String file = str.toString();
.
..
.
.
while(something)
{
while(something new)
{
if(str.equalsignorecase("Google"))
{
System.out.print("My Yahoo");
}
else if(str.equalsignorecase("yahoo"))
{
System.out.print(My Google);
}
}
}
}
rd.close();
socket.close();
In this program, I'm able to access the first string but not getting the second string on
server.
How can I use String str multiple times sent by a TCP client?
Thanks!
|
|
|
|

|
I want to create a file path from a string.
My code is:
String files = "";
if(files!= null)
{
InputStreamReader input = new InputStreamReader(System.in);
BufferedReader reader = new BufferedReader(input);
files = reader.readLine();
File sourcefile = new File(files);
System.out.print(sourcefile.toString());
StringBuilder sURL = new StringBuilder("file:///");
sURL.append(sourcefile.getCanonicalPath().replace('\\', '/'));
}
But it is returning me project path in place of file path.
How can I do it?
Please Suggest!
|
|
|
|

|
Hi there,
I wrote :
package Haitham
import java.io.IOException;
import java.net.URISyntaxException;
import java.rmi.RemoteException;
import java.util.Properties;
import java.util.logging.Logger;
import javax.jms.Connection;
import javax.jms.ConnectionFactory;
import javax.jms.JMSException;
import javax.jms.MessageProducer;
import javax.jms.Session;
import javax.jms.TextMessage;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
public class TracingMessages
{
public static String Send_MVRI_Messages(String qname,String msg) throws IOException, URISyntaxException {
String body="";
try
{
Context init =TracingMessages.getInitialContext();
javax.jms.Queue destination = (javax.jms.Queue) init.lookup("/queue/" +qname);
ConnectionFactory connectionFactory = (ConnectionFactory) init.lookup("ConnectionFactory");
Connection connection = connectionFactory.createConnection();//
Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
MessageProducer producer = session.createProducer(destination);
TextMessage message = session.createTextMessage();
message.setText(msg );
connection.start();
System.out.println("connect strat");
producer.send(message);
body = message.getText();
session.close();
connection.close();
}
catch (Exception e)
{
return(e.toString());
}
return body ;
}
public static Context getInitialContext () throws JMSException,NamingException,RemoteException
{
Properties prop = new Properties();
prop.setProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
prop.setProperty("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
prop.setProperty("java.naming.provider.url", "127.0.0.1:1099");
Context context = new InitialContext(prop);
return context;
}
}
Then i converted to DLL file to send message from C# to jboss,
everything are goo,so i can send message from c# windows application to jboss server
but if i use the same DLL file inside web application i got the following error:
javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory [Root exception is java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory
My question Why???
any one have an idea?
Thanks
|
|
|
|

|
I need to make a java program which accepts input from user in form of item Code, quantity and rate and then display the total amount as well as discount .
the condition for getting discount is like
if the amount is greater than 5000 than discount is 10% of amount. i want to display amount and discount amount calculated ...my code works nice till it calculates amount but when moving to next step for calculating discount it shows error.
plzzz hep me out ...is there any error in my code??
am new to Core java
thank you...
import java.io.*;
class AMOUNT
{
public static void main(String args[])
{
Double discount= 0.0 ;
InputStreamReader istream = new InputStreamReader(System.in) ;
BufferedReader br= new BufferedReader(istream);
System.out.println("Welcome to My Java Program");
try
{
System.out.println("enter the item code:");
String code=br.readLine();
System.out.println("enter your quantity:");
String quantity=br.readLine();
System.out.println("enter the rate:");
String rate=br.readLine();
int qty=Integer.parseInt(quantity);
int Rate=Integer.parseInt(rate);
int amnt= qty*Rate;
System.out.println("your amountis"+amnt);
if(amnt > 5000)
{
discount=Double.parseDouble(br.readLine());
discount= 0.1 * amnt;
System.out.println("your discount is"+discount);
}
else
{
System.out.println("you dont have discount");
}
}
catch (Exception e)
{
System.out.println("error");
}
}
}
Aman Kumar Routh
|
|
|
|

|
how to save java programs in c drive.i tried to change the advance security options of c drive, but couldn't work.
|
|
|
|

|
i have a problem where, i need to import a file and check the whole coding byte by byte ,then comparing ,but how to do that with dynamic array. as i want to just list all the used file used in an array of list item dynamically.
|
|
|
|

|
Hey,
how can I parse a odata atom feed?
Notice: The xml data are already on my system. So I need a libary that takes a string or local file path.
Example:
<?xml version="1.0" encoding="utf-8"?><feed xml:base="http://10.0.2.2/dataservice/data.svc/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://10.0.2.2/dataservice/data.svc/Areas/</id><title type="text">Areas</title><updated>2013-03-28T14:45:13Z</updated><link rel="self" title="Areas" href="Areas" /><entry><id>http://10.0.2.2/dataservice/data.svc/Areas('filestore')</id><category term="Dms.Data.Services.Context.Entities.DmsArchiveArea" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="DmsArchiveArea" href="Areas('filestore')" /><title /><updated>2013-03-28T14:45:13Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id>filestore</d:Id><d:Name>filestore</d:Name><d:Reche m:type="Edm.Boolean">true</d:Reche><d:Scann m:type="Edm.Boolean">true</d:Scann><d:Indiz m:type="Edm.Boolean">true</d:Indiz><d:Datei m:type="Edm.Boolean">true</d:Datei><d:Revis m:type="Edm.Boolean">true</d:Revis><d:Speich m:type="Edm.Boolean">true</d:Speich><d:Druck m:type="Edm.Boolean">true</d:Druck><d:Mail m:type="Edm.Boolean">true</d:Mail><d:Archiv m:type="Edm.Boolean">true</d:Archiv><d:Attrae m:type="Edm.Boolean">true</d:Attrae><d:Annoarch m:type="Edm.Boolean">true</d:Annoarch><d:Annorech m:type="Edm.Boolean">true</d:Annorech><d:Annorevi m:type="Edm.Boolean">true</d:Annorevi><d:ReviView m:type="Edm.Boolean">true</d:ReviView><d:ReviAend m:type="Edm.Boolean">true</d:ReviAend><d:WeichAttribAend m:type="Edm.Boolean">true</d:WeichAttribAend><d:IntervallEinstellBar m:type="Edm.Boolean">true</d:IntervallEinstellBar><d:SeitenKopieren m:type="Edm.Boolean">true</d:SeitenKopieren><d:SeitenAend m:type="Edm.Boolean">true</d:SeitenAend><d:DokLoeschen m:type="Edm.Boolean">true</d:DokLoeschen></m:properties></content></entry
Thank you =)
|
|
|
|
|

|
Hi dears I want install bundle on apache felix framework in OSGI so first start felix and then show g! message on cmd now when I want install bundle write this command : Install file : C:\Users\Farshad\Desktop\myJar.jar but throws exception !! that Exception message is : java.net.MalformedURLException: no protocol: file java.net.MalformedURLException: no protocol: : java.net.MalformedURLException: Unknown protocol: c
How I can do this? I use Windows 7 (64 bit) os. thanks a lot.
|
|
|
|

|
what the whole code of "Soduko" ? please answer this question
|
|
|
|

|
I want to create a presentation controller using openoffice impress.
I create the application that opens openoffice impress and I'm having a problem
that I want to open this .odp file in a panel in my form.
But it always opens in a new window.
How can I set parent to this impress file and can open this in my panel?
Thanks!
|
|
|
|

|
i am using slick package
i already made my map with tiled map and now i want to use it in my project so ,
i wrote these statemnts :
map = new TiledMap("data/1.tmx");
map.render(0, 0);
but when i run it i got just the layer background
how i can display my tiles and my other layers
(i have three layeres object ,collision ,and background )
|
|
|
|

|
my project is super mario game with java
i am using package slick
i really really need help from export
please can anyone help me
|
|
|
|

|
Hi,
I have written a simple ejb application(stateless session bean) in eclipse. When iam running the client program getting the below exception on console:
javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
My client program is as below:
import javax.naming.InitialContext;
import example.ExampleSessionBeanRemote;
public class Main {
public void runTest() throws Exception {
InitialContext ctx = new InitialContext();
ExampleSessionBeanRemote bean =
(ExampleSessionBeanRemote) ctx
.lookup("ejb/ExampleSessionBean");
int result = bean.multiply(3, 4);
System.out.println(result);
}
public static void main(String[] args) {
Main cli = new Main();
try {
cli.runTest();
} catch (Exception e) {
e.printStackTrace();
}
}
}
How to solve the above exception, do i need to include something in websphere, i have just include the jar file of the session bean i have written in eclipse.
Thanks.
|
|
|
|

|
HI All,
I have a drop down list which contains the months (Jan,Feb..Dec) and a java script calendar.when I click on calendar it should open the month selected in drop-down list as it is opposed to the current month.Can any one help me how can I do it.
|
|
|
|

|
i want to develop a project where i struck in a situation where i have to import two files with .jsp format and want to check whether that 1.jsp and 2.jsp two files are equal or not in their internal coding or it is different ?
Any idea please help
|
|
|
|

|
I anticipate to learn android.
|
|
|
|

|
1) Shortest way of creation of Queue object and use push and pop methods.
2) Can the queue handle 50,000 thousand string elements in it?
|
|
|
|
|

|
Hi,
I have created an Eclipse plug-in, A dialog is shown using a command and when user click ok button, reads the data in the View and sends the data to Server using TCP/IP. But the problem is the dialog gets hanged till I receive the response from the TCP/IP.
My query is how to launch a thread for reading the data from the view and send to the TCP/IP?
Any suggestions please!!!
|
|
|
|

|
Sir i just wanted to know the code for K-means Clustering on text documents !! As the code is available in C#! but I am not able to get it! and I am new to this site! So can anybody help me please! Thanks a lot!
|
|
|
|
 |