You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Jean-Luc Wasmer <jl...@wasmer.ca> on 2003/12/08 21:39:57 UTC
Uberjar and getPackage
Hi,
I have a problem when I run a project's uberjar : the method getPackage()
(defined in Class) returns null.
When I run the project in Eclipse I get the expected behaviour.
Here's the output of the line
System.out.println(getClass() + " is in package " +
getClass().getPackage());
run by Eclipse:
class test.ProjectTest is in package package test
run by java -jar project-test-1.0-uber.jar
class test.ProjectTest is in package null
JL
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
RE: Uberjar and getPackage
Posted by Alexei Barantsev <ba...@ispras.ru>.
It is a know problem of classworlds, see
http://jira.codehaus.org/secure/ViewIssue.jspa?key=CLASSWORLDS-1
--
Alexei Barantsev, ISP RAS
E-mail: barancev@ispras.ru
ICQ : 3959207
> -----Original Message-----
> From: Jean-Luc Wasmer [mailto:jl+maven@wasmer.ca]
> Sent: Monday, December 08, 2003 11:40 PM
> To: users@maven.apache.org
> Subject: Uberjar and getPackage
>
> Hi,
>
> I have a problem when I run a project's uberjar : the
> method getPackage() (defined in Class) returns null.
> When I run the project in Eclipse I get the expected behaviour.
>
> Here's the output of the line
> System.out.println(getClass() + " is in package " +
> getClass().getPackage());
>
> run by Eclipse:
> class test.ProjectTest is in package package test
>
> run by java -jar project-test-1.0-uber.jar
> class test.ProjectTest is in package null
>
>
> JL
>
>
> ------------------------------------------------------------
> ---------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org