Import in java

Hi everyone,
Could anyone have a clue on this?
Is there anyway that all the "IMPORT" in many *.java files being placed in a separate (let say a parameter file where i could declare) file of my package, thus for example 2 classes importing JFrame and doing 2 different things having reference to only one import.... (i hope, i am explicit enough :-P ). I am using the 1.4 jre...
thanks and god bless...

^not necessarily. For example, I have one class
where I import java.net, .io, javax.swing, .awt, and
.util. Of course because I only needed HashMap from
util and ServerSocket from .net, I specifically
imported only those 2 classes.....Are you directing that at my comments? What point are you trying to make here?
Importing will take maybe 1/10th of a second,Probably less than that, and whatever effecft it has will be ONLY at compile time. It has ZERO runtime effect
so
import all you want. Don't be careless (importing
libs you don't need) but don't worry about runtime.Yes, of course. Import what you need, and don't import what you don't. And no matter what you import, it will have ZERO runtime effect.
But if you find that your class needs to use a large number of other classes, it's a good sign that your class is trying to do too much and should be refactored. There's no hard and fast rule. It's just a guideline, a warning sign.

Similar Messages

  • How to import a java class in a JSP

    Hi All,
    I have a java class file called myTest.class (i made after compilation of myTest.java). I have a JSP page that uses this java class file.
    These 2 files are in same folder called c:/test
    and iam importing this java class file into my jsp file and that too at the start of this jsp file:
    <%@page import="myTest" %>
    BUt iam getting an error ..............when iam running this JSP page:
    /opt/bea81sp2/user_projects/domains/wliDomain/./Managed2/.wlnotdelete/extract/Managed2_myTest_myTest/jsp_servlet/__test.java:20: '.' expected
    probably occurred due to an error in /test.jsp line 5:
    <%@page import="myTest" %>
    Please advise how to solve this problem
    -sangita

    Don't bother with the import
    when iam not importing this class file into my JSP, then on my JSP, the class file is not found.
    Here is my code: and these 2 class file are in c:/test
    import org.apache.tools.ant.taskdefs.Ant;
    import org.apache.tools.ant.taskdefs.Property;
    import org.apache.tools.ant.types.*;
    import org.apache.tools.ant.*;
    import org.apache.tools.ant.taskdefs.ExecTask;
    import org.apache.tools.ant.types.Commandline;
    import java.io.File;
    * Creates an Ant project to run an Ant build
    * @author myself
    * @version 1.0
    public class RunTest extends Ant {
        String applicationName;
        String buttonClicked;
        String boxName;
        String targetName;
        public void applicationName(String applicationName){
         this.applicationName = applicationName;
        public void boxName(String boxName){
         this.boxName = boxName;
        public void buttonClicked(String buttonClicked){
         this.buttonClicked = buttonClicked;
      public RunTest() {
    public void goTest() {
         if(this.buttonClicked.equalsIgnoreCase("deploy") && this.applicationName.equalsIgnoreCase("scsmail") && this.boxName.equalsIgnoreCase("testnet")){
           this.targetName = "deploy-scsmail-testnet";
         if(this.buttonClicked.equalsIgnoreCase("undeploy") && this.applicationName.equalsIgnoreCase("scsmail") && this.boxName.equalsIgnoreCase("testnet")){
           this.targetName = "undeploy-scsmail-testnet";
        Project project = new Project();
        project.init();
        System.out.println("printing 1 ....");
        ExecTask exec = new ExecTask();
        exec.setProject(project);
        exec.setExecutable("/opt/bea/weblogic81/server/bin/ant.bat");
         exec.setDir(new java.io.File("/export/home/beamon/bin"));
         Commandline.Argument arg = exec.createArg();
         // arg.setLine("-f scsmail.xml test -listener org.apache.tools.ant.XmlLogger -logfile D:/antProject/src/log.xml");
         arg.setLine("-f build.xml "+ targetName + " -listener org.apache.tools.ant.XmlLogger -logfile /export/home/beamon/bin/log.xml");
         System.out.println("printing 2....");
        //exec.setOutput(new File("D:/antProject/logs/prob.txt"));
        exec.execute();
        System.out.println("printing 3....");
    -----------------------the JSP page is called as test.jsp
    <%@page contentType="text/html" %>
    <%@page import="java.io.*" %>
    <%@page import="java.util.*" %>
    <%@page import="java.net.*" %>
    <%@page import="RunTest" %>
    <HTML>
    <TITLE>TESTING ANT GUI</TITLE>
    <HEAD>
    <META HTTP-EQUIV="Refresh" CONTENT="3000" >
    <meta http-equiv="Cache-Control" content="no-cache">
    </HEAD>
    <BODY BGCOLOR="silver" TEXT="333333">
    <table border=0>
    <tr align="left"><td align="left"><FONT SIZE="-1"><B>  Test Page <FONT SIZE="-1"><B></td></tr>
    </table>
    <hr></center>
    <form action="./test.jsp" method="POST" name="testForm">
    <table>
    <tr>
    <td>
    <select name="appName" size=1>
    <option value="">Select Application Name
    <option value="scsmail">scsMail
    <option value="clientmanager">ClientManager
    </select>
    </td>
    <td>
    <select name="boxName" size=1>
    <option value="">Select Box Name
    <option value="testnet">TestNet
    <option value="production">Production
    </select>
    </td>
    </table>
    <table>
    <input type="submit" name="deploy" value="deploy">
    <input type="submit" name="undeploy" value="undeploy">
    </table>
    <%
       RunTest rt = new RunTest();
       rt.applicationName(request.getParameter("appName"));
        String deployButton = "";
        deployButton=request.getParameter("deploy");
        String undeployButton = "";
        undeployButton=request.getParameter("undeploy");
        if(!deployButton.equalsIgnoreCase("")){
            rt.buttonClicked(request.getParameter("deployButton"));
        if(!undeployButton.equalsIgnoreCase("")){
            rt.buttonClicked(request.getParameter("undeployButton"));
       rt.boxName(request.getParameter("boxName"));
        rt.goTest();
    %>
    </form>
    </table>
    </BODY>
    </HTML>

  • Unable to import a java class in a jsp file

    Hi,
    I am trying to import a java class in my jsp.
    ------------------jsp---------------
    <jsp:useBean id="form" class="com.company.portlets.searchApps.object.SearchOBJ" scope="request" />
    <jsp:setProperty name="form" property="*" />
    <input type="TEXT" name="projectID" value='<%= form.getProjectID() %>'>
    When I run the above JSP, it says that class 'com.company.portlets.searchApps.object.SearchOBJ' cannot be found.
    Why?
    My project structure looks like this:
    Project
    +Application Sources
    ++com.company.portlets.searchApps.object
    +++SearchOBJ.java
    +Web Content
    ++htdocs
    +++searchappsportlet
    ++++SearchAppsPortletShowPage.jsp
    ++WEB-INF
    +++index.jsp
    +Resources
    ++SearchApps.deploy
    Please advice...thanks!

    The way that JDeveloper organized the files was like this:
    C:\jdev1012\jdev\mywork\WksSearchApps\Project\classes\com\company\portlets\searchAPPS\object\SearchOBJ.class
    I am assuming that JDeveloper puts the file where they are suppose to be...if not, how do I change that?
    thanks,
    hussain

  • How to import custom java jar/class into oracle to be used in java proc ?

    Hi
    I would like to know how to import custom java jar/class files into oracle to be used in java stored procedure.
    I am developing a oracle pl/sql procedure to call java program. The java program will be created as procedure and will be published.
    But, my question is that I do have a other external jar/class file that need to be imported into this java program.
    example
    raise_sal.java
    import java.util.*;
    import oracle.sql.*;
    <<reference other java programs >>
    import cmpmsgsvc.xxxx.* ;
    import cmpmsgsvc.yyyy.* ;
    import cmpmsgsvc.zzzz.* ;
    how do I import the cmpmsgsvc jar/class file into oracle so that I don't have any
    compilation errros on raise_sal.java program ??
    what are the steps to import/compile and validate to do this?
    thanks for your help in advance.
    Thanks
    rrb.

    Kuassi
    Problem is that, I have 6 jar files that are needed to be included in the main java program. And, there are more than 50+ classes, propertiers in those 6 jar files.
    It might be not good idea to have all those 50+ classes in the production database.
    Is there anyway that I keep all those 6 jar files in unix box (our's is oracle erp installation with oracle being installed on unix box) and just refer them in the main java program. I mean database will be loaded with main java program and it should able to refer other 6 jar files from unix.
    if we create a directory and keep all jar files in there and include that directory in classpath variable, does this works? or what is other method?
    Please let me know.
    Thanks

  • ADF : How to import a java class in jspx page

    Hi All,
    In jsp we have page directive to import a java class. Do we have anything similar to that in a jspx page?

    Hello,
    If you create a new jspx file in jdeveloper, the untitled file generated will be this:
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1">
    <jsp:output omit-xml-declaration="true" doctype-root-element="HTML"
    doctype-system="http://www.w3.org/TR/html4/loose.dtd"
    doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"/>
    <jsp:directive.page contentType="text/html;charset=UTF-8" import="java.util.*"/>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <title>untitled1</title>
    </head>
    <body></body>
    </html>
    </jsp:root>
    You can see the page directive there!

  • To Unable to Import Customize Java classes in Report Builder 10g

    Hi,
    In Report Builder 10g , I am trying to load image from Remote server
    URL:"http://imagecache5.art.com/p/LRG/15/1544/1ABDD00Z/muhammad-ali-vs-sonny-liston.jpg"
    Steps did in Report Builder 10g
    1.In Report Builder Created a Formula column with
    Datatype : Character
    Read from File: Yes
    File Format: Image
    In Formula columns trying to Unable to Import Customize Java classes.
    To read methods from Java classes.
    Please help on this.
    Ranga

    Hello,
    To import the Java classes:
    Add your jar in the REPORTS_CLASSPATH
    Launch Reports Builder.
    Note:
    You must launch Reports Builder now so that the new REPORTS_CLASSPATH is used.
    Choose Program > Import Java Classes to display the Import Java Classes dialog box.
    Regards

  • Problem with importing a java export on SQLSERVER 2005

    We are trying to import a java export for a system refresh.   The SAPINSTgets too step 31 of 32, run java migration toolkit, and then fails  with the following error.
    invalid object name "J2EE_CONFIG"   This is showing up in the runJmt.log.
    com.sap.engine.frame.core.configuration.ConfigurationException: Error occurred during DB access: cluster_data/dispatcher,
         at com.sap.engine.core.configuration.impl.persistence.rdbms.PersistenceHandler.readConfig(PersistenceHandler.java:108)
         at com.sap.engine.core.configuration.impl.cache.CachedConfiguration.<init>(CachedConfiguration.java:62)
         at com.sap.engine.core.configuration.impl.cache.ConfigurationCache.getCachedConfiguration(ConfigurationCache.java:848)
         at com.sap.engine.core.configuration.impl.cache.ConfigurationCache.getCachedConfiguration(ConfigurationCache.java:882)
         at com.sap.engine.core.configuration.impl.cache.ConfigurationCache.openConfiguration(ConfigurationCache.java:748)
         at com.sap.engine.core.configuration.impl.ConfigurationHandlerImpl.openConfiguration(ConfigurationHandlerImpl.java:734)
         at com.sap.engine.core.configuration.impl.ConfigurationHandlerImpl.openConfiguration(ConfigurationHandlerImpl.java:693)
         at com.sap.sdt.serviceframework630.impl.ClusterDataImpl._getSourceIds0(ClusterDataImpl.java:54)
         at com.sap.sdt.serviceframework630.impl.ClusterDataImpl.getDispatcherIds(ClusterDataImpl.java:91)
         at com.sap.sdt.serviceframework630.impl.ClusterDataImpl.createIdMapping(ClusterDataImpl.java:172)
         at com.sap.sdt.jmt.migrationtool.MigrationToolImport.prepareSwitch(MigrationToolImport.java:1129)
         at com.sap.sdt.jmt.migrationtool.MigrationToolImport.startTool(MigrationToolImport.java:403)
         at com.sap.sdt.jmt.migrationtool.MigrationToolImport.main(MigrationToolImport.java:1561)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at com.sap.engine.offline.OfflineToolStart.main(OfflineToolStart.java:81)
    Caused by: java.sql.SQLException: [NWMss][SQLServer JDBC Driver][SQLServer]Invalid object name 'J2EE_CONFIG'.
         at com.sap.nwmss.jdbc.base.BaseExceptions.createException(Unknown Source)
         at com.sap.nwmss.jdbc.base.BaseExceptions.getException(Unknown Source)
         at com.sap.nwmss.jdbc.sqlserver.tds.TDSRequest.processErrorToken(Unknown Source)
         at com.sap.nwmss.jdbc.sqlserver.tds.TDSRequest.processReplyToken(Unknown Source)
         at com.sap.nwmss.jdbc.sqlserver.tds.TDSRPCRequest.processReplyToken(Unknown Source)
         at com.sap.nwmss.jdbc.sqlserver.tds.TDSRequest.processReply(Unknown Source)
         at com.sap.nwmss.jdbc.sqlserver.SQLServerImplStatement.getNextResultType(Unknown Source)
         at com.sap.nwmss.jdbc.base.BaseStatement.commonTransitionToState(Unknown Source)
         at com.sap.nwmss.jdbc.base.BaseStatement.postImplExecute(Unknown Source)
         at com.sap.nwmss.jdbc.base.BasePreparedStatement.postImplExecute(Unknown Source)
         at com.sap.nwmss.jdbc.base.BaseStatement.commonExecute(Unknown Source)
         at com.sap.nwmss.jdbc.base.BaseStatement.executeQueryInternal(Unknown Source)
         at com.sap.nwmss.jdbc.base.BasePreparedStatement.executeQuery(Unknown Source)
         at com.sap.sql.jdbc.basic.BasicPreparedStatement.executeQuery(BasicPreparedStatement.java:97)
         at com.sap.sql.jdbc.direct.DirectPreparedStatement.executeQuery(DirectPreparedStatement.java:281)
         at com.sap.sql.jdbc.direct.DirectPreparedStatement.executeQuery(DirectPreparedStatement.java:248)
         at com.sap.engine.core.configuration.impl.persistence.rdbms.DBAccessDefault.getConfiguration(DBAccessDefault.java:578)
         at com.sap.engine.core.configuration.impl.persistence.rdbms.PersistenceHandler.readConfig(PersistenceHandler.java:102)
         ... 17 more
    com.sap.engine.frame.core.configuration.ConfigurationException: Error occurred during DB access: cluster_data/dispatcher,
         at com.sap.engine.core.configuration.impl.persistence.rdbms.PersistenceHandler.readConfig(PersistenceHandler.java:108)
         at com.sap.engine.core.configuration.impl.cache.CachedConfiguration.<init>(CachedConfiguration.java:62)
         at com.sap.engine.core.configuration.impl.cache.ConfigurationCache.getCachedConfiguration(ConfigurationCache.java:848)
         at com.sap.engine.core.configuration.impl.cache.ConfigurationCache.getCachedConfiguration(ConfigurationCache.java:882)
         at com.sap.engine.core.configuration.impl.cache.ConfigurationCache.openConfiguration(ConfigurationCache.java:748)
         at com.sap.engine.core.configuration.impl.ConfigurationHandlerImpl.openConfiguration(ConfigurationHandlerImpl.java:734)
         at com.sap.engine.core.configuration.impl.ConfigurationHandlerImpl.openConfiguration(ConfigurationHandlerImpl.java:693)
         at com.sap.sdt.serviceframework630.impl.ClusterDataImpl._getSourceIds0(ClusterDataImpl.java:54)
         at com.sap.sdt.serviceframework630.impl.ClusterDataImpl.getDispatcherIds(ClusterDataImpl.java:91)
         at com.sap.sdt.serviceframework630.impl.ClusterDataImpl.createIdMapping(ClusterDataImpl.java:172)
         at com.sap.sdt.jmt.migrationtool.MigrationToolImport.prepareSwitch(MigrationToolImport.java:1129)
         at com.sap.sdt.jmt.migrationtool.MigrationToolImport.startTool(MigrationToolImport.java:403)
         at com.sap.sdt.jmt.migrationtool.MigrationToolImport.main(MigrationToolImport.java:1561)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at com.sap.engine.offline.OfflineToolStart.main(OfflineToolStart.java:81)
    Caused by: java.sql.SQLException: [NWMss][SQLServer JDBC Driver][SQLServer]Invalid object name 'J2EE_CONFIG'.
         at com.sap.nwmss.jdbc.base.BaseExceptions.createException(Unknown Source)
         at com.sap.nwmss.jdbc.base.BaseExceptions.getException(Unknown Source)
         at com.sap.nwmss.jdbc.sqlserver.tds.TDSRequest.processErrorToken(Unknown Source)
         at com.sap.nwmss.jdbc.sqlserver.tds.TDSRequest.processReplyToken(Unknown Source)
         at com.sap.nwmss.jdbc.sqlserver.tds.TDSRPCRequest.processReplyToken(Unknown Source)
         at com.sap.nwmss.jdbc.sqlserver.tds.TDSRequest.processReply(Unknown Source)
         at com.sap.nwmss.jdbc.sqlserver.SQLServerImplStatement.getNextResultType(Unknown Source)
         at com.sap.nwmss.jdbc.base.BaseStatement.commonTransitionToState(Unknown Source)
         at com.sap.nwmss.jdbc.base.BaseStatement.postImplExecute(Unknown Source)
         at com.sap.nwmss.jdbc.base.BasePreparedStatement.postImplExecute(Unknown Source)
         at com.sap.nwmss.jdbc.base.BaseStatement.commonExecute(Unknown Source)
         at com.sap.nwmss.jdbc.base.BaseStatement.executeQueryInternal(Unknown Source)
         at com.sap.nwmss.jdbc.base.BasePreparedStatement.executeQuery(Unknown Source)
         at com.sap.sql.jdbc.basic.BasicPreparedStatement.executeQuery(BasicPreparedStatement.java:97)
         at com.sap.sql.jdbc.direct.DirectPreparedStatement.executeQuery(DirectPreparedStatement.java:281)
         at com.sap.sql.jdbc.direct.DirectPreparedStatement.executeQuery(DirectPreparedStatement.java:248)
         at com.sap.engine.core.configuration.impl.persistence.rdbms.DBAccessDefault.getConfiguration(DBAccessDefault.java:578)
         at com.sap.engine.core.configuration.impl.persistence.rdbms.PersistenceHandler.readConfig(PersistenceHandler.java:102)
         ... 17 more
    Error executing Migration Tool Import
    java.lang.IllegalArgumentException
         at com.sap.sdt.serviceframework630.impl.ClusterDataImpl.createBoxNumberMapping(ClusterDataImpl.java:137)
         at com.sap.sdt.serviceframework630.impl.ClusterDataImpl.createIdMapping(ClusterDataImpl.java:172)
         at com.sap.sdt.jmt.migrationtool.MigrationToolImport.prepareSwitch(MigrationToolImport.java:1129)
         at com.sap.sdt.jmt.migrationtool.MigrationToolImport.startTool(MigrationToolImport.java:403)
         at com.sap.sdt.jmt.migrationtool.MigrationToolImport.main(MigrationToolImport.java:1561)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at com.sap.engine.offline.OfflineToolStart.main(OfflineToolStart.java:81)

    Hi David,
    since I experiencing the same problem like you did, I'm interested what do you mean by "SQLSERVER script for system refreshes".
    I was searching around but didn't find anything close to this?!
    Can you please help?
    Tnx.
    Kind regrads,
    Samo

  • One disadvantage of automatic import of Java lang package.

    When ever a new java class is added in java.lang package jdk people has to think one think in their mind. I have written one java class named com.myPack.Test if suppose the same class name is included in java.lang then that greatly affects all my programs.since java.lang is by default imported. i have to do lot of changes in my code.
    Can this be avoided. Can i avoid the default import of java.lang package by any means.
    Am i making sense.?

    thanks jsalonen and pbrockway2
    I understand but, Isn't it a Genuine requirement..?
    I have written a class say com.myPack.Test
    i am using this in some other package.
    i am importing this by the below statement
    import com.myPack.*;
    this package is extensivly used in many a packages.
    suppose in new JDK if the java.lang.TEST is written.
    In this case, it is a gereat overhead for me. i have to do lot of code changes right?.
    one solution can be replace all import com.myPack.* by
    import com.myPack.Test; but isn't it a great rework. which afects widely in all the applications right?..
    one other simple solution can be avoiding default import java.lang.* in certain packages alone, Isn't it?

  • Java Importer: import of java.lang.Boolean does not compile?

    I have created a webservicestub for the Reports webservice with JDeveloper.
    Now I want to use it in Forms. All methods work correctly, except the runJob method, which uses a boolean argument. I think I need to import java.lang.Boolean for it, but the created package body does not compile ("wrong number or type of arguments" in jni calls).
    Does anybody have suggestions how to get it compiling, or how to call the runJob method without the import of java.lang.Boolean?

    Downloading 1.4 sdk does not have the javac, it just has the JRENo, you apparently downloaded the JRE runtime. Do this to get the compiler, etc:
    Go here: http://java.sun.com/j2se/1.4/download.html
    and in the section titled:
    Download J2SETM v 1.4.0_01 JRE SDK
    look in this row:
    Windows (all languages, including English)
    and click download in the column headed SDK at the far right

  • How to import a java class

    Hi
    I want to know how can i import some java classes to my application.
    I'm trying to write a little class as:
    package paco.view;
    import javax.faces.component.UIComponent;
    import javax.faces.context.FacesContext;
    import javax.faces.convert.Converter;
    import javax.faces.convert.ConverterException;
    import oracle.jbo.domain.ClobDomain;
    public class ClobConverter implements Converter {
    public ClobConverter() {
    public Object getAsObject(FacesContext context,
    UIComponent component,
    String value) {
    if (context == null || component == null) {
    throw new NullPointerException("FacesContext and UIComponent can not be null");
    if (value == null) {
    return null;
    try {
    return new ClobDomain(value);
    } catch (Exception ex) {
    final String message =
    String.format("Unable to convert boolean value \"%s\" into a oracle.jbo.domain.Number",
    value);
    throw new ConverterException(message, ex);
    public String getAsString(FacesContext context,
    UIComponent component,
    Object value) {
    if (context == null || component == null) {
    throw new NullPointerException("FacesContext and UIComponent can not be null");
    return value.toString();
    but I'got this message:
    Error(3,8): class javax.faces.component.UIComponent not found
    Error(4,8): class javax.faces.context.FacesContext not found
    Error(5,8): class javax.faces.convert.Converter not found
    Error(6,8): class javax.faces.convert.ConverterException not found
    What should I do?
    Thanks in advance
    FRANCISCO

    You need to add the faces library to you project. To do this, select the project properties, go to libraries and class path and select the faces library.
    Using JDev you can also choose one or more project technologies (project properties->technology scope) which will add the needed libraries to the project.
    Timo

  • Import net.java.stun4j.StunAddress; anybody knows how i can get this jar fi

    Can anybody tell me how i can get this
    import net.java.stun4j.StunAddress;
    i need these jar files.

    Previous link was on older version, it did not help me. Finally I've got latest version in source from CVS

  • Imports (importing other java files)

    Hi there. this is sorta urgent.
    It works at uni, but not here, don't know why.
    I am using JDK 1.4.1_01 and jcreater lite as an IDE
    I have made a program, its for the course, but everytime I compile it says that the packages could not be found.
    for example:
    import Date.java;
    import Calander.java;
    public class mainapplication {
         public static void main(String[] args)
    ..It gives me an error:
    C:\coursework2\mainapplication.java:16: package Date does not exist
    import Date.java;
    ^
    C:\coursework2\mainapplication.java:17: package Calander does not exist
    import Calander.java;
    ^
    C:\coursework2\Date.java:15: package Calander does not exist
    import Calander.java;
    ^
    3 errors
    And if I take out the .java; from the imports commands, then it still won't compile, saying it's expecting a '.'!
    What should I do? I even tried going into MSDOS and typing javac mainapplication.java but i still get the same errors
    Please help, I know it's a simple solution, but need your help.
    Thanks

    It works at uni, but not here, don't know why.
    It does not work at uni, if you don't believe me go test it.
    The "import" statement only gives you the option to use short names for classes. Thanks to it you don't need to type the fully qualified class name, such as "javax.security.auth.kerberos.KerberosKey", every time you want to use the class ("KerberosKey"). It only exists to help you, the programmer, write shorter code and type less.
    That said, you cannot "import java files". It just makes no sense.
    Date and Calendar are both in the package java.util, maybe you want to "import java.util.Date" and "import java.util.Calendar".
    Hi there. this is sorta urgent.
    I hate people who use that word...

  • Import tablesorter.java

    Hello,
    i'm a newbie and it is highly probable that it is easy for you. I will import some *.java-Files, but how can i do that?
    Thanks,
    Peter

    hi peter,
    Go through this
    /people/bertram.ganz/blog/2006/03/07/enhanced-web-dynpro-java-tablesorter-for-sap-netweaver-04s
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/60d5b593-ba83-2910-28a9-a7a7c7f5996f
    Thanks&Regards
    SureshKumar T

  • Missing Imports in Java stored Procedure

    --- Oracle Database Configuration :-
    --- Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
    --- PL/SQL Release 9.2.0.4.0 - Production
    --- CORE 9.2.0.3.0 Production
    --- TNS for Solaris: Version 9.2.0.4.0 - Production
    --- NLSRTL Version 9.2.0.4.0 - Production
    When loading a java stored procedure into the above database I am seeing the following errors:-
    Class javax.xml.parsers.DocumentBuilder not found in import.
    Class javax.xml.parsers.DocumentBuilderFactory not found in import.
    Class javax.xml.parsers.FactoryConfigurationError not found in import.
    Class javax.xml.parsers.ParserConfigurationException not found in import.
    Class org.xml.sax.EntityResolver not found in import.
    Class org.xml.sax.InputSource not found in import.
    Class org.xml.sax.SAXException not found in import.
    Class org.xml.sax.SAXParseException not found in import.
    Class org.w3c.dom.Document not found in import.
    Interface ErrorHandler of class CMSLogic not found.
    However, the process results in no errors when running against a database running on a Windows platform.
    Assistance would be appreciated.
    Thanks.
    Adrian

    Adrian,
    Package "javax.xml" is part of the JDK since version 1.4
    However, Oracle 9i is compatible with JDK 1.3
    So either you need to find a 3rd-party implementation of package "javax.xml" that is compatible with JDK 1.3, or upgrade your database to Oracle 10g, which is compatible with JDK 1.4
    Good Luck,
    Avi.

  • Import of Java libs seems to be failing

    Hi,
    I'm on PI 7.1.
    I'm creating a SOAP envelope with signatures. To perform this I have to add a lot of java archives with the extra functionality.
    I have so fair been able to import all the classes. But then I get an error on the following.
    Application mapping program com/[xxx]/xml/CreateSOAPRequest throws a stream transformation exception: Processor Factory com.sun.xml.wss.impl.misc.XWSSProcessorFactory2_0Impl not found.
    I'm using other classes from the same archive xws-security.jar. Are there any limitations to the use of Impl or how many classes can be in the imported archives.
    It works with the current list of imported archives in eclipse, but it seems like I'm missing on to make everything work in PI.
    Are there any limitations to how many classes there can be in an importet archive or do I have to find an other source of the error.
    Daniel

    >>Application mapping program com/xxx/xml/CreateSOAPRequest throws a stream transformation exception: Processor Factory com.sun.xml.wss.impl.misc.XWSSProcessorFactory2_0Impl not found.
    Your errror shows that xws-security jar does not have class XWSSProcessorFactory2_OImpl   ...
    So update the latest version of xws-security jar.
    >>Are there any limitations to how many classes there can be in an importet archive
    NO.. There is no limitation. See what jar version do you use in eclipse and same version is imported in PI for mapping ..

Maybe you are looking for

  • Why won't my RAW files import into LR4?

    Hello all, Something very strange is going on with LR4.  I have been using LR since version 1 and never had this happen before.  When I have an SD card filled with jpegs and RAW files from my Fuji X100 camera and try to import all of them into LR 4,

  • Colors are off

    I've used previous Photoshop versions and recently upgraded to Photoshop CS5 (I've used the same Dell monitor with previous versions and it looked just fine before). For some reason the colors I use in Photoshop CS5's work-space are off. For example,

  • Why this select statement is failing

    Hi to all experts. Im not able to understand why this select statement is not fetching the record with this parameters. When i give the same parameters in se11 table t512w.. It has one record, but here the sy-subrc Value is 4. select  * from t512w wh

  • Message control for CIN

    Hi Experts, I am having one issue. We know that there is a message control for CIN. SPRO - Logistics General - Tax on Goods Movements - India - Tools - Message control. So here now i want to search other messages which are related to CIN. That is i w

  • Modifying an "ssl-proxy-list" without disturbing the active sessions.

    Hello, I would like to know if it is possible to have two SSL modules installed in a CSS11503 with each one having it's own "ssl-proxy-list" ("ssl-proxy-list list1" and "ssl-proxy-list list2"), but the two lists (list1 and list2) are exactly the same