Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to import java.util classes??

liljoint
Contributor
May 31, 2012

Can I import a java.Util class??

  1. import java.util.ArrayList;
  2. import java.util.Collections;

2 answers

2 votes
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 31, 2012

Yes, probably

Although your question really doesn't make any sense - you haven't given any useful context to it. You could be writing those lines on a page as text, writing a plugin, stuffing things into velocity - there's no sane answer to that question without knowing what you're trying to do and why you think you might need them

0 votes
Thomas Schlegel
Community Champion
May 31, 2012

Hi Bryan,

I don't know, if I understand your question right, but of course you can import a java.util class.

Here's an example with java.util.x - Classes : http://www.hascode.com/2010/04/how-to-build-a-confluence-macro-plugin/

I did not test it, but maybe it helps you.

Best regards

Thomas

liljoint
Contributor
May 31, 2012

So, I need to sort a list of page... in java the object Collections can Sort the lists... Who can I implement this class in the user macro environment??? That's what I need... Please helppp... :)

liljoint
Contributor
May 31, 2012

Thomas,

I Found a sentence to include a Class...

#set ($col=$action.class.forName('java.util.Collections'))

It works, thanks for your disposition :)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events