Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java Imports to Jar file

Tags:

java

import

jar

My question is this is there a way to put all the Java Imports in a jar file, so when you make a Java Program no need to import the files individually????

EDIT: I mean like

import java.awt.*;
import java.awt.event.*;

into a jar file where u don't need to type out the import java.awt.*; everytime

like image 728
user635673 Avatar asked Mar 08 '26 18:03

user635673


2 Answers

You can use netbeans to do that http://java.sun.com/developer/technicalArticles/java_warehouse/single_jar/

like image 162
bluefoot Avatar answered Mar 11 '26 07:03

bluefoot


If you're thinking of something like a C/C++ global include file that allows a single import statement at the top of files -- then no.

However, your Java IDE should be capable of adding imports for you automatically.

like image 25
Andy Thomas Avatar answered Mar 11 '26 08:03

Andy Thomas



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!