• Post Reply Bookmark Topic Watch Topic
  • New Topic

default package  RSS feed

 
Andre Masse
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!

I need to use an api which was written a couple of years ago back when J++ was popular :-). Problem is: all classes belongs to the default package and I don't have the source... Since I need to access this api from a new project I'm working on which uses Java 6 (access from named package to classes in the default package is prohibited since Java 1.4) I'm wondering if anyone has done a medium size project (about 50+ classes) using the default package? Any pitfall to avoid?

Or maybe someone has a workaround? I'm open to any suggestions.

Thanks.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 37507
548
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Andre,
Welcome to JavaRanch!

I'm not positive this will work, but I would try decompiling the classes in the default package, adding a package name and recompiling them.
 
Andre Masse
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply Jeanne.

I've tried that but one of the class is using:

import com.ms.security.PermissionID;
import com.ms.security.PolicyEngine;

so i can't recompile as I've no idea where to get these packages...
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, you also can't run your code without those missing classes, either. Is this an applet? I think those classes were only useful in applets.
 
Andre Masse
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply Ernest.

Sorry if I wasn't clear enough, this is not my code but an API I need to access and yes it runs fine. These com.ms.* package are part of the MSJVM which I think is included in Explorer. I didn't want to mess with decompile/recompile but it looks like all calls to these classes could be commented out cause I don't need to run as an applet. I'll try that tomorrow.

Thanks again.
 
Jeroen T Wenting
Ranch Hand
Posts: 1847
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It wasn't only included in IE, but did ship with it.
It is now no longer included anywhere, and can't be downloaded (at least not from Microsoft) as it's end of life.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!