Results 1 to 3 of 3
  1. #1
    entropy is offline Member
    Join Date
    Apr 2010
    Posts
    1
    Rep Power
    0

    Default Starting Java prog from a different folder

    Hi,
    I have a Java class, Lattice.class in the folder:

    Java Code:
    c:\ASR\bld\edu\cmu\sphinx\demo\lattice

    The class is in the package:

    Java Code:
    edu.cmu.sphinx.demo.lattice

    I can run this from the

    Java Code:
    c:\ASR\bld\

    folder by typing:

    Java Code:
    java edu.cmu.sphinx.demo.lattice.Lattice

    If I want to run it from the


    Java Code:
    c:\ASR\

    folder I type:

    Java Code:
    java -classpath ./bld -mx256m edu.cmu.sphinx.demo.lattice.Lattice

    Is there any other way to run it from the ASR folder other than typing the classpath parameter and other than setting classpath in the computer settings?


    Many thanks.

  2. #2
    Webuser is offline Senior Member
    Join Date
    Dec 2008
    Posts
    526
    Rep Power
    0

    Default

    you can run it right from your JDK/JRE bin folder :)
    or add the folder into your IDE project src folder

  3. #3
    wangwei is offline Member
    Join Date
    Apr 2010
    Posts
    10
    Rep Power
    0

    Default

    Hi,
    I hope I haven't misunderstand your meaning. U can change your package path to bld.edu.cmu.sphinx.demo.lattice, like this in code:
    package bld.edu.cmu.sphinx.demo.lattice; // package path
    Now, u can run your app at C:\ASR,
    If it errors, plz let me known, thx.

Similar Threads

  1. IE7 crashes on starting java web application.
    By gosia.gabriel in forum Advanced Java
    Replies: 1
    Last Post: 01-19-2009, 02:29 PM
  2. java annotations - small prog
    By sebo in forum New To Java
    Replies: 5
    Last Post: 10-24-2008, 05:48 AM
  3. Replies: 1
    Last Post: 07-13-2008, 03:16 PM
  4. need a prog on java 2d applet
    By bachelorswalk in forum Java Applets
    Replies: 0
    Last Post: 12-25-2007, 05:26 PM
  5. Help, starting with java
    By mathias in forum New To Java
    Replies: 2
    Last Post: 08-15-2007, 07:15 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
  •