|
I found one thing related to file Type association tht is not available in windows7 or i dont know .So i posted for that in Windows7 Forums.
May be -jar option is not associated with files,so for that i need to change settings of jar file extension and m not able to find advanced option in Windows7 for File Type Association.
Regards
Yogesh
|
|
|
|
|
It looks like you have a problem with your CLASSPATH and Java cannot find some classes. Check both your PATH and CLASSPATH values are pointing at the correct directories for both base Java and Java 3D.
It's time for a new signature.
|
|
|
|
|
I am setting the java bin path and java3d bin path in System Path variable and still its not running.
But if i put my jar file in java bin folder and then run thru command prompt like this
java -jar sample.jar
then its running.
Actually,no idea with classpath variable,m not setting there anything now.
is this one need to create in System variable or in user variable?And which value it contains?
Now,I think u can help me Richard Sir.
Regards
Yogesh
|
|
|
|
|
See here[^] for information on the CLASSPATH variable.
It's time for a new signature.
|
|
|
|
|
Hello
I read tht docs related to classPath.But here i dont think this prob related to classpath.
If this prob related to classpath then do I need to change tht classpath of every machine where I am sending my jar file?Tht is not possible .
Now,my prob is related to jar file association tht I m not able to find in windows7.As i think.
Regards
Yogesh
|
|
|
|
|
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..
|
|
|
|