Re: please help me



mo_sql schrieb:
Good morning

I have a jar file which I want carried out since an interface java
created with Jdeveloper. Which is the instruction to be used and which
is the step to be followed?
I used :

Runtime r = Runtime.getRuntime();
Process p = r.getRuntime().exec("java -jar
C:\\Jdeveloper\\bin\\name.jar");

But the window of the file launches out and is established after a few
seconds.

What do you mean by window? A command shell (or whatever that is called on
Windows) or a Java Frame or JFrame?

Maybe try to access the Process' input/error streams and exit code to figure out
more about a potential error?

Does "java -jar C:\Jdevelopwer\bin\name.jar" work at the command prompt?

If you do not want to fork a new java process, you can also consider to load the
class in your JAR using a ClassLoader, finding the main class and calling main()
on it, possibly using reflection. Or simply add the jar to the classpath and
just call main() if you know the class name at compile time.

Cheers,
Simon
.



Relevant Pages

  • Re: How to update a jar file for one source file change?
    ... I'm new to java, so, I may get terminilogy wrong, bear with me. ... we've got a BIG jar file that includes thousands of classes. ... updated java source code was not being used. ...
    (comp.lang.java.programmer)
  • Re: Running java programs from class files
    ... java -classpath /xyz/abc MyPackage.MyClass ... But put it in a package and it won't. ... So now that you solved that one, show me how to use a jar library on the ... line in the manifest and put the jar file in the same ...
    (comp.lang.java.programmer)
  • Re: license question?
    ... And i will include that GPL jar file into my jar file. ... -In Java, it would probably be considered a static link. ...
    (comp.os.linux.misc)
  • Re: license question?
    ... And i will include that GPL jar file into my jar file. ... -In Java, it would probably be considered a static link. ...
    (comp.lang.java.programmer)
  • Where I can download jar file of oracle.xml.parser.v2 in window
    ... I try to use java to write "import oracle.xml.parser.v2.domparser and ... but i can't find the jar file for that in oracle web site. ... Where I can download jar file of oracle.xml.parser.v2 in window. ...
    (comp.databases.oracle.misc)

Loading