Win a copy of liveProject: Build an ML Recommender System this week in the Artificial Intelligence and Machine Learning forum!
    Bookmark Topic Watch 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
  • paul wheaton
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • Mikalai Zaikin
  • Himai Minh
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Several of the entries in the HowToAskQuestionsOnJavaRanch FAQ recommend copying and pasting code and configuration settings into the edit screen instead of typing them.

Here are some tips for capturing system information such as environment variables and directory structures in a Windows environment.
This FAQ entry is aimed primarily at Windows users. Most modern Unix shell windows allow copying and pasting so the results from the "ls -R" and "echo" commands are easy to grab.
Copying an environment variable PATH, CLASSPATH, JAVA_HOME, etc..
For Windows (from the command line)

echo %CLASSPATH% > my-classpath.txt


This will open up a text file containing your CLASSPATH environment variable in notepad; where it will be easy to copy to your clipboard.

Copying a directory structure

In this example, we're going to write the entire directory structure of the "ROOT" webapp that
ships with Apache Tomcat (assuming that the current working directory is {tomcat install}\webapps):

dir /b /s ROOT > my-directory-structure.txt


When pasting the results into the JavaRanch edit screen be sure to UseCodeTags to insure that everything is rendered as plain text with all indenting preserved.

See the other tips on HowToAskQuestionsOnJavaRanch.


See also

  • AvoidRedHerrings
  • PostRealCode

  •  
    You showed up just in time for the waffles! And this tiny ad:
    Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
      Bookmark Topic Watch Topic
    • New Topic