problems executing executable jar file by double clicking
varnita gupte
Greenhorn
Joined: Aug 06, 2009
Posts: 12
posted
0
Hello,
I have jdk1.6 installed on my m/c.
I have all the required path and classpaths set.
Initially i was able to execute the executable jar file of ArgoUML by double clicking, but now after formating my m/c.
The executable jar file of ArgoUML is not working,it says Main class not found.
But if i run the jar from the command prompt it works.
I have also made the entries in the file types of the folder options for the jar files.
Ok.
Can you provide a screenshot of the error dialog which you get when you double click?
To attach the screenshot, you got two options. Host is somewhere on the net and use the Img tag.
OR use the Attachment button at the bottom of the reply dialog.
Ramses Butarbutar
Ranch Hand
Joined: Jun 16, 2009
Posts: 52
posted
0
Hi varnita gupte,
If you double clicking and response failed, seems you don't have main class manifest attribute
on that jar (executable class) but you say in command prompt work.. so strange..
Hmm... maybe that argouml.jar need other jar to run and it define in your classpath so it work on command prompt..
At the center of non-violence stands the principle of love
.... Martin Luther King, Jr.
varnita gupte
Greenhorn
Joined: Aug 06, 2009
Posts: 12
posted
0
Hello,
I cannot attach the screenshot, as it is not allowed to send attachment as a rule in our office.
Although i can tell what error is flashed.
Its a msg thrown by the Java virtual machine launcher,
it reads:
Could not find Main class. Program will exit.
Varnita
varnita gupte
Greenhorn
Joined: Aug 06, 2009
Posts: 12
posted
0
Hello Ramses,
I have used the same jar file many a times for creating class diagrams and sequence diagrams.
What is the jar file supposed to do? Is it supposed to popup a UI? Or is it just a library?
Provide us some more information on what it does not do in your opinion, when you say it doesn't work. What is that you expect it to do when you double click.
Ramses Butarbutar
Ranch Hand
Joined: Jun 16, 2009
Posts: 52
posted
0
varnita gupte wrote:Hello Ramses,
I have used the same jar file many a times for creating class diagrams and sequence diagrams.
Varnita.
Varnita,
I think the problem is not your jar file but your machine. Previously do you install that argoUML by windows installer or binary distribution? If you use binary distribution, after formatting you m/c , do you still have same ArgoUML installation directory as previous? Is there any configuration file in argoUML directory pointing your machine JVM?
varnita gupte
Greenhorn
Joined: Aug 06, 2009
Posts: 12
posted
0
Hello,
It did not have any windows installer for ArgoUML, i had simply copied the folder structure of that UML tool, and it worked.
And the same folder structure is available now also, so it should work by dbl clicking.
Can't figure out.
You say it works from the command line. The manifest file does contain a Main-Class entry.
Since you are on XP, did you try rebooting? Anybody else?
Ramses Butarbutar
Ranch Hand
Joined: Jun 16, 2009
Posts: 52
posted
0
Maybe you can open that jar, but first copy it, rename and change extension to rar(change to argouml.rar) . Find class named Main in package org.argouml.application .
If class is exist, check again your classpath, have you set all jar in class path or not (just point directory if you not sure which jar have to added into classpath) then check with command prompt if already registered.
Last, if class file not exist and classpath setting not complete. Maybe you can download a new one from
argoUML and check is it the new one work or not. If the new one still "not working" perhaps there is something "weird" in your machine.
In bundling an application into jar, some IDE provide function to register the main class that will be run at first time. Perhaps (once again :confused: ) this function registered in to windows and after you formatted your machine, it's not registered any longer. so your jar application can not find it main class.
Have a nice try... :)
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.
subject: problems executing executable jar file by double clicking