• 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
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Running via Windows shortcut (classpath issues)

 
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm trying to get rid of the annoying DOS prompt when I run a Swing application that I've written, but I'm having no luck at all, mostly thanks to my need to specify a custom classpath. I've tried two ways of doing this.
One: make a shortcut to javaw.exe and provide the necessary parameters
ex:
c:\jdk\binjavaw.exe -DJINTEGRA_NATIVE_MODE -cp .;my_class.jar;oracle.zip;another.jar;%CLASSPATH% com.myco.mypackage.MY_Class
This fails whenever I use %CLASSPATH%. If I fully specify the classpath (i.e. use no system properties) it works fine, or if I don't specify any classpath at all it also works fine (seems to use the system CLASSPATH), but unfortunately I need to ensure that it looks into the listed jars first, then goes to those in the system CLASSPATH.
Two: Create a .bat file that simply makes the above call itself.
Well, that works like a charm, except the DOS window from the batch file never closes! That part I can't figure out. If I run the above command in a DOS prompt, the application starts and the prompt returns so that I can run another command while the application is running. But, if I put that call in a batch file, the batch file never completes until I exit the application.
Any ideas? This is getting a little frustrating
Thanks,
-tim
[This message has been edited by Tim Stevens (edited August 01, 2001).]
 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you tried using an executable jar?
 
Bob Dobalina
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Nope, that I haven't. I've read you can specify a classpath in your manifest file, but I haven't been able to find a good example of how to do this...
-tim
 
Bob Dobalina
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ok... I'm trying to do this as my Manifest file:
Manifest-Version: 1.0
Created-By: 1.3.0_02 (Sun Microsystems Inc.)
Main-Class: com.myco.mypackage.MY_Class
Classpath: .\my_class.jar;.\lib\another.jar;%CLASSPATH%
Again, it doesn't appear to be using the system classpath. Any clues?
Thanks,
-tim
reply
    Bookmark Topic Watch Topic
  • New Topic