• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

problems executing executable jar file by double clicking

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

My OS is : Windows XP

Help would be appreciated.

Varnita
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Varnita,
Welcome to the Ranch.

You got an interesting problem here. Command line execution works but double click wont.
Can you please tell us how you are invoking the command line?

Since this is more of a general question, I will move it to a more appropriate forum for you.
 
varnita gupte
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

this is what i type at he command prompt.

java -jar argouml.jar



Varnita
 
Maneesh Godbole
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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..
 
varnita gupte
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Ramses,

I have used the same jar file many a times for creating class diagrams and sequence diagrams.


Varnita.
 
Maneesh Godbole
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

It is supposed to open a GUI on dbl clicking.


Varnita.
 
Maneesh Godbole
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you post the contents of the manifest file?
 
varnita gupte
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

The manifest file is long.

Contents are :

Manifest-Version: 2.0
Class-Path: argouml-model.jar ocl-argo.jar gef.jar antlrall.jar log4j.
jar toolbar.jar swidgets.jar commons-logging.jar ext/argouml-i18n-de.
jar ext/argouml-i18n-en_GB.jar ext/argouml-i18n-es.jar ext/argouml-i1
8n-fr.jar ext/argouml-i18n-it.jar ext/argouml-i18n-nb.jar ext/argouml
-i18n-pt.jar ext/argouml-i18n-ru.jar ext/argouml-i18n-sv.jar ext/argo
uml-i18n-zh.jar argouml-mdr.jar java-interfaces.jar jmi.jar jmiutils.
jar mdrapi.jar mof.jar nbmdr.jar openide-util.jar ext/dev.jar
Created-By: 1.2 (Sun Microsystems Inc.)
Ant-Version: Apache Ant 1.6.2
Main-Class: org.argouml.application.Main


The file is long, and contained some abbrevations which are not permissible on the ranch, so could not copy the complete file.




Varnita
 
Maneesh Godbole
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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... :)
 
A tiny monkey bit me and I got tiny ads:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic