aspose file tools*
The moose likes Java in General and the fly likes jar files and their parameters Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "jar files and their parameters" Watch "jar files and their parameters" New topic
Author

jar files and their parameters

Amstrong Huang
Greenhorn

Joined: Jun 22, 2009
Posts: 2
Hello, and thanks for any help you can offer me

The background for my question is that we are creating some jar files where I work, so we can reuse some code on many projects... the problem is that once i add the jars to the classpath, and i try to use the methods i have in the jars, the parameters my method receives have their names changed.

for example the original method is:
public static void send(HashMap<String, Object> parameterMap,
String template, String smtpServer, String smtpUsername,
String smtpPassword, Boolean auth, Boolean tls) throws MailNotSentException {
//code here
}

but when i try to use it on another project what i get is:
Class.send(arg0, arg1, arg2, arg3, arg4, arg5); and not the original parameter names

this is using Eclipse ganymede, not sure if the IDE has something to do with the parameter names being changed.

i also have it documented with javadoc comments, and i was wondering if there is a way that the things i write in the comments, appear.
I mean like when you use Eclipse and write String then press Ctrl + Space the suggestions appear, but some have extra information on a yellow box

Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29244
    
139

I think it has to do with the compiler settings - as to whether the parameter names are remembered or not.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Yeah, I think you'd have to compile with debug symbols turned on in order for that info to be preserved in the jar.
Amstrong Huang
Greenhorn

Joined: Jun 22, 2009
Posts: 2
thanks for the help, actually didnt quite discover how to do it with the javac command, but found another way... well at least works in eclipse and that's what we are using here.

the way we did it is:
right click on your project, then java build path, then you see the list of jars, then you extend the jar you want and you can see a javadoc option, double click it, then you point it to your generated javadoc.

It works for us because we made a jarRepository project where we are uploading all the jars and their javadocs, so we just point the jars to the javadocs from our local server

hope it helps someone else
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jar files and their parameters
 
Similar Threads
How to create a Java Runtime Editor
can I ask a big favor?
WebsphereDeploymentTool for Ant
enctype="multipart/form-data" request.getParameter() issue
Is there somthing called optional parameters...