Solved

Automatically insert header in new java class

Posted on 2010-11-09
2
494 Views
Last Modified: 2012-05-10
How do I setup Eclipse to automatically insert a header when I create a new Java class?
e.g. I would like something like this at the top of every new Java class file:
/*
 * Copyright 2010 Widgets Inc.,
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of Widgets Inc.
 *
 */
0
Comment
Question by:allelopath
  • 2
2 Comments
 
LVL 7

Expert Comment

by:rodness
ID: 34097539
Go to Eclipse Preferences, Java, Code Style, Code Templates.

Edit the Code template for New Java Files accordingly.
0
 
LVL 7

Accepted Solution

by:
rodness earned 500 total points
ID: 34097549
Sorry, my bad.  That was COMMENTS Template, not Code template:



Go to Eclipse Preferences, Java, Code Style, Code Templates.

Edit the COMMENTS template for FILES accordingly.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now