LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   How to run JAR from within Java program ?! (http://www.linuxquestions.org/questions/programming-9/how-to-run-jar-from-within-java-program-515090/)

EAD 12-31-2006 03:49 AM

How to run JAR from within Java program ?!
 
Hii
I have this jar
psae.jar
witch just get the name of me, and print it on screen
now by using
Code:

java -jar psae.jar XXX
it works and say "hello world xxx"
so
now I want to make a java program to run it
so I have done this
Code:

class x{
        public static void main (String[] args) {
                psae.HelloWorld.main("OZ");
               
    }
}

and it doesn't work
say:
Code:

javac -cp . x.java
a:3: package psae does not exist
          psae.HelloWorld.main("XXX");

What to do please?

paulsm4 12-31-2006 08:11 PM

Hi -

This link should answer your question(s).

http://www.javaranch.com is also a useful resource.


All times are GMT -5. The time now is 09:41 AM.