Results 1 to 4 of 4
  1. #1
    wolve634's Avatar
    wolve634 is offline Member
    Join Date
    Oct 2008
    Posts
    13
    Rep Power
    0

    Question swt application running

    hello ! I'm new to SWT and have written just a few simple programs, but execute them outside the IDE is problematic :( i simply export the project from eclipse3.1.2 , add manifest.mf where point Class-Path and Main-Class , then i put the jar with needed resources in the same folder, that's it !
    But when double-clicking on myApp.jar the console is shown and immediately disappears, however from cmd it works well ! Please suggest me what to do !!!!!! :confused:

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,272
    Rep Power
    25

    Default

    What OS are you on? The quick flashing screen means that java gets an error trying to open the jar file.
    Is the OS executing a different commandline than you are?
    If you are on Windows, you can look in the Registry for the commandline used to open a jar file. Or you can use windows explorer Tools|Folder Options|FileTypes -> scroll down to the JAR entry, edit it(Advanced butteon) and look at the open entry (or the one that is hi-lited). The commandline will be the 2nd one: application used to perform...
    Is that what you use?

  3. #3
    wolve634's Avatar
    wolve634 is offline Member
    Join Date
    Oct 2008
    Posts
    13
    Rep Power
    0

    Default

    Quote Originally Posted by Norm View Post
    What OS are you on? The quick flashing screen means that java gets an error trying to open the jar file.
    Is the OS executing a different commandline than you are?
    If you are on Windows, you can look in the Registry for the commandline used to open a jar file. Or you can use windows explorer Tools|Folder Options|FileTypes -> scroll down to the JAR entry, edit it(Advanced butteon) and look at the open entry (or the one that is hi-lited). The commandline will be the 2nd one: application used to perform...
    Is that what you use?
    hi ! you was right! thank you very much, now it works well !

    but one problem still remains : i have two files , swt.jar and myApp.jar, so can i put swt.jar into myApp.jar so that myApp.jar is run properly, I tried , but it didn't work! ( if Class-Path: swt.jar means that swt.jar is in the same folder, then Class-Path :myApp.swt.jar must be meant that swt.jar is in the myApp.jar, yes? )

  4. #4
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,272
    Rep Power
    25

    Default

    The java program doesn't know what to do with a jar file inside of another jar file. You'll have to use the Class-path: statement and have the other jar file in the same folder.

Similar Threads

  1. application is not running please fine the solution for it.
    By jagadeeshchinni in forum New To Java
    Replies: 4
    Last Post: 09-28-2008, 10:14 AM
  2. Problem running a java desktop application
    By chris@gaiag.net in forum AWT / Swing
    Replies: 2
    Last Post: 08-24-2008, 04:24 AM
  3. Maintain same session in two application running on same server
    By dsiwal in forum Threads and Synchronization
    Replies: 2
    Last Post: 06-10-2008, 06:38 AM
  4. Running a application in java
    By barney in forum Java Applets
    Replies: 1
    Last Post: 08-07-2007, 07:12 AM
  5. Running application in back
    By fernando in forum Advanced Java
    Replies: 1
    Last Post: 08-01-2007, 12:25 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •