0
votes
0answers
82 views

How to structure my java packages [duplicate]

I have a Java library, quite a huge one. I'm asking regarding Best Practices of structuring the source. For example, the logging sybsystem: Option 1: All in one package, named to sort nicely Log ...
3
votes
1answer
162 views

Should I assert in packages? [duplicate]

I have read a few asserts vs exception questions already; I ask specifically about package visible classes though. When you write a package, the classes marked with "public" are exposed to the ...
0
votes
1answer
102 views

Where to put variables needed across classes?

I have 3 classes: a JButton extension, FButton; a JTextField; and a JPanel extension, FPanel, that would contain one instance of both. The FButton is supposed to open a file, and make the file name ...
0
votes
1answer
152 views

Why would you opt to fully qualify a package instead of importing it?

In java, to print the date we could do either of the following: Fully qualified public class MyMain { /** * @param args */ public static void main(String[] args) { // TODO ...
0
votes
3answers
350 views

What are the steps to grouping related classes into packages

What are the steps needed to be taken to group related classes into packages in Java? In my case, I have about a number of .java files that I'd like to group into 3 packages according to the MVC ...
0
votes
2answers
136 views

Utilizing a Java Concurrent Utility from a Web App

I have the following lines of code in my application: return "Service is alive since: " + TimeUnit.MILLISECONDS.toMinutes(mxBean.getUptime()) + " minutes"; It uses the following package: import ...
0
votes
1answer
820 views

Creating java package on ubuntu? [closed]

I am new to java. Here I am trying to create java package. And try to compile it from another directory . But there is an error like bash: /home/gaurav/Desktop/package2/B.java: Permission denied Here ...
2
votes
2answers
906 views

How to solve circular package dependencies

I am refactoring a large codebase where most of the classes are located in one package. For better modularity, I am creating subpackages for each functionality. I remember learning somewhere that a ...
9
votes
3answers
3k views

What should I use for a package name if I don't have a domain? [duplicate]

Possible Duplicate: What is the point of Java’s package naming convention? What package name to choose for a small, open-source Java project? I write Java (and derivative languages with ...
4
votes
2answers
824 views

What package name to choose for a small, open-source Java project?

I'd like to publish a small open-source library in Java. I wonder what package name should I choose? I'm not a company and I don't have a domain that I could use as the basis for naming the package ...
6
votes
3answers
3k views

Why we don't import a package while we use String functions?

I asked myself why we didn't import a package while we use String functions such as toUpperCase()? How they get in there without importing packages?
2
votes
1answer
472 views

Package conventions for MVC app [closed]

Which (if either) of the below is the more conventional/acceptable way to structure packages in a J2EE app? I'm trying to follow an MVC pattern as much as possible. foo.bar.users ...
2
votes
6answers
420 views

How do I choose a package format for Linux software distribution?

We have a Java-based application that, to date, we've been distributing as a tarball with instructions for deploying. It's mostly self-contained so deployment is fairly straight-forward: Untar on ...
12
votes
3answers
1k views

What is the point of Java's package naming convention?

I don't understand why Java uses the reverse of a (probably hypothetical) domain name as the name of a package, while mostly there is no connection between the domain name that some people uses and ...
5
votes
2answers
1k views

Abstract classes in package structure

I have an abstract class that will have many implementors. There are, of course, many places to put abstract classes in a Java package structure. Should the abstract class be in the same package as ...