The Artima Developer Community
Sponsored Link

Java Buzz Forum
Java2Html and IntelliJ IDEA

0 replies on 1 page.

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 0 replies on 1 page
Erik C. Thauvin

Posts: 4232
Nickname: ethauvin
Registered: Apr, 2004

Erik C. Thauvin maintains one of the web's first and most popular linkblogs.
Java2Html and IntelliJ IDEA Posted: Jan 29, 2006 4:52 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Erik C. Thauvin.
Original Post: Java2Html and IntelliJ IDEA
Feed Title: Erik's Weblog
Feed URL: http://erik.thauvin.net/blog/feed.jsp?cat=Java
Feed Description: The Truth is Out There!
Latest Java Buzz Posts
Latest Java Buzz Posts by Erik C. Thauvin
Latest Posts From Erik's Weblog

Advertisement
[@486]

Java2Html and IntelliJ IDEA

IDEA can export Java source code to HTML, which I find quite useless. I really like the way Java2Html works but there is no integration with IDEA.

You can easily setup an External Tool in IDEA using the Java2Html command line options.

The problem is that I also wanted to:

  • View the generated HTML code right away.
  • Discard the resulting HTML file when done. I usually only need to copy/paste elsewhere.
I created a simple batch file to help me accomplish my goal...
java2html4IDEA.bat
@echo off
setlocal
set TMPFILE="%WINDIR%\temp\%~n1%~x1.html"
java -jar java2html.jar -srcfile %1 -targetfile %TMPFILE%
notepad %TMPFILE%
endlocal
@echo on
What does it do?
  1. Passes the first argument (the path to the Java source file) to Java2Html.
  2. Instructs Java2Html to save the resulting HTML file directly to the Windows temporary files directory.
  3. Automatically opens the HTML file with Notepad.
To use it, simply place it in the same directory as the Java2Html jar, in my case C:\java2html.

The only thing left to do was to create the External Tool entry in IDEA, as follows:

Tags:  , ,

Read: Java2Html and IntelliJ IDEA

Topic: Eclipse Mindset Previous Topic   Next Topic Topic: [Jan 17, 2006 09:20 PST] 17 Links

Sponsored Links



Google
  Web Artima.com   

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