• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Customized interface for javac and java?

 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I was considering making a program that includes using the javac tool, as well as the java command line tool, in the GUI as a critical part. As an example I would site an IDE like NetBeans, which can compile your files as well as run a "mini" command line in the bottom of the window when you run your program.

How would I go about using javac to compile files in my program, and how would I go about displaying the command line output of the java tool in a textarea in my program? Any leads, however small, would be much appreciated!!!

Thanks!
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Java 6 has a new API for using the Java compiler from within a Java program. See the documentation of package javax.tools.

If you're using an older version of Java, then you could call the Java compiler as an external process using Runtime.exec() or class ProcessBuilder, and then catching the output of the stdout / stderr streams.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Please see the below link.

http://www.javaworld.com/javaworld/javatips/jw-javatip131.html

Thanks
 
What? What, what, what? What what tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic