Results 1 to 5 of 5
  1. #1
    Doctor Cactus is offline Member
    Join Date
    Oct 2008
    Posts
    63
    Rep Power
    0

    Default [SOLVED] Running Code in my own application

    Hi, I am writing a Java application and I have followed instructions from this link on how to run my code:
    Generating Custom Taglets and Compiling Source Directly From a Program

    and from this link on how to put a jar in your classpath:
    Adding Classes to the JAR File's Classpath (The Java™ Tutorials > Deployment > Packaging Programs in JAR Files)

    I have put the tools.jar in the same directory as my java file. Note that I have successfully ran my executable jar file with just the Main-Class attribute in it. Could it be the Classpath attribute? I have Main-Class on the first line, then classpath on the second line, then a blank line.

    Help is greatly appreciated.

  2. #2
    sirwiggles's Avatar
    sirwiggles is offline Member
    Join Date
    Feb 2009
    Posts
    31
    Rep Power
    0

    Default

    Download a IDE, blueJ is a good enough one..
    Use this to write your code in, compile it, run it, create jars, etc..

    Using IDEs is alot easier for users than terminals and command lines.

    If you specifically want to create your application through console, post what errors you are getting.

    Hope that helps.
    They're 10 people in the world, those who speak binary, and those who dont.
    ^ Lame i know, but i can actually count in it nowadays! :eek:

  3. #3
    Doctor Cactus is offline Member
    Join Date
    Oct 2008
    Posts
    63
    Rep Power
    0

    Default

    Ok, thanks. Just one question. If I use BlueJ or another IDE to set the classpath, then I create my jar file, will I be able to run it on any other PC without setting the classpath every time?

  4. #4
    sirwiggles's Avatar
    sirwiggles is offline Member
    Join Date
    Feb 2009
    Posts
    31
    Rep Power
    0

    Default

    Yep, Just double click the jar file.
    (even if you run it from command line, it should still work)
    They're 10 people in the world, those who speak binary, and those who dont.
    ^ Lame i know, but i can actually count in it nowadays! :eek:

  5. #5
    Doctor Cactus is offline Member
    Join Date
    Oct 2008
    Posts
    63
    Rep Power
    0

Similar Threads

  1. swt application running
    By wolve634 in forum SWT / JFace
    Replies: 3
    Last Post: 10-28-2008, 02:14 PM
  2. 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
  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
  •