Loading fails, when classes from other packages are referenced

My applet follows a simple package structure.
There's package P1 and there's another package in it P2 (P1.P2)
P1 contains Applet class A.
P2 contains another class C and interface I. C implements I.
A contains a reference of C, which is initialized in the constructor. The use in the constructor of the A (the applet) is something like this
public A () {
          reg = ToolkitRegistry.getEntry (); //where reg is a reference of type ToolkitRegistry.
          // some more code
          i = (I) C.getC (); //where i is a reference of type I.
}Trying to load this applet throws error saying "Package Loading failed". Important is to note that the loading occurs successfully by commenting out this line           i = (I) C.getC (); //where i is a reference of type I. , without any other change.
I understood this to be some problem with the AIDs assigned to both the packages while converting. Unsure of what's the correct way to assign the PIX values, I've been trying some permutation/combinations, it doesn't seem to work.
Has neone already faced this problem & knows the solution? (The specs aren't much help)

One more point ..... I mentioned commenting the statements, I DO NOT commment the other statements referencing the other package. This means that the loading IS succesfull, even when these two lines reside in there.
1. import P1.P2.*; 2. private I i = null;Above two lines pass the loader. The object creation gets stuck.
Wonder if the package references are actually alright, because JVM wud've treated both situations in a similar way. JCVM is ofcourse different but JCVM spec does not say nething abt this situation (rem: everything is public, so the access control restrictions also do not apply)
are there ne instantiation restrictions? [In my case, it's in the constructor thread)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • Question about access non-public class from other package.

    Hi, everyone!
    Suppose class A and class B are in the same java file of package pkg1
    -- A.java. So, A is a public class and B is a non-public class.
    If I want to access class B from another class class C and class
    C is in package pkg2. When compiling, an error occurs indicating
    that class B is not visible to class C.
    So, If I defined serveral classes in one java file and I want to
    access every class from other package. How should I do?
    (I think in one java file, there should be only one public class and
    only the public class can be accessed from other package.)
    Thanks in advance,
    George

    So, If I defined serveral classes in one java file and
    I want to
    access every class from other package. How should I
    do? As you already seem to know, there is at most one public class allowed per source file (at least, with javac and most popular compilers). So if you want more than one public class, you will need to use more than one file...

  • Calling a object of class from other class's function with in a package

    Hello Sir,
    I have a package.package have two classes.I want to use object of one class in function of another class of this same package.
    Like that:
    one.java
    package co;
    public class one
    private String aa="Vijay";  //something like
    }main.java:
    package co;
    import java.util.Stack;
    public class main extends Stack
    public void show(one obj)
    push(obj);
    public static void main(String args[])
    main oo=new main();
    }when I compile main class, Its not compile.
    Its give error.can not resolve symbol:
    symbol: class one
    location: class co.main
    public void show(one obj)
                              ^Please help How that compile "Calling a object of class from other class's function with in a package" beacuse I want to use this funda in an application

    kumar.vijaydahiya wrote:
    .It is set in environment variable.path=C:\bea\jdk141_02\bin;.,C:\oraclexe\app\oracle\product\10.2.0\server\bin;. command is:
    c:\Core\co\javac one.javaIts compiled already.
    c:\Core\co\javac main.javaBut it give error.
    Both java classes in co package.Okay, open a command prompt and execute these two commands:
    // to compile both classes:
    javac -cp c:\Core c:\Core\co\*.java
    // to run your main-class:
    java -cp c:\Core co.main

  • Scim makes leafpad take a while to load, except when run from terminal

    Leafpad normally loads up in an instant. But with scim running (More specifically with the required environment variables exported. Scim simply running without the environment variables does not cause the problem, but then scim does not work.), although it shows up immediately, the scrollbar, menubar etc are greyed out for a few seconds and the program cannot be used until it is fully loaded.
    I'm sure this is specifically a leafpad problem, because there is no noticable lag in other programs. (Mousepad for example is fine.) However, the fact that it loads immediately when run from a terminal scares me. Why doesn't gmrun (and the fvwm menu) work just like a terminal? Is there a possible fix to this problem?

    droog wrote:
    I'm not having this problem as far as i can see, I use fvwm and scim already so installed leafpad to test and it starts instantly from fvwm's menu or terminal.
    from gmrun leafpad starts instantly too so maybe i'm missing something.
    what are you exporting?
    Just the normal:
    export XMODIFIERS=@im=SCIM
    export GTK_IM_MODULE="scim"
    export QT_IM_MODULE="scim"

  • Force the loading of a class from disk

    Is it possible to force the loading of a class from disk ? The assumption here is that the class we want to load will be continuously updated so we want the latest version of the class(on disk) rather than the one already in memory.
    Thank you.

    You have to implement a custom loader.
    public class MyLoader extends URLClassLoader
      public (URL[] urls)
        super(urls);
      public synchronized loadClass(String className) throws ClassNotFoundException
        // first check built in JDK 1.2 class cache
        Class clazz = findLoadedClass(className);
        if (null == clazz)
          // Didn't find it in cache, so check our custom
          // URL[] classpath, added at the constructor.
          clazz = findClass(className);
          if (null == clazz)
            // Didn't find it in our classpath, so either
            // throw a ClassNotFoundException, or call to
            // the parent if we want to go that way.
            throw new ClassNotFoundException();
        return clazz;
    }In the above, you can do all sort of things. We don't delegate to the parent at all, so if the class being looked for is NOT in any of the URL[] objects passed in when created, then a ClassNotFoundException is thrown. The normal delegation checks cache, then the parent loader, then the findClass(). We simply remove the check to the parent, and try the findClass() right away. Because URLClassLoader implements findClass() to look for a .class in ALL of the URL[] objects passed to it, we don't need to bother with that at all.
    Does that help? Ask away if you have more questions.

  • How do I move objects from other package to a newly created one?

    How do I move objects from other package to a newly created one?
    Thanks!

    Dear Anthony Pham ,
    for changing objects from one package to another package
    open that object for example Report
    open the report and than click GOTO select OBJECT DIRECTIORY ENTRY
    than it will open a popup in that popup click the change and give the new package
    Thanks
    Surendra

  • Failed to load TemplateStream when called from API, but OK in Workbench

    I am getting a "Failed to load TemplateStream for FormQuery" error when I invoke a simple process using the Java API.  When I invoke the same process from WorkBench it's fine.  I am using the FormsService in ES 8.2 turnkey installation.  The operation is "renderPDFForm".  Content Root URI is set to repository:// and Form to Render is set to /CANS_ASP/CANS_ASP.pdf, which is in the repository.  Why would this work when invoked by way of right clicking in WorkBench, but not work when the process is invoked by the Java API?
    Here's the whole error:
    2009-08-25 20:31:23,109 ERROR [com.adobe.workflow.AWS] An exception was thrown with name com.adobe.livecycle.formsservice.exception.RenderFormException message:Failed to load TemplateStream for FormQuery=/CANS_ASP/CANS_ASP.pdf from location URI =repository://. while invoking service FormsService and operation renderPDFForm and no fault routes were found to be configured.
    Thanks.
    Jared

    This problem is not solved, but I have a workaround.  I have gotten it working by avoiding the repository and specifying the form location from the file system.  This works:
    Content Root URI: file:///C:\\
    Form to Render: CANS_ASP.pdf
    In case it wasn't clear, I'm not using a FormServiceClient object.  I'm invoking an orchestration using a ServiceClient.  The Content Root URI and Form To Render are specified in the properties of my renderPDFForm component in Workbench.  I'm able to move ahead with development using this workaround for now, but the question remains about why repository:// does not work when my orchestration is invoked using the Java API but it works fine when tested from WorkBench.
    Jared Langdon

  • Oracle Server 11.2.0.1.0 64-bit fails when invoked from InstallShield

    I'm trying to install the Oracle Server 11.2.0.1.0 64-bit on Windows 2008 SP1 from the InstallShield 2010.
    The installation is silent. Invoked by command line:
    J:\Oracle_11.2.0_x64\OracleServer_11.2.0.1_x64\setup.exe ORACLE_HOME_NAME="ARAXI_11" -silent -nowelcome -force -nowait -noconsole -loglevel fine -noconfig -ignoreSysPrereqs use_prereq_checker=false -responseFile C:\Oracle\11.2.0\installation\scripts\SVRCUSTOM11.2.0.rsp
    The problem is that when the command is invoked from command line (cmd), the installation is successful.
    However, when the same command is invoked from under the InstallShield, the installation fails on Architecture requirement check:
    INFO: *********************************************
    INFO: Architecture: This is a prerequisite condition to test whether the system has a certified architecture.
    INFO: Severity:CRITICAL
    INFO: OverallStatus:OPERATION_FAILED
    INFO: All forked task are completed at state performChecks
    INFO: Completed background operations
    INFO: Moved to state <performChecks>
    INFO: Waiting for completion of background operations
    INFO: Completed background operations
    INFO: Validating state <performChecks>
    INFO: Using default Validator configured in the Action class oracle.install.ivw.db.action.PrereqAction
    INFO: Adding ExitStatus PREREQUISITES_NOT_MET to the exit status set
    SEVERE: [FATAL] [INS-13013] Target environment do not meet some mandatory requirements.
    CAUSE: Some of the mandatory prerequisites are not met. See logs for details. C:\Oracle\Inventory\logs\installActions2011-05-19_12-58-13PM.log
    ACTION: Identify the list of failed prerequisite checks from the log: C:\Oracle\Inventory\logs\installActions2011-05-19_12-58-13PM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.
    INFO: Advice is ABORT
    INFO: Adding ExitStatus INVALID_USER_INPUT to the exit status set
    The questions:
    1. Why the requirement checks give different results when installation is invoked from CMD and from InstallShield?
    2. Why the requirement checks are done despite the parameters "-ignoreSysPrereqs" and "use_prereq_checker=false"?
    3. What should I do to get the installation pass (either remove the check or make it satisfying)?
    PS. The 32 bit Oracle Server installation on Windows 2003 works without problem when invoked from InstallShield.

    Please use 2008R2 if you want to install 11gR2 versionThank you for that update. Possibly it will help me to solve another trouble.
    Regarding the problem I described, the issue is that I install Oracle Client 32 bit prior to trying to install Oracle Servier 64 bit.
    The Oracle Client setup had started RemoteExecService.exe 32 bit process. And the process remained running after the installation completed.
    The Oracle Server setup utilizes the running RemoteExecService.exe process. Since the process is 32 bit, the architecture requirement check had failed.
    I've added to my script killing the process
    taskkill /F /IM RemoteExecService.exe
    before invoking the Oracle Server installation.
    That way the Oracle Server setup starts another RemoteExecService.exe process and the new process is 64 bit.
    The architecture requirement succeed.

  • Unit test runs perfectly fine with NUnit but fails when run from TestExplorer

    Hello all,
    I have a TestProject, Harmony.Tests. In there, I have a method AddApplicationEvent()
    which calls another method Send(InvokeRequestMessage requestMessage) which calls a webservice (OperationHandlerBrokerWebService). 
    The code snippet looks like this. This is not the complete code but a part where we are calling the web service. It fails on the underlined Italic line of code.
    OperationHandlerBrokerWebService brokerService = new OperationHandlerBrokerWebService();
    brokerService.UseDefaultCredentials = true;
    brokerService.Url = address;
    brokerService.Timeout = timeoutInMilliseconds;
    byte[] serializedResponseMessage = brokerService.InvokeOperationHandler(serializedRequestMessage);
    The same test works and passed fine when I ran it with NUnit, but failed with following exception when I tried to run it from TestExplorer. 
    Test Name: AddApplicationEvent
    Test FullName: N4S.Harmony.Tests.CaseManagement.HarmonyFacadeTests.AddApplicationEvent
    Test Source: d:\TFS\TMW\Dev\TMWOnline\Harmony\N4S.Harmony.Tests\CaseManagement\HarmonyFacadeTests.cs : line 665
    Test Outcome: Failed
    Test Duration: 0:00:00.296
    Result Message:
    SetUp : Message returned System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentException: Invalid token for impersonation - it cannot be duplicated.
    at System.Security.Principal.WindowsIdentity.CreateFromToken(IntPtr userToken)
    at System.Security.Principal.WindowsIdentity..ctor(SerializationInfo info)
    at System.Security.Principal.WindowsIdentity..ctor(SerializationInfo info, StreamingContext context)
    --- End of inner exception stack trace ---
    at System.RuntimeMethodHandle._SerializationInvoke(Object target, SignatureStruct& declaringTypeSig, SerializationInfo info, StreamingContext context)
    at System.Reflection.RuntimeConstructorInfo.SerializationInvoke(Object target, SerializationInfo info, StreamingContext context)
    at System.Runtime.Serialization.ObjectManager.CompleteISerializableObject(Object obj, SerializationInfo info, StreamingContext context)
    at System.Runtime.Serialization.ObjectManager.FixupSpecialObject(ObjectHolder holder)
    at System.Runtime.Serialization.ObjectManager.DoFixups()
    at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
    at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
    at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream)
    at N4S.Forms.OperationHandlerBroker.AMessage.DeserializeMessage(Byte[] serializedMessage)
    at N4S.Forms.OperationHandlerBroker.WebServiceServer.BrokerService.InvokeOperationHandler(Byte[] serializedInvokeRequestMessage)
    --- End of inner exception stack trace ---
    expected: <0>
    but was: <1>
    Result StackTrace:
    at N4S.Harmony.Tests.TestHelper.InvokeOperation(OperationHandler handler, OperationHandlerInput input, Boolean expectedToWork) in d:\TFS\TMW\Dev\TMWOnline\Harmony\N4S.Harmony.Tests\TestHelper.cs:line 136
    at N4S.Harmony.Tests.TestHelper.LoginAsUser(String username, String password) in d:\TFS\TMW\Dev\TMWOnline\Harmony\N4S.Harmony.Tests\TestHelper.cs:line 394
    at N4S.Harmony.Tests.TestHelper.Login(TestUserName requestedUser) in d:\TFS\TMW\Dev\TMWOnline\Harmony\N4S.Harmony.Tests\TestHelper.cs:line 377
    at N4S.Harmony.Tests.TestHelper.LoginAsAdvisor() in d:\TFS\TMW\Dev\TMWOnline\Harmony\N4S.Harmony.Tests\TestHelper.cs:line 230
    at N4S.Harmony.Tests.CaseManagement.HarmonyFacadeTests.Login() in d:\TFS\TMW\Dev\TMWOnline\Harmony\N4S.Harmony.Tests\CaseManagement\HarmonyFacadeTests.cs:line 76
    at N4S.Harmony.Tests.CaseManagement.HarmonyFacadeTests.SetupTest() in d:\TFS\TMW\Dev\TMWOnline\Harmony\N4S.Harmony.Tests\CaseManagement\HarmonyFacadeTests.cs:line 67
    I am not sure what causing the issue. I checked the Credentials, Windows Identity during both the test run and there is no difference. Please advise !!
    Thanks,
    Deepak

    Hi Tina,
    Thanks for your reply. 
    I do have NUnit adapter installed. I even noticed that the test runs fine with NUnit GUI and also if I run it through Resharper Test Explorer window. 
    As you can see in the image above the same test is passed when I ran it from Resharper Unit Test Explorer window but fails when I ran it from Test Explorer window. I also captured the information on fiddler. 
    There was a significant difference in the Header Content length. Also under the User-Agent property the protocol versions are different. 
    Not sure why VSTest ExecutionEngine is picking a different version.
    The UnitTest in question is calling a webservice method which in turn calls a method from another referenced project. 
    Web Service class
    using System;
    using System.Web.Services;
    using N4S.Forms.OperationHandlerBroker.Server;
    using NLog;
    namespace N4S.Forms.OperationHandlerBroker.WebServiceServer
    /// <summary>
    /// The operaton-handler broker service.
    /// </summary>
    [WebService(Description = "The N4S Forms Operation-Handler Broker Web-Service.", Name = "OperationHandlerBrokerWebService",
    Namespace = "N4S.Forms.OperationHandlerBroker.WebServiceServer")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    public class BrokerService : WebService
    { /// <summary>
    /// Calls <see cref="HandleRequest"/>. Updates performance-counters.
    /// </summary>
    /// <param name="serializedInvokeRequestMessage">the binary-serialized <see cref="InvokeRequestMessage"/></param>
    /// <returns>the binary-serialized response message</returns>
    [WebMethod(BufferResponse = true, CacheDuration = 0, Description = "Invokes the requested operation-handler and returns a binary-serialized response-message.", EnableSession = false)]
    public byte[] InvokeOperationHandler(byte[] serializedInvokeRequestMessage)
    logger.Trace(Strings.TraceMethodEntered);
    PerformanceMonitor.RecordRequestStarted();
    InvokeRequestMessage requestMessage = (InvokeRequestMessage) AMessage.DeserializeMessage(serializedInvokeRequestMessage);
    InvokeResponseMessage responseMessage;
    try
    responseMessage = HandleRequest(requestMessage);
    PerformanceMonitor.RecordSuccessfulRequest();
    catch (Exception)
    PerformanceMonitor.RecordFailedRequest();
    throw;
    finally
    PerformanceMonitor.RecordRequestEnded();
    logger.Trace(Strings.TraceMethodExiting);
    return AMessage.SerializeMessage(responseMessage);
    UnitTest snippet
    OperationHandlerBrokerWebService brokerService = new OperationHandlerBrokerWebService();
    brokerService.UseDefaultCredentials = true;
    byte[] serializedResponseMessage = brokerService.InvokeOperationHandler(serializedRequestMessage);
    Please advise.
    Thanks,
    Deepak

  • Weird Can not access class from outside package problem

    Hi, I have this problem and it seems the error message is very clear what the problem is but I did make the GeneralTestResult class PUBLIC already. What could be wrong? I did search for it but this is too general and didn't find any solution. Anyone can point out the problem? TIA.
    public abstract class GeneralTestResult
      public static int FAILING_THRESHOLE = 25;
      public abstract String getTestName();
      public abstract boolean isPassed();
      public abstract int getLeftEyeResult();
      public abstract int getRightEyeResult();
      public abstract Calendar getTestDate();
    // in a different file
    package VisionSaver.Tests.TestResults;
    import java.util.*;
    public class AcuityORContrastTestResult extends GeneralTestResult
      private String m_testName;
      private int m_leftEyeVision, m_rightEyeVision;
      private Calendar m_testDate;
    // in a different file
    package VisionSaver.Tests;
    import VisionSaver.Tests.TestResults.*;
    public class Acuity extends VirtualKeyboard implements ActionListener, Runnable, WindowListener
    AcuityORContrastTestResult r = new AcuityORContrastTestResult(...);
    }The compiling error is:
    "Acuity.java": GeneralTestResult() in VisionSaver.Tests.TestResults.GeneralTestResult is not defined in a public class or interface; cannot be accessed from outside package at line 529, column 40

    The GeneralTestResult class is a packaged class. Sorry, when I cut and paste, I didn't copy everything. So here is the complete GeneralTestResult file:
    package VisionSaver.Tests.TestResults;
    import java.util.*;
    public abstract class GeneralTestResult
      public static int FAILING_THRESHOLE = 25;
      public abstract String getTestName();
      public abstract boolean isPassed();
      public abstract int getLeftEyeResult();
      public abstract int getRightEyeResult();
      public abstract Calendar getTestDate();
    }From the compiler's message, it seems like the import is OK. It just won't allow me to access non-public class but my classes here are declared public. Any other ideas? TIA

  • Executing another class from another package with a click of a button

    package language;
    textfield_4 = new JTextField();
    getContentPane().add(textfield_4);
    button_10 = new JButton("Open");
        getContentPane().add(button_10);
        button_10.addActionListener(new java.awt.event.ActionListener()
          public void actionPerformed(ActionEvent e)
            String cmd = "notepad.exe";
            String path = textfield_4.getText();
            try
              Runtime.getRuntime().exec(cmd + " \"" + path + "\"");
            catch (IOException ex)
              ex.printStackTrace();
        button_12 = new JButton("Run");
        getContentPane().add(button_12);From the codes above, what i intended to do is when clicking the "Run" button, it will pass the values from textfield_4 to another class in another package thus, executing the class with the value of textfield_4. What are the steps to do that? If possible, please insert sample codes. Thank you.

    import  anyPackage.AnotherClass;
    button_12.addActionListener(new ActionListener() {
      AnotherClass ac = new AnotherClass();
      ac.execute(textfield_4.getText());
    });Is that what you wanted?

  • Opening Excel Workbook Fails when run from Scheduled Task on Windows Server 2008 Rw

    Hi,
    I have a little vbs script that instantiates the Excel.Application object and then opens a work book to perform some tasks on it. The script runs fine when run from the command line. When I attempt to run it as a scheduled task (it is supposed to update
    data that is pulled from a SQL Server at regular intervals), it fails with the following error:
    Microsoft Office Excel cannot access the file 'c:\test\SampleWorkbook.xlsm'. There are several possible reasons: .....
    The file does exist. The path reported in the error is correct. The account under which the task is running is the same account I use to run it from the command line. User Account Control is not enabled, and the task is set up to run with highest privileges.
    When I run the same script through the Task Scheduler from a Windows Server 2003 machine, it works without issue.
    I was just wondering if somebody on this forum has run into a similar issue in connection with Windows Server 2008 R2 and figured out what the magic trick is to make it work. I'm sure it is rights related, but I haven't quite figured out what which rights
    are missing.
    Thanks in advance for any advice you may have.

    This is truly killing me ... trying to get it working on Windows Server 2012 without success.
    I desperately need to automate running Excel macros in a "headless" environment, that is non-interactive, non-GUI, etc.
    I can get it to work using Excel.Application COM, either via VBScript or Powershell, successfully on many other Windows systems  in our environment - Windows Server 2008 R2, Windows 7 (32-bit), etc.,  -BUT-
    The two servers we built out for running our automation process are Windows Server 2012 (SE) - and it just refuses to run on the 2012 servers - it gives the messages below from VBScript and PowerShell, respectively- 
    I have tried uninstalling and re-installing several different versions of Microsoft Excel (2007 Standard, 2010 Standard, 2010 Professional Plus, 32-bit vs. 64-bit, etc.), but it makes no difference.
    Would be extremely grateful if any one out there has had any success in running Excel automation on Server 2012 in a non-interactive environment that they could share.
    ( I have tried adding the "%windir%\syswow64\config\systemprofile\desktop"
    folder, which did fix the issue for me when testing on Windows Server 2008 R2, but sadly did not resolve it on Windows Server 2012 )
    [VBScript error msg]
    Z:\TestExcelMacro.vbs(35, 1) Microsoft Office Excel: Microsoft Office Excel cannot
    access the file 'Z:\TestExcelMacro.xlsm'. There are several possible reasons:
    • The file name or path does not exist.
    • The file is being used by another program.
    • The workbook you are trying to save has the same name as a currently open work
    [Powershell error msg]
    Exception calling "Add" with "0" argument(s): "Microsoft Office Excel cannot open or save any more documents because th
    ere is not enough available memory or disk space.
     To make more memory available, close workbooks or programs you no longer need.
     To free disk space, delete files you no longer need from the disk you are saving to."
        + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
        + FullyQualifiedErrorId : ComMethodTargetInvocation
    You cannot call a method on a null-valued expression.
        + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
        + FullyQualifiedErrorId : InvokeMethodOnNull

  • Importing class from default package of a JAR

    I want to create objects of a class contained in a JAR. The JAR has many classes in numerous packages, however the class that I want to use is in the default package. I'm using eclipse and have added the JAR to the build path, but eclipse complains that the class name cannot be resolved. Is there some way to specify an import statement to look in the default package of a particular JAR? Any advice is appreciated.

    jg2009 wrote:
    I was under the impression that classes without a defined package were technically considered to be part of the so-called default package. But, in answer to your question, yes this class does not appear to part of any package.
    Just to provide so additional information, the class that I want to instantiate is an Applet, so it is designed to be called from an html object tag, and have access to all of the other classes in its JAR. There is a system that provides access to underlying data via the following components: html form <-> javascript <-> applet <-> serverlets <-> data
    I want to automate certain data operations, but the only way to access the underlying data is via the applet. Am I out of luck, or is there some way that I can instantiate the applet?All jverd said is right, assuming it is your code and you can change it: basically move everything to a package. But I think your problem is that the jar is a 3rd party jar and you cannot change it. If this is the case, you can use the 'default package' (the terminology is correct) by having your own class(es) in the default package or by using reflection (last time I tried reflection would work). Both are rather bad solutions, but if you really, really want...
    Note: Java actively discourages the use of the 'default package' and more so recently, this is why I am not even sure that reflection would still work.

  • Crystal Reports 2008 fails when called from e Web Service under 64bit OS

    I have discovered that Crystal Reports 2008 doesn't work when called from a Web Service running under 64bit Windows platforms (in my case Windows 2003 Server and Windows XP 64bit); practically no object is instantiated. I've tried several solutions without success.
    Before creating a wrapper component to use under COM+, is there anybody who has a better and cheaper solution than creating another component to wrap CR 2008 ?

    Hi Sergio,
    Before I mark this post as assumed answered I would just like to say and re-iterate that at this time there is no one answer and we fully understand your concerns. As you know in CR 6.0 it came in 16 and 32 bit versions because at the time 32 bit was relatively new but 16 bit was the norm. This is also true for 32 to 64 bit, 32 is the norm and 64 bit is relatively new. We know and are well aware 64 bit is the future and we are working as quickly as we can to move in that direction. Because of the complexity of the Product it's not simply a matter of re-compiling all of our dll's in 64 bit format. The core of our data connectivity with our database drivers which are dependant on third party clients must also need to support 64 bit modes. This as well as Printer drivers also need to be 64 compatable, there are a multitude of dependencies that we rely on that must add 64 bit support. As a programmer you are well aware of the issues around Thunking back and forth between 32 to 64 bits, it can cause delays and potentially loss of data which is a whole other issue. Not to mention also that we would have to ship both versions potentially doubling the size of the distribution packages or doubling the size of the dll's to have the ability to work in both modes. Relatively speaking of course, it would not be double the size but the variables would need to be able to allocate 32 or 64 memory blocks.
    The other option is to produce 2 separate versions, this alone is a massive project. Any issue would need to be fixed in separate code streams.
    So I'm sure you can see it's not simply a matter of saying yes we support 64 bit. It's a massive project that is going to take time to do and we have to wait for the third party drivers to commit also.
    Visual Studio .NET 2005 and 2008 is the only option if you want true 64 bit but you will be limited on what DB's you can support and export formats you can export to. They are the only drivers we did convert to 64 bit.
    Thank you for your understanding
    Don

  • Instantiating a class from another package

    Hi,
    I have two packages, say "framework" and "impl" -
    framework package (framework.jar)
    - contains base classes
    - contains factories to instantiate concrete classes
    - bundled in <product>.ear
    impl package (impl.jar)
    - contains implementation(concrete) classes
    - compile time dependency on framework.jar
    - bundled in <product>.ear
    I could successfully compiled and build <product>.ear which contains both the jars. The ear gets deployed successfully.
    PROBLEM
    Now, whenever a factory class (part of framework package) tries to instantitate an impl class (part of impl package) using -
    Class.forName(impl.ConcreteClassName OR fully_qualified_concrete_class_name).newInstance();
    It throws "classNotFoundException". It is not able to locate the concrete class.
    So, my question is how can i instantiate a class using its fully qualified name(package.classname) from another package ?
    Thanks.

    909219 wrote:
    PROBLEM
    Now, whenever a factory class (part of framework package) tries to instantitate an impl class (part of impl package) using -
    Class.forName(impl.ConcreteClassName OR fully_qualified_concrete_class_name).newInstance();
    It throws "classNotFoundException". It is not able to locate the concrete class.This sound like a classpath problem. Check your ear's manifest.
    BTW:
    Shouldn't the framework better use ServiceRegistry to load implementations?
    bye
    TPD

Maybe you are looking for

  • Search API for searching Business Objects in SAP R/3

    Hi All, As per my requirement i need to search Business Objects from a third party application by writing some java code. I know only JCO which is useful for to establish a connection from Java to SAP Server and execute the RFC's or BAPI's which are

  • Oracle.xml.xsql.XSQLServlet in Java Web Server 2.0

    Does anyone know how to add the oracle.xml.xsql.XSQLServlet in the Java Web Srever 2.0? When running the helloworld.xsql I am now getting the following error message. "500 Internal Server Error The servlet named oracle.xml.xsql.XSQLServlet at the req

  • 802.1x over ethernet and airport impossible together ??

    I am connected to my University network (and to the internet) through a 802.1x network (Through Ethernet, not Airport). I have an iPod Touch with which I want to connect to the Internet. I went under Sharing, and created a Wireless network sharing th

  • Any Expert in time statement forms?? (PE50)??????

    Hello,          I need to modify a time statement form (ZF00 copied from TF00) in PE50. I need that in my time statement form certain PDC terminal IDs doesn’t appear. That is,in my form I have to restrict the value range of the fields (BTER and ETER)

  • Purchasing Shake now that is isn't supported.....worth it?

    I understand that Shake is no longer officially supported by Apple and hasn't been for some time. I haven't walked into an Apple store in a while but I imagine that its no longer sold there. But doing some searching on ebay, I have found some copies