New syntax to import .class Files???

Using JDK 1.2.2 i coul import my own class files by typing
import ClassName;
Using the j2sdk1.4.0 compile I get the Error Message
`.` expected
Is there a new synatx for importing .class files???

Normally I don't help anyone under this username, but since the idiot Kayaman is here being his usual jerk-ness providing no meaningful help whatsoever (as usual), I'll let you in on the fact that 1.4 doesn't let you import un-packaged classes anymore. So just remove the import statement, or change your imported class into some kind of package.

Similar Messages

  • Error wile importing class file

    hi,
    i am trying to import a class file(exp) in jsp, but it gives error mesg like unable to find the class file. the code is
    class file is plcaced in "C:\Program Files\Apache Group\Tomcat 4.1\webapps\ROOT\WEB-INF\classes"
    <%@ page language="java" import="exp" %>
    <html>
    <body>
    <%! test t = new test(); %>
    Length of Sabarish is <%= t.strLength("Sabarish") %>
    </body>
    </html>kindly help

    hai,
    try placing ur class in a package and provide fully qualified class name in jsp import
    hope this will help
    regards,
    varma.

  • Importing .class file into jsp file

    i am unable to import a .class file into my .jsp file
    please give me the correct method to import and also tell me where to deploy the .class file

    i am unable to import a .class file into my .jsp
    file
    please give me the correct method to import and also
    tell me where to deploy the .class filehttp://www.apl.jhu.edu/~hall/java/Servlet-Tutorial/Servlet-Tutorial-JSP.html#Section5

  • How to import class files in Rhino shell

    Hi,
    i want to test some methods of ScriptEngineContext class in
    Microsoft_Active-Directory-and-Windows_2011.1r3 collector, so i import
    some class files in Rhino shell, but some errors apeared, detail steps
    are following:
    1. steve_zeng@suse01:~/sentinel/doc/Plug-ins/Collectors> cd
    Microsoft_Active-Directory-and-Windows_2011.1r3, it will apear some
    important jar packages(red fonts)
    accountImpl.js commons-codec-1.3.jar dataobject.js
    event.js joda-time-2.1.jar protoEvt.map sha1.lic
    trust.js
    account.js commons-io-2.4.jar date.js
    eventsource.js js.jar Rec2Evt.map sqlquery.js
    trusttype.js
    agent.nfo commons-logging-1.1.jar docs
    eventsourceserver.js LegacyEvtNames.map record.js sysEvents.map
    utils.js
    asset.js commons-logging-adapters-1.1.jar error_codes.map
    Evt2EvtData.map logon_types.map release.js
    syslog_facility.map vuln.js
    bsf-240.jar commons-logging-api-1.1.jar EULAs
    file.js main.js session.js taxonomy.map
    window-field.map
    collector.js connector.js
    eventcode_parsing.js identityImpl.js master.jar
    severity.map tenant.js xdas_out.map
    collectorutil.jar data event_codes.map
    identity.js package.xml sha1.js trustImpl.js
    xdas_tax.map
    2.
    steve_zeng@suse01:~/sentinel/doc/Plug-ins/Collectors/Microsoft_Active-Directory-and-Windows_2011.1r3>
    java -classpath ./js.jar org.mozilla.javascript.tools.shell.Main
    Rhino 1.7 release 3 2011 05 09
    js>
    3. js> JavaPackage
    esecurity.ccs.comp.evtsrcmgt.collector.util.Script EngineContext
    js: "<stdin>", line 3: missing ; before statement
    js: JavaPackage
    esecurity.ccs.comp.evtsrcmgt.collector.util.Script EngineContext
    js: .....................^
    4. js> loadClass(JavaPackage
    esecurity.ccs.comp.evtsrcmgt.collector.util.Script EngineContext);
    js: "<stdin>", line 4: missing ) after argument list
    js: loadClass(JavaPackage
    esecurity.ccs.comp.evtsrcmgt.collector.util.Script EngineContext);
    js: ...............................^
    js>
    when i run JavaPackage or loadClass shell, js: "<stdin>" error apears,
    why? does anyone can help me? thanks!
    BR
    Steve zeng
    steve_zeng
    steve_zeng's Profile: https://forums.netiq.com/member.php?userid=3875
    View this thread: https://forums.netiq.com/showthread.php?t=49805

    steve_zeng;239719 Wrote:
    > Hi,
    > i want to test some methods of ScriptEngineContext class in
    > Microsoft_Active-Directory-and-Windows_2011.1r3 collector, so i import
    > some class files in Rhino shell, but some errors apeared, detail steps
    > are following:
    >
    > 1. steve_zeng@suse01:~/sentinel/doc/Plug-ins/Collectors> cd
    > Microsoft_Active-Directory-and-Windows_2011.1r3, it will apear some
    > important jar packages(red fonts)
    >
    > accountImpl.js commons-codec-1.3.jar dataobject.js
    > event.js joda-time-2.1.jar protoEvt.map sha1.lic
    > trust.js
    > account.js commons-io-2.4.jar date.js
    > eventsource.js js.jar Rec2Evt.map sqlquery.js
    > trusttype.js
    > agent.nfo commons-logging-1.1.jar docs
    > eventsourceserver.js LegacyEvtNames.map record.js sysEvents.map
    > utils.js
    > asset.js commons-logging-adapters-1.1.jar error_codes.map
    > Evt2EvtData.map logon_types.map release.js
    > syslog_facility.map vuln.js
    > bsf-240.jar commons-logging-api-1.1.jar EULAs
    > file.js main.js session.js taxonomy.map
    > window-field.map
    > collector.js connector.js
    > eventcode_parsing.js identityImpl.js master.jar
    > severity.map tenant.js xdas_out.map
    > collectorutil.jar data event_codes.map
    > identity.js package.xml sha1.js trustImpl.js
    > xdas_tax.map
    >
    >
    > 2.
    > steve_zeng@suse01:~/sentinel/doc/Plug-ins/Collectors/Microsoft_Active-Directory-and-Windows_2011.1r3>
    > java -classpath ./js.jar org.mozilla.javascript.tools.shell.Main
    > Rhino 1.7 release 3 2011 05 09
    > js>
    >
    > 3. js> JavaPackage
    > esecurity.ccs.comp.evtsrcmgt.collector.util.Script EngineContext
    > js: "<stdin>", line 3: missing ; before statement
    > js: JavaPackage
    > esecurity.ccs.comp.evtsrcmgt.collector.util.Script EngineContext
    > js: .....................^
    >
    > 4. js> loadClass(JavaPackage
    > esecurity.ccs.comp.evtsrcmgt.collector.util.Script EngineContext);
    > js: "<stdin>", line 4: missing ) after argument list
    > js: loadClass(JavaPackage
    > esecurity.ccs.comp.evtsrcmgt.collector.util.Script EngineContext);
    > js: ...............................^
    > js>
    >
    >
    > when i run JavaPackage or loadClass shell, js: "<stdin>" error apears,
    > why? does anyone can help me? thanks!
    >
    >
    > BR
    > Steve zeng
    Can you explain a little more about what you're trying to accomplish by
    this? The script engine is not really designed around facilitating
    shell-based access right now,I'd be interested to know what you can't do
    in the Debugger that you are trying to accomplish in the shell.
    brandon.langley
    brandon.langley's Profile: https://forums.netiq.com/member.php?userid=350
    View this thread: https://forums.netiq.com/showthread.php?t=49805

  • Import class file in default package (netbeans) into my jsp

    Hello all I have created a class file in the default package under Source Files in the netbeans 5 ide.
    I am having a problem importing that class file into my jsp(which resides in the Web Pages directory .
    I tried the following:
    <jsp:useBean id="dial" class="Test" scope="session" />
    my class file is Test.java
    Any help or explanation would be greatly appreciated.
    TIA!

    Will not work. Classes have to be defined in a package, the default package just wont do.
    ram.

  • Importing class files

    Hi,
    I'm new to Eclipse and need help.
    I have been given a folder with 5 classes and 1 class with a main method.
    My first question is: Is there a way to import these classes into eclipse and run the main class with main method? I don't have any java files.
    What I have to do is basically write a java source file for the main class, but without decompiling it.
    My second question: Is there a way to import the 5 classes to my workspace so that I can use them when I recreate the java file for the main class?
    I have tried searching everywhere, but could not find a solution that worked.
    Thanks

    bizso wrote:
    Hi,
    I'm new to Eclipse and need help.
    I have been given a folder with 5 classes and 1 class with a main method.
    My first question is: Is there a way to import these classes into eclipse and run the main class with main method? I don't have any java files.
    What I have to do is basically write a java source file for the main class, but without decompiling it.
    My second question: Is there a way to import the 5 classes to my workspace so that I can use them when I recreate the java file for the main class?
    I have tried searching everywhere, but could not find a solution that worked.
    ThanksI don't believe you... look at the eclipse help... it's really rather good... you need to add the directory containing those five classes to the classpath... I don't know how to do that.
    AND... This is a Java forum, not the Eclipse Help Desk... Go ask in an Eclipse forum... You're likely to get better answers, and if this forum ever started to act as an "all IDE's helpdesk" then we'd buried in irrelvant gumby posts within days... so we actively try to resist the temptation to help with IDE questions... comprende?
    There's a place for this, and a place for that... programmers tend to be anal about stuff like this and that.
    Cheers. Keith.

  • Can I replace an older Airport Extreme with a newer one by importing configuration file

    Can I import the configuration file from an older Airport base station into a newer replacement Airport base station?  It would seem this would save me a lot of extra work.  First, it would hopefully save time by automatically configuring the new base station without me having to fiddle with the settings.  Second, it might hopefully save some more time if I would not have to re-enter the network parameters for all the devices currrently connected to my Airport (wi-fi) network.
    Read on for more details.
    My old Apple Airport Extreme Base Station (AEBS) is not a gigabit one.  Moreover, it's been experiencing some hardware failures recently.  So, I recently purchased a new Apple Airport Extreme (base station) that is a gigabit one (Model# ME918LL/A with 802.11ac Wi-FI).  Now, I'd like to replace the older base station with this newer one with the MINIMAL amount of disruption and manual work possible.
    Regards,
    Tony

    I relaced an older AEBS with the new one, recently, and did not need to import anything, but if you can save the configuration file from your old one, then you can import it to the new one. I've never tried that when I switched, and it didn't seem to matter which suggests the configuration file may be on disk somewhere.

  • Syntax for Import par file

    Hello what would be the proper syntax in an import parfile if I want to import multible schemas using the fromuser touser option? The export file was create as full=y. Would it be as follows:
    file=thefile.dmp
    log=thelog.log
    ignore=y
    userid=sys/somepwd
    fromuser=astoria touser=astoria
    fromuser=BBT touser=BBT
    Thanks

    Try :
    fromuser=(astoria,BBT)
    touser=(astoria,BBT)

  • Flash player caches external class files

    Hi I work for a technology company in San Antonio and we use
    flash for developing interactive course ware. We use a flash shell
    which loads the separate pages of our lessons and have noticed a
    very big problem with the way the flash player caches class files.
    Basically it seems that when you use the 'import' call in
    actionscript the flash movie doesn't import the external class if
    it has already been loaded. the problem is that we have a huge
    amount of developed classes, many of which have been updated
    throughout our development. Is there any way for force clear the
    ASO cache in actionscript or force import external actionscript
    classes?

    Yes we know and use the delete aso files feature all the
    time. this however is a runtime problem. meaning that the flash
    player itself is caching class files and there is no way to get it
    to refresh these links without doing a forced refresh of the shell
    itself. this is something that is not an option as it doesn't allow
    for fluid page loading. Is there any way to force reload/import
    class files that have already been loaded, that is clear the
    class/aso cache in the flash player itself using actionscript
    code?

  • Import dump file to apex

    Dear All
    I am new using oracle apex.
    I have oracle express database and create user and import it but when connect on apex as system I can't see the user created.
    now I want create new user and import dump file to it how I can import dump file to oracle apex?.
    thanks in advance.....

    Hi,
    What is your database edition and version?
    Apex is one user inside database.
    If you have created Apex user, it means you have created user to Apex workspace.
    You like import database schema/user dump?
    if that is case that is not relating Apex anyhow and you need create database user.
    Also best post question to Database General forum if you have questions how import schema dump
    General Database Discussions
    Regards,
    Jari

  • Importing my class files from another folder

    hello everybody ,im creating a software package for a new company and want to organise my class files into different folders so that it would be easier for someone to navigate through them and update if necessary ,how do i import an instance of a class in a file that is in a subfolder of the folder that contains the class that is calling it.(sorry for being a bit long winded) iv tried diff things and they didn't work.
    At the moment i have all the files in the one folder,but as i said above want to put them into appropriate folders.
    I would be very gratefull if someone could give me some examples and if not some appropriate links,thanks iv tried looking for this on the net but could not find anything.

    What you should probably do is to organise your classes into a heirarchy of packages not merely folders. Java expects the package structure to be reflected in the directory structure holding both the source and class files. If it's looking for a class called, say, com.mycompany.widgets.MainWidget it expects to find it in a directory com//mycompany/widgets relative the the directory on the class path.
    Use the package directive in each source file to indicate the package path.

  • Hi, new to 3D, doubt in importing class

    hi all,
    i m new to JAVA 3D, i currrently hv a simple example source which i try to compile it, it just can't, saying that class not found, but i m sure i hv download and install the JAVA 3D for DirectX 1.3.1, also i hv the following code
    import java.applet.Applet;
    import java.awt.BorderLayout;
    import java.awt.Label;
    import java.awt.GraphicsConfiguration;
    // below having importing class problem
    import com.sun.j3d.utils.applet.MainFrame;
    import com.sun.j3d.utils.universe.*;
    import com.sun.j3d.utils.geometry.*;
    import javax.media.j3d.*;
    import javax.vecmath.*;can anyone guide me, thank you

    That is the way I understand it. Here is the information from the documentation.
    The version of the Export utility must be equal to the version of either the source or target database, whichever is earlier.
    For example, to create an export file for an import into a later release database, use a version of the Export utility that equals the source database. Conversely, to create an export file for an import into an earlier release database, use a version of the Export utility that equals the version of the target database.
    In general, you can use the Export utility from any Oracle8 release to export from an Oracle9i server and create an Oracle8 export file.
    Then further down is this handy table:
    Table 21-5 Using Different Releases of Export and Import
    Export from Import to Use Export Release Use Import Release
    10.1.0 9.0.2 9.0.2 9.0.2
    So, that is the way I understand this. I have not done this, but this is how I undertand it to work.
    Please correct me if I am wrong.
    Thanks
    Dean

  • Moving a functional jsp and jar file to new directory breaks import?

    Simply put - how can I "move" or "copy" a functional JSP directory from the root of my site to a subdirectory
    of the same site and have it continue to work?
    here are the details:
    I have a site where the functional JSP content resides like so ...
    c:\site\itworkshere\thetestfile.jsp
    c:\site\itworkshere\WEB-INF\web.xml
    c:\site\itworkshere\lib\thejarfile.jar
    c:\site\itworkshere\classes\props.properties
    but when I copy the"itworkshere" directory to c:\site\newdirectory\itworkshere
    and try to load thetestfile.jsp page in my browser, I get ...
    thetestfile$jsp.java:6: Package com.corporatename.module.io not found in import.
    I know that the module.io classes are in thejarfile.jar, but for some reason, now that I've put the files
    in a new directory, the import is failing (simple import directive in thetestfile.jsp) And - yes - the .jar
    file is there in the new subdirectory.
    I am a newbie with jsp and just need to copy the files to new location and have them continue to work.
    Do I have to recompile the .jar with some sort of adjustments? I poked around and I don't see any assumptions about the directory structure in the build. The behavior leads me to believe that the build is assuming something
    about its location in the directory tree.
    Hope this question is clear and I appreciate any direction you can provide to steer me where to look/modify
    the necessary changes so I can move the .jsp's and .jar and not break them.

    Thanks for the suggestions and insights. I have made some progress.
    a context path of "/newdirectory/itworkshere" and a docBase of "./newdirectory/itworkshere" has resolved
    the .jsp include problem.
    However this seems a bit counter-intuitive to me considering that the default root context which is "" stands
    at the appBase which in my case is C:\Site. Since the default does not explicitly refer to the "itworkshere" directory,
    I'd expect that the newly added Context element would not have to either ---- BUT --- it does require that I include "itworkshere" in the context path and docBase (where I would expect ./newdirectory would have been sufficient since the default works that way) ... am I missing something?
    Now I havethe next odd behavior - the Servlet which resides in "itworkshere\WEB-INF\lib" is not loading when I put the appropriate URL in --> /newdirectory/itworkshere/DataCrunchingServlet
    I checked the web.xml file and it has the appropriate servlet-name and url-pattern (relative references)
    Furthermore I did a test where I simply rename the original working instance directory and again --- the URL is failing to find the servlet!!! (and yes I stopped/started Tomcat) It is as if the servlet can only be found in the originally installed scenario.
    I am extremely puzzled that the behaviors seem to indicate an assumption about the path structure, but the web.xml file is set up correctly.
    Help help!!! and Thank you.l

  • Whether to import the class file put in JAVA_TOP

    I have put the java class file in JAVA_TOP. Now i want to access the method in that class from jsp, is it necessary to import the class file path in jsp. Without importing the class file path how can i access the method.
    JSP Coding
    <%@ page contentType="text/html;charset=windows-1252"%>
    <%@ page import="java.*" %>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>
    Hello World
    </title>
    </head>
    <body>
    <%
    sample objsample = new sample();
    %>
    <b>
    NAME : </b><input type="text" value="<%=objsample.getName()%>">
    </body>
    </html>
    Class file
    public class sample
    public sample()
    String name = "JOHN";
    public String getName()
    return name;
    Pls help me

    Hi,
    For sys outs check the following log files:
    <ORACLE_SOA_HOME>/opmn/logs/default_group~home~default_group~1.log
    or
    <ORACLE_SOA_HOME>/j2ee/home/log/home_default_group_1/system_*.log
    Here server instance name is home, change it with your server instance name.
    Dharmendra
    http://soa-howto.blogspot.com

  • Custom Class file errors out on import javax.servlet.http.HttpSession

    I am trying to write a class file to handle events. This is a test class file copied from the UIX Docs. When I put this in JDeveloper 903 ,and build it the compiler gives the error:
    Error(2,27): cannot access class javax.servlet.http.HttpSession; file javax\servlet\http\HttpSession.class not found
    I am not sure what is the problem? Can anyone please help?
    Here is the code:--
    package mypackage1;
    import javax.servlet.http.HttpSession;
    import oracle.cabo.servlet.Page;
    import oracle.cabo.servlet.BajaContext;
    import oracle.cabo.servlet.event.PageEvent;
    import oracle.cabo.servlet.event.EventResult;
    public class MyClass
    /** This is handleStoreNameEvent version 1 */
    public static EventResult handleStoreNameEvent(BajaContext context,
    Page page,
    PageEvent event)
    String userName = event.getParameter("txt1");
    HttpSession session = context.getServletRequest().getSession(true);
    session.putValue("User Name", userName);
    Page nextPage = new Page("NextPage");
    return new EventResult(nextPage);
    }

    Hi, you are missing the servlet.jar file from your classpath.
    In JDeveloper, you can add this by opening up your project -> libraries and adding the servlet runtime library.

Maybe you are looking for

  • How to get low performances alert for Hyper-v Host ON scom

    Hello Expert, We have to implement a scenario VM Live migration which involved (SCOM,SCVMM,SCORCH Parts). where SCOM parts  will monitor the performances of SCVMM 's Hyper-V hosts and VMs running the within the Hyper-v hosts. when the VMs utilization

  • Mac Mini crashing

    Since updating to 10.10 my mini is crashing once a day. It restarts automatically and displays a message that there was a problem and to touch any key to continue restoration. I am using Safari when the crashes happen. Has anyone found the reason and

  • Create a screen for user input in BI

    Hi Experts, I want to know can i creat a screen for user input in BI with module pool programing and i want to store the data in ztable in SAP-BI. Moderator message: please search for available documentation, these forums are no substitute for ABAP t

  • Strange border on shape and other layers

    I am working on a file. I have a background layer. I draw a shape layer, in this case a box, and when I do this layer has what almost looks like a drop shadow on two sides, ie the two edges have darker pixels than the shape color. I see the same sort

  • Unable to continue because of a hardware or system error. Sorry, but is unrecoverable.

    This occoured in Photoshop CS3 today. All other Adobe products are functioning normaly on this system. Premiear CS3, Encore, Audition function fine. Photoshop was working fine then failedduring the evening. We have removed and reloaded Photoshop CS3