|
Hello Richard Sir
I found the solution.
I have to associate file with jar.And in windows7 we have to add manually.and for that we have to do like this
Go to Command Prompt
c:\assoc .jar=jarfile
c:\ftype jarfile="path of javaw.exe" -jar "%1" %*
Regards
Yogesh
|
|
|
|
|
OK, I guess you did not make it clear in your earlier posts that you were trying to run this by just calling the file e.g.
nameofjarfile
and not by
java -jar nameofjarfile
It's time for a new signature.
|
|
|
|
|
Hi Guru's
I need to implement the webservices (like google free webservice). Can any one told me how can i implement it.
See i have already implements, Its Google map API now i need to implement the Spelling correction webservices.
Can any one help me please.... How should i start
Regard's
Kaushik
|
|
|
|
|
|
Hello,
i get quite short code of algorithm in python, but i need to translate it to Java. I didnt find any program to do that, so i will really appreciate to help translating it.
I learned python a little to know how algorithm work.
The biggest problem is because in python all is object and some things are made really very confuzing. At first i dont know which structure to take in java.
code is:
[CODE]
class FlowNetwork(object):
def __init__(self):
self.adj, self.flow, = {},{}
def add_vertex(self, vertex):
self.adj[vertex] = []
def get_edges(self, v):
return self.adj[v]
def add_edge(self, u,v,w=0):
self.adj[u].append((v,w))
self.adj[v].append((u,0))
self.flow[(u,v)] = self.flow[(v,u)] = 0
def find_path(self, source, sink, path):
if source == sink:
return path
for vertex, capacity in self.get_edges(source):
residual = capacity - self.flow[(source,vertex)]
edge = (source,vertex,residual)
if residual > 0 and not edge in path:
result = self.find_path(vertex, sink, path + [edge])
if result != None:
return result
def max_flow(self, source, sink):
path = self.find_path(source, sink, [])
while path != None:
flow = min(r for u,v,r in path)
for u,v,_ in path:
self.flow[(u,v)] += flow
self.flow[(v,u)] -= flow
path = self.find_path(source, sink, [])
return sum(self.flow[(source, vertex)] for vertex, capacity in self.get_edges(source))
g = FlowNetwork()
map(g.add_vertex, ['s','o','p','q','r','t'])
g.add_edge('s','o',3)
g.add_edge('s','p',3)
g.add_edge('o','p',2)
g.add_edge('o','q',3)
g.add_edge('p','r',2)
g.add_edge('r','t',3)
g.add_edge('q','r',4)
g.add_edge('q','t',2)
print g.max_flow('s','t')
[/CODE]
result of this example is "5".
algorithm find max flow in graph(linked list or whatever) from source vertex "s" to destination "t".
Many thanx for any idea
|
|
|
|
|
You may get a better response by posting this in the Python forum. I have not used Python at all so a quick glance at the above does not suggest any immediate solutions. It may also help if you expalin what this code is supposed to do.
It's time for a new signature.
|
|
|
|
|
Like I wrote in last sentence. It is about max flow problem.
http://en.wikipedia.org/wiki/Maximum_flow_problem[^]
Because in python forum are not many messages i thought here it will be better responce. Never mind, i had long night and made this translation with more hashmaps in java.
Thank you any way.
|
|
|
|
|
You can use Jython[^]. It compiles python to Java byte code.
|
|
|
|
|
what is date overlapping? explian witm soe implementation, how to check overlpa between dateranges? i need urgent solution, plz revert e back ASAP.
|
|
|
|
|
Looks like your keyboard is broken
It's time for a new signature.
|
|
|
|
|
Hi all,
I'm picking up Java for an integration project. I'm trying to utilize to a webservice from our externally hosted CRM application.
I got some code from the CRM web services guide to log on to the application. However, when constructing the URL for logon purposes, the URL constructor throws the java.net.MalformedURLException. See the following line of code:
URL wsURL = new URL(pstrServer + "/Services/Integration?command=ssoitsurl&ssoid=" + pstrSSOID);
This should construct the following URL: https://abc.crmapplication.com/Services/Integration?command=ssoitsurl&ssoid=SSOID.
When I remove the second query parameter (ssoid) the URL is constructed fine. Does anybody know why the construction of this URL object fails? How can I set the multiple query parameters for the URL?
Thanks in advance and I'm looking forward to your reply.
Kind regards,
Bob Stanneveld
|
|
|
|
|
|
I just tried this using the strings you show and it works fine. Check the values of your two variables are set correctly.
It's time for a new signature.
|
|
|
|
|
A MalformedURLException normally includes a message to tell you what it thinks is wrong with the URL. For example, if I try to construct a URL from this string:
xyz:
I get the following message in the MalformedURLException:
unknown protocol: xyz
What error message do you get?
|
|
|
|
|
Hi,
Thanks for your reply. I don't get any error message... Here's the stack trace / exception printout:
Exception in component tWebServiceInput_1
java.net.MalformedURLException
at java.net.URL.<init>(Unknown Source)
at java.net.URL.<init>(Unknown Source)
at java.net.URL.<init>(Unknown Source)
at routines.CRMLogin.logonSSO(CRMLogin.java:97)
at crmtest.testcrm_0_1.TestCRM.tWebServiceInput_1Process(TestCRM.java:338)
at crmtest.testcrm_0_1.TestCRM.runJobInTOS(TestCRM.java:632)
at crmtest.testcrm_0_1.TestCRM.main(TestCRM.java:506)
The strange thing is that a bogus domain in the URL results in a correctly constructed URL object. When the correct URL is passed to the constructor (checked it with Internet Explorer), the exception gets thrown...
Kind regards,
Bob Stanneveld
|
|
|
|
|
Bob Stanneveld wrote: When the correct URL is passed to the constructor (checked it with Internet Explorer), the exception gets thrown.
I don't think this is your problem. I have tried URLs with real and bogus domains and, as long as they are correctly formed, then there is no problem. You need to catch the exception that is being thrown and check exactly what message it is producing. Also check the validity of all your variables within your exception handler.
It's time for a new signature.
|
|
|
|
|
Bob Stanneveld wrote: a bogus domain in the URL results in a correctly constructed URL object
The URL constructor does not check that the domain exists, it merely checks that the URL is properly formed according to the documented standard (whatever that happens to be).
Bob Stanneveld wrote: When the correct URL is passed to the constructor (checked it with Internet Explorer), the exception gets thrown
Do you mean that you have checked the actual string value being passed to the URL constructor at runtime? This works for me:
String a = "https://abc.crmapplication.com";
String b = "SSOID";
URL url = new URL(a + "/Services/Integration?command=ssoitsurl&ssoid=" + b);
If that exact same piece of code does not work for you, then I am at a loss to understand what is happening, I'm afraid.
|
|
|
|
|
Hi all,
I'm using the Talend Open Studio ETL tool for my integration. Unfortunately, this tool doesn't have advaneced debuging facilities and I don't have access to a nice IDE.
So after a couple of hours, pain and agony I discovered that the exception is thrown elsewhere in the code where a URL object is constructed with an empty string (a redirection URL should have been obtained from the reply from the server, but this is a different issue).
Thank you all for your help. Perhaps I'll post another question soon .
Kind regards,
Bob Stanneveld
|
|
|
|
|
Hello Friends
I am creating a applet based application in Netbeans.When I run that jar file on Desktop then it is running fine.But when I try to run this jar file on any other system then I am running this jar file thru batch file with specifying Heap space in that because without batch file it is not running.Is any way so that I can provide that heap space thru coding bcoz I dont want to do thru batch file?
here is My batch file:
@echo off
java -Xms512m -Xmx1024m -jar Test.jar
Thanks & Regards
Yogesh
|
|
|
|
|
dont make jar file....make executable jar file...it will run.
using
jar -cmf mainclass filename.jar packagename.
in this case,u will be able to run on other system too..
|
|
|
|
|
Thanks a Lot Arpita.
With ur suggestion I am able to load it without batch file.
Thx Again
Regards
Yogesh
|
|
|
|
|
read d calc problem shown below..in msg board by me..try .if u can...
|
|
|
|
|
Hello, everyone!I'm a freshman for JBPM.I found there were only create and delete functions in IdentityService,but no update.If I want to update the name of a group or user,how to do?
I thought I could delete the group first,then recreate it.However,when I delete the group,the memberships associated with this group will be also deleted.I have to rebuild those associations,and that's very troublesome.
Could you please tell me how to deal with it?
Thank you!
|
|
|
|
|
using method
JTextField tf=new JTextField("0");
tf.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
in a text field..& when i use concatenation of any number with 0 which is already in text field using as below..
tf.setText(tf.getText()+".0");
then dot is coming in in other side of 0...as .0
but if do as...
tf.setText(tf.getText()+"10");
tf.setText(tf.getText()+"+0");
i.e. "1" or "+" in place of ".",then answer is coming as usual... as 09 or 0+
any ideas????? m so confused...
|
|
|
|
|
don't do this
TextFiled.setText(TextFiled.getText())
please use some variables. There are some operations on numbers which can ruin your day. Always convert Numbers to String if you want to concat them in some way. And use String.concat, the + Operator is multible overloaded.
Operators in Java @ sun.com Doc
greets
Torsten
I never finish anyth...
|
|
|
|
|