The Artima Developer Community
Sponsored Link

Java Answers Forum
Calling javac and jar

1 reply on 1 page. Most recent reply: Jun 24, 2003 3:55 PM by Jaycee

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Grant Mc Auley

Posts: 1
Nickname: gmcauley
Registered: Jun, 2003

Calling javac and jar Posted: Jun 24, 2003 3:26 PM
Reply to this message Reply
Advertisement
Is it possible to call the javac and the jar tools from inside a Java program?

I would like to a allow a user to specify a .java file and then click a button that would call code to compile the source file and pack the resulting .class file into a jar file.

Can this be done without Runtime.exec("javac " + fileName) etc., and console windows poping up?


Jaycee

Posts: 26
Nickname: jaycee
Registered: Apr, 2003

Re: Calling javac and jar Posted: Jun 24, 2003 3:55 PM
Reply to this message Reply
Check out the "Ant" source code on Jakarta. You should find compile and jar snippets there.

Flat View: This topic has 1 reply on 1 page
Topic: struts error/debug how? Previous Topic   Next Topic Topic: .class to .exe

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use