Problems importing/accessing javafx.* packages in JS FXML script

I cannot figure out how to import access javafx.* packages in FXML JS-scripts. Currently trying the following, example code provided below:
FXML
<fx:script source="myscript.js"/>
<HBox fx:id="myBox" onDragDetected="featureDragDetected(event)" />
JS-script (myscript.js)
function featureDragDetected(event) {
  event.getSource().startDragAndDrop(javafx.scene.input.TransferMode.ANY);
I get the following error message:
javax.script.ScriptException: sun.org.mozilla.javascript.internal.EcmaError: ReferenceError: "javafx" is not defined. (<Unknown source>#6) in <Unknown source> at line number 6
  at com.sun.script.javascript.RhinoScriptEngine.eval(Unknown Source)
  at javax.script.AbstractScriptEngine.eval(Unknown Source)
  at javafx.fxml.FXMLLoader$ScriptElement.processStartElement(FXMLLoader.java:1323)
What am I doing wrong?

It works on my system.
MyClass.java
package com.foo.java;
public class MyClass {
    @Override
    public String toString() {
        return "My Class";
MyFXScript.fx
package com.foo.javafx;
import com.foo.java.*;
var myClass = new MyClass();
println(myClass);standard-run:
My Class
browser-run:
jws-run:
midp-run:
run:
BUILD SUCCESSFUL (total time: 3 seconds)

Similar Messages

  • Problem importing packages...

    hello!
    I am learning Java for a while. I have a very strange problem with packages. The problem is the next one:
    When I import the complete package like this:
    import ThePackage.*
    I got the following the next errors:
    main.java:8: cannot resolve symbol
    symbol : constructor Class1 ()
    location: class Class1
    Class1 C1=new Class1();
    ^
    main.java:9: cannot resolve symbol
    symbol : constructor Class2 ()
    location: class Class2
    Class2 C2=new Class2();
    ^
    2 errors
    In order to use this packages, I have to use it this way:
    import ThePackage.Class1;
    import ThePackage.Class2;
    My question is if I have to import every class I am going to use per package? Or why I can�t import using asterisks ('*')
    My other problem is when I use class within the same package, I have to import them too. I have to put the "import ThePackage.*;" in every class within it.
    Thanks,
    Santiago (A Java Newbie)

    You can try to compile with javac -verbose and see what happens. It's because the class you want to compile is not in a package, and you want to import a whole package. But how would the compiler know if you want to use the Class1 and Class2 that is not in a package or those that are in a package?! First it checks if there are those classes which are not in a package. It doesn't find them, but it finds the java source code, so it attempts to use that (which will fail becuase you have package declaration in them). So sudha_mp is right about that you have to remove the source code, then you should be able to compile your code (or the class you want to compile has to be in a package).

  • Can Play iTunes Library from PC on MacBook Air but cannot import, problem with access rights?

    I can play Itunes library from Windows Vista PC on my MacBook Air using homeshare but cannot import the library . Error message is problem with access rights. Latest OS and Itunes installed. Both computers registered with Apple on same Apple ID. Wifi Router turned on and off. Still does not allow importing. Any suggestions please?

    Might be an alternative for you here > iTunes: How to move your music to a new computer

  • Problem in importing ESS Business Package in EP 5.0

    Hi
    I am aiming at importing the ESS 4.6C Business Package which is a zip file into EP 5.0. At the time of import i receive a prompt saying that the files with only the following extensions can be imported into the portal.
    The file extensions that can be imported into the portal:
    CDF, XML, IVU, PCK, IVS, PAG, PGS, ROL, FLD, PIV, TPL.
    Can anyone suggest the method of importing the ESS Package into EP 5.0?
    Thanks in advance
    Regards
    Priya

    Hi
    Check the zip file to see if there is a .pkg file, the pkg file contain definitions on what are the associated files (CDF, XML, IVU, PCK, IVS, PAG, PGS, ROL, FLD, PIV, TPL). Try importing the pkg file (unzip zip).
    Regards
    Pran

  • Problem importing Transport package.

    Hello,
    I am importing WPC web content (Transport package) (http://help.sap.com/saphelp_nw70/helpdata/EN/46/77da3bb8036ef0e10000000a1553f6/frameset.htm ). Transport Package doesn't show up in pending imports after Package upload. I repeated the package upload. Still its not showing under "Pending Imports"
    Anything else has to be done while importing a transport package (wpc web content).
    Thanks
    Tony

    I never had to enter object ID, when I was exporting. The only required property was the name of the package. I was following this document to export WPC Web Content http://help.sap.com/saphelp_nw70/helpdata/EN/46/77da3bb8036ef0e10000000a1553f6/frameset.htm
    When  I exported, the file had a random name d03d399d-c6f6-2b10-12b1-c1a02f8f42c5.zip
    Here is the summary of the logfile:
    Export "<name>Content" (d03d399d-c6f6-2b10-12b1-c1a02f8f42c5) finished with 0 errors after 0 minute(s) 5 second(s)
    Mar 19, 2009 10:20:14 AM     Info     Statistics: 180 items (43 folders, 85 files, 52 links), 7941246 bytes in total
    Mar 19, 2009 10:20:14 AM     Info     ******************************************************************************
    Mar 19, 2009 10:20:14 AM     Info     Generating archive for export "<name> Content" (d03d399d-c6f6-2b10-12b1-c1a02f8f42c5)
    Mar 19, 2009 10:20:15 AM     Info     Archive with 1 parts generated for export "<name> Content" (d03d399d-c6f6-2b10-12b1-c1a02f8f42c5) after 0 minute(s) 1 second(s)
    Should I change the name of the file to "com.<name>..."  ?

  • Problem importing package

    hi,
    i need to import my own package into my project i am building using Jdev11.1.1.0.1 on windows....i tried by File-->Import-->java classes-->package....it is showing the package in left side under application navigator but it is not able to find the classes in package.....i also tried by inserting pkg in Libraries and Classpath option in project properties.......what should be the value of JDEV_USER_HOME....please help

    Hi,
    Did you try adding the jar file contains your packages to the Libraries and Classpath of your Project Properties?
    -Arun

  • Error while importing user created packages

    Hi ,
    Complexity--- Novice
    Problem Description
    I am trying to run a simple package related program.
    The package file is perfectly compiled and stored in the required path.
    When I try to access this package from another file -- the import statement does not seem to be working.
    It reports an error. However If I use the <pacakage>.<classname> it works perfectly fine.
    I have the following files
    1) The package file : Get.java
    2) The package accessing file : Test.java
    ///////////////Get.java/////////////////////
    package get;
    public class Get
         public Get()
         public String iGet()
              return("Hello World!");
    /////////////////////Test.java/////////////////
    import get.*;
    class Test 
         public static void main(String[] args)
              Get g= new Get();     //Here instead I use get.Get g= new get.Get() it works fine
              System.out.println("Hello World!");
    ///////////////////End of Files////////////////
    /////// Compiling/////////////
    c:\packages>dir *.java    //These are the only 2 files in the directory
    10/05/2005  12:02 AM               147 Test.java
    10/04/2005  11:55 PM               125 Get.java
    c:\packages>javac -d . *.java
    .\Get.java:3: duplicate class: get.Get
    public class Get
           ^
    Test.java:7: cannot resolve symbol
    symbol  : constructor Get  ()
    location: class Get
                    Get g= new Get();
                           ^
    2 errorsI think the problem is clearly explained.
    Thanks in advance

    When the file Test.java is compiled all it needs is
    get/Get.class
    There is no need for the file Get.java to be in
    get/Get.javaI agree with these two statements and it is true that using -d will create the Get.class in the correct directory. However, it looks like you might have Get.java in the Classpath and you are using "import get.*;" in Test.java. You may be confusing the compiler because javac will automatically try to compile source code for dependent classes. I think it will work if you change the import to "import get.Get;"

  • Problem while accessing a complex data type

    hi,
    I am getting a problem while accessing a complex data type
    I have a wsdl as:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <definitions name="OutlookReminderService" targetNamespace="http://ws.aftek.com/outlook-reminder" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:ns2="http://ws.aftek.com/outlook-reminder/schemas" xmlns:ns3="http://java.sun.com/jax-rpc-ri/internal" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://ws.aftek.com/outlook-reminder" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    - <types>
    - <schema targetNamespace="http://ws.aftek.com/outlook-reminder/schemas" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://ws.aftek.com/outlook-reminder/schemas" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
    <import namespace="http://java.sun.com/jax-rpc-ri/internal" />
    - <complexType name="TaskVO">
    - <sequence>
    <element name="dueDate" type="long" />
    <element name="percentageComplete" type="int" />
    <element name="priorty" type="int" />
    <element name="reminderDate" type="long" />
    <element name="reminderSet" type="boolean" />
    <element name="startDate" type="long" />
    <element name="status" type="int" />
    <element name="subject" type="string" />
    <element name="taskId" type="string" />
    </sequence>
    </complexType>
    - <complexType name="NoSuchUserException">
    - <sequence>
    <element name="message" type="string" />
    </sequence>
    </complexType>
    - <complexType name="ArrayOfContactVO">
    - <complexContent>
    - <restriction base="soap11-enc:Array">
    <attribute ref="soap11-enc:arrayType" wsdl:arrayType="tns:ContactVO[]" />
    </restriction>
    </complexContent>
    </complexType>
    - <complexType name="ContactVO">
    - <sequence>
    <element name="birthDate" type="long" />
    <element name="companyAddress" type="string" />
    <element name="companyName" type="string" />
    <element name="emailID1" type="string" />
    <element name="emailID2" type="string" />
    <element name="emailID3" type="string" />
    <element name="faxNumber" type="string" />
    <element name="firstName" type="string" />
    <element name="homeAddress" type="string" />
    <element name="lastName" type="string" />
    <element name="middleName" type="string" />
    <element name="mobileNumber" type="string" />
    <element name="phoneNumber" type="string" />
    <element name="workContactNumber" type="string" />
    </sequence>
    </complexType>
    </schema>
    - <schema targetNamespace="http://java.sun.com/jax-rpc-ri/internal" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://java.sun.com/jax-rpc-ri/internal" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
    <import namespace="http://ws.aftek.com/outlook-reminder/schemas" />
    - <complexType name="arrayList">
    - <complexContent>
    - <extension base="tns:list">
    <sequence />
    </extension>
    </complexContent>
    </complexType>
    - <complexType name="list">
    - <complexContent>
    - <extension base="tns:collection">
    <sequence />
    </extension>
    </complexContent>
    </complexType>
    - <complexType name="collection">
    - <complexContent>
    - <restriction base="soap11-enc:Array">
    <attribute ref="soap11-enc:arrayType" wsdl:arrayType="anyType[]" />
    </restriction>
    </complexContent>
    </complexType>
    </schema>
    </types>
    <message name="OutlookServer_addTaskResponse" />
    - <message name="OutlookServer_getListResponse">
    <part name="result" type="ns3:arrayList" />
    </message>
    - <message name="OutlookServer_getContactListResponse">
    <part name="result" type="ns2:ArrayOfContactVO" />
    </message>
    - <message name="NoSuchUserException">
    <part name="NoSuchUserException" type="ns2:NoSuchUserException" />
    </message>
    - <message name="OutlookServer_getContactList">
    <part name="String_1" type="xsd:string" />
    </message>
    - <message name="OutlookServer_getList">
    <part name="String_1" type="xsd:string" />
    </message>
    - <message name="OutlookServer_addTask">
    <part name="String_1" type="xsd:string" />
    <part name="TaskVO_2" type="ns2:TaskVO" />
    </message>
    - <message name="OutlookServer_reminderOccurredResponse">
    <part name="result" type="xsd:boolean" />
    </message>
    - <message name="OutlookServer_reminderOccurred">
    <part name="String_1" type="xsd:string" />
    <part name="TaskVO_2" type="ns2:TaskVO" />
    </message>
    - <portType name="OutlookServer">
    - <operation name="addTask" parameterOrder="String_1 TaskVO_2">
    <input message="tns:OutlookServer_addTask" />
    <output message="tns:OutlookServer_addTaskResponse" />
    <fault message="tns:NoSuchUserException" name="NoSuchUserException" />
    </operation>
    - <operation name="getContactList" parameterOrder="String_1">
    <input message="tns:OutlookServer_getContactList" />
    <output message="tns:OutlookServer_getContactListResponse" />
    <fault message="tns:NoSuchUserException" name="NoSuchUserException" />
    </operation>
    - <operation name="getList" parameterOrder="String_1">
    <input message="tns:OutlookServer_getList" />
    <output message="tns:OutlookServer_getListResponse" />
    <fault message="tns:NoSuchUserException" name="NoSuchUserException" />
    </operation>
    - <operation name="reminderOccurred" parameterOrder="String_1 TaskVO_2">
    <input message="tns:OutlookServer_reminderOccurred" />
    <output message="tns:OutlookServer_reminderOccurredResponse" />
    <fault message="tns:NoSuchUserException" name="NoSuchUserException" />
    </operation>
    </portType>
    - <binding name="OutlookServerBinding" type="tns:OutlookServer">
    <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
    - <operation name="addTask">
    <soap:operation soapAction="" />
    - <input>
    <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://ws.aftek.com/outlook-reminder" use="encoded" />
    </input>
    - <output>
    <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://ws.aftek.com/outlook-reminder" use="encoded" />
    </output>
    - <fault name="NoSuchUserException">
    <soap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" name="NoSuchUserException" namespace="http://ws.aftek.com/outlook-reminder" use="encoded" />
    </fault>
    </operation>
    - <operation name="getContactList">
    <soap:operation soapAction="" />
    - <input>
    <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://ws.aftek.com/outlook-reminder" use="encoded" />
    </input>
    - <output>
    <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://ws.aftek.com/outlook-reminder" use="encoded" />
    </output>
    - <fault name="NoSuchUserException">
    <soap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" name="NoSuchUserException" namespace="http://ws.aftek.com/outlook-reminder" use="encoded" />
    </fault>
    </operation>
    - <operation name="getList">
    <soap:operation soapAction="" />
    - <input>
    <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://ws.aftek.com/outlook-reminder" use="encoded" />
    </input>
    - <output>
    <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://ws.aftek.com/outlook-reminder" use="encoded" />
    </output>
    - <fault name="NoSuchUserException">
    <soap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" name="NoSuchUserException" namespace="http://ws.aftek.com/outlook-reminder" use="encoded" />
    </fault>
    </operation>
    - <operation name="reminderOccurred">
    <soap:operation soapAction="" />
    - <input>
    <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://ws.aftek.com/outlook-reminder" use="encoded" />
    </input>
    - <output>
    <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://ws.aftek.com/outlook-reminder" use="encoded" />
    </output>
    - <fault name="NoSuchUserException">
    <soap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" name="NoSuchUserException" namespace="http://ws.aftek.com/outlook-reminder" use="encoded" />
    </fault>
    </operation>
    </binding>
    - <service name="OutlookReminderService">
    - <port binding="tns:OutlookServerBinding" name="OutlookServerPort">
    <soap:address location="http://truptid:8080/outlook-reminder-service/outlook" />
    </port>
    </service>
    </definitions>
    My client is :
    private static String     BODY_NAMESPACE_VALUE     = "http://ws.abc.com/outlook-reminder";
         private static String     ENCODING_STYLE_PROPERTY     = "javax.xml.rpc.encodingstyle.namespace.uri";
         private static String     NS_XSD                         = "http://www.w3.org/2001/XMLSchema";
         private static String     URI_ENCODING               = "http://schemas.xmlsoap.org/soap/encoding/";     
    try{
    ServiceFactory factory = ServiceFactory.newInstance();
                        Service service = factory.createService(new QName("OutlookReminderService"));
                        QName port =new QName("OutlookReminderService","OutlookServerPort");
                        Call call =service.createCall(port);
                        call.setTargetEndpointAddress("http://localhost:8080/outlook-reminder-service/outlook?wsdl");
                        call.setProperty(Call.SOAPACTION_USE_PROPERTY, new Boolean(true));
                        call.setProperty(Call.SOAPACTION_URI_PROPERTY, "");
                        call.setProperty(ENCODING_STYLE_PROPERTY, URI_ENCODING);
                        call.getReturnType();
                        call.setOperationName(new QName(BODY_NAMESPACE_VALUE, "getList"));
                        QName QNAME_TYPE_STRING = new QName(NS_XSD, "string");
                        call.addParameter("String_1", QNAME_TYPE_STRING, ParameterMode.IN);
                        //http://ws.aftek.com/outlook-reminder/schemas
                        QName QNAME_TYPE_VO = new QName("http://schemas.xmlsoap.org/soap/encoding/", "Array");
                        System.out.println("Before Add Parameter");
                   //     call.addParameter("result", QNAME_TYPE_VO, ParameterMode.OUT);
                        call.setReturnType(QNAME_TYPE_VO,ArrayList.class);
                        System.out.println("After Add Parameter");
                        Object[] params ={oUserVO.getUserName()};
                        oArrayList =(ArrayList)call.invoke(params);
                        System.out.println("After Invoked");
                        //System.out.println("invoked"+ arrayList);          
                   catch(SOAPFaultException faultException)
                        moLogger.debug("SOAPFaultException : ", faultException);
                   catch(RemoteException oremoteException)
                        moLogger.debug("RemoteException", oremoteException);
              catch(ServiceException oServiceException)
                        moLogger.debug("ServiceException", oServiceException);          }          
    Error got is :
    trailing block elements must have an id attribute
         at com.sun.xml.rpc.encoding.SOAPDeserializationContext.deserializeMultiRefObjects(SOAPDeserializationContext.java:81)
         at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:239)
         at com.sun.xml.rpc.client.dii.CallInvokerImpl.doInvoke(CallInvokerImpl.java:103)
         at com.sun.xml.rpc.client.dii.BasicCall.invoke(BasicCall.java:492)
         at com.ail.dhg.poc.business.dao.ContactDAO.getList(ContactDAO.java:255)
         at com.ail.dhg.poc.business.facade.ContactFacade.getList(ContactFacade.java:189)
         at com.ail.dhg.poc.business.AcceptInput.main(AcceptInput.java:72)
    java.lang.NullPointerException
         at com.ail.dhg.poc.business.dao.ContactDAO.getList(ContactDAO.java:277)
         at com.ail.dhg.poc.business.facade.ContactFacade.getList(ContactFacade.java:189)
         at com.ail.dhg.poc.business.AcceptInput.main(AcceptInput.java:72)
    Message was edited by:
    trupti_d

    Use lower case letters for your variable names (name, pwd). The code works then.
    package com.bluenile.bean;
    import java.io.*;
    public class Bean1 implements Serializable
    private String name="Uname";
    private String pwd="Pword";
    public String getName()
    return name;
    public String getPwd()
    return pwd;
    void setName(String name)
    this.name = name;
    void setPwd(String pwd)
    this.pwd = pwd;
    <HTML>
    <BODY BGCOLOR="#FFFFFF">
    <%@ page language="java" contentType="text/html" %>
    <jsp:useBean id="b1" class="com.bluenile.bean.Bean1" />
    <ul>
    <li>Name : <jsp:getProperty name="b1" property="name" />
    <li>Pwd : <jsp:getProperty name="b1" property="pwd" />
    </ul>
    </BODY>
    </HTML>

  • My macbook pro crashed after installing maverick. I lost all my photos however the iPhone iPhoto app still has these photos so how can i access the package contents to recover these photos?

    My macbook pro crashed after installing maverick. I lost all my photos however the iPhone iPhoto app still has these photos so how can i access the package contents to recover these photos?

    We'll need to know more to beable to help. Do you want to try to restore your photos from your iPhone to your Mac, or try to recover the photos from the old iPhoto Library on your Mac?
    What is the situation of your Mac now? In hat way did it crash? A hardware problem with the drive? Does the system not start properly? Does iPhoto not launch? Do you still have the iPhoto Library on your mac or a backup, so we could try to rescue the photos there?
    What versions of iPhoto are on your iPhone and your Mac?
    however the iPhone iPhoto app still has these photos so how can i access the package contents to recover these photos?
    On the iPhone you cannot access the "package contents" - IOS hides the file system from the users. To restore photos from your phone share all iPhoto photos to your Camera Roll, that are not already in the Camera Roll,  and then connect the iPhone via USB and import the Camera Roll to iPhoto or Image Capture. Or use any of the other sharing methods described on thos manual page: see:  Ways to share photos http://help.apple.com/iphoto/iphone/2.0/?handbuch#blnk7d8f763e
    To retrieve photos from a corruptrd iPhoto Library on your Mac we need to know the version number and more about the "crash" you experienced, the state of your mac, the system, the data. Please post back with more details.
    -- Léonie

  • Access default package

    Is it posible to access a class in default package from the some package called
    MyPackage
    if its not possible means why?
    thanx in advance

    why its not allowing to access?, is there practical
    problem to find the current folder while loading the
    classI guess it's to discourage from usage of the default package.
    You can't import the default package. It's not something that would be hard to implement. Classes in the default package were actually accessible in the first versions of Java.
    Kaj

  • I am having problems importing from a DVD or a CD to my Ipod nano via windows 8.  I initially set everything up on a computer with windows 7, and authorized the windows 8 computer as well.  Howevre, the oly thing that comes up on windows 8 is my purchases

    I am having problems importing to my Ipod nano via windows 8.  I usually do this from a windows 7 computer and have had no problems; hoever in windows 8 I can only see items purchased in the Itunes store.  I do not have access to my entire library, which includes song uploaded from CDs and some videos.  As a result, I'm having problems uploading any new items from CDs or DVDs.  The computer with windows 8 is an authorized computer, so I don't understand why I'm having the problem.

        Hello APVzW, we absolutely want the best path to resolution. My apologies for multiple attempts of replacing the device. We'd like to verify the order information and see if we can locate the tracking number. Please send a direct message with the order number so we can dive deeper. Here's steps to send a direct message: http://vz.to/1b8XnPy We look forward to hearing from you soon.
    WiltonA_VZW
    VZW Support
    Follow us on twitter @VZWSupport

  • To access a package, the calling class must reside in the root/parent direc

    My goal was to be able to access my package from anywhere within the
    high level root folder (d:\zJava). But it seems the invoking class MUST
    RESIDE IN THE TOP LEVEL PARENT DIRECTORY of the package. Was Java
    designed to behave this way?
    D:\zJava\zsamples\com\zswingpackage1>     <-- packages successfully compiled here
         swing_optgrp_eg1.{class/java}
              package com.zswingpackage1;
              public class swing_optgrp_eg1 extends JFrame implements ItemListener {
    D:\zJava\zsamples\com> <-- classes residing here could NOT successfully                    access the package 'com.zswingpackage1'. The third                    level subfolder is 'com'.
         package_test4.java
              /* Following import stmt. causing RUN-TIME error "Exception in thread     "main" java.lang.NoClassDefFoundError: com/zswingpackage1/swing_optgrp_eg1". */
              import com.zswingpackage1;
         Package_Test4.class          
         /* Unsuccessful remedies:
         i) D:\zJava\zsamples\com>java Package_Test4
                   -classpath .;d:\zJava\zsamples\com\zswingpackage1
                   -classpath .;d:\zJava\zsamples\com
                   -classpath .;d:\zJava\zsamples (also used in compile)
                   -classpath .;d:\zJava
         ii) ran from the root/parent directory of the package d:\zJava\zsamples),with and without classpath i.e.
              D:\zJava\zsamples>java com\Package_Test4 [-classpath .;d:\zJava\zsamples]
         iii) ran from the top level directory (d:\zJava), with and without classpath i.e.
              D:\zJava>java zsamples\com\Package_Test4 [-classpath .;d:\zJava\zsamples]
         Possible causes:
              - maybe the above behaviours are by design i.e. the calling class/program CANNOT be stored within the package hierarchy?
    D:\zJava\zsamples\net> <-- classes residing here could NOT successfully access the package 'com.zswingpackage1'. The third level subfolder is 'net'.
         package-test6.java
              /* Following import stmt. causing RUN-TIME error "Exception in thread "main" java.lang.NoClassDefFoundError: com/zswingpackage1/swing_optgrp_eg1". */
              import com.zswingpackage1;
         Package_Test6.class
         /* Unsuccessful remedies:
         i) D:\zJava\zsamples\net>java Package_Test6
                   -classpath .;d:\zJava\zsamples\com\zswingpackage1
                   -classpath .;d:\zJava\zsamples\com
                   -classpath .;d:\zJava\zsamples (also used in compile)
                   -classpath .;d:\zJava
         ii) ran from the root/parent directory of the package (d:\zJava\zsamples), with and without classpath i.e.
              D:\zJava\zsamples>java net\Package_Test6 [-classpath .;d:\zJava\zsamples]
         iii) ran from the top level directory (d:\zJava), with and without classpath i.e.
              D:\zJava>java zsamples\net\Package_Test6 [-classpath .;d:\zJava\zsamples]
         Possible causes:
              - maybe the above behaviours are by design i.e. the calling class/program MUST be stored in the parent folder of the package hierarchy?
    **D:\zJava\zsamples>     <-- classes residing here SUCCESSFULLY accessed package 'com.zswingpackage1'. NO -classpath parms. were necessary!
    D:\zJava\ <-- classes residing here could NOT successfully access the package 'com.zswingpackage1'. Similar scenarios as above.
    D:\zJavaB\ <-- classes residing here could NOT successfully access the package 'com.zswingpackage1'. I purposely created another folder with the 'B' suffix. Similar scenarios as above.
    My PC configuration:
         java version "1.4.0_01"
         Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0_01-b03)
         Java HotSpot(TM) Client VM (build 1.4.0_01-b03, mixed mode)
         JRun 4 (Build 47304)
         WinNT 4.0 SP5
         IE 5.50
         CLASSPATH=.;D:\jakarta-tomcat-3.3.1\lib\common\servlet.jar;
              C:\JRun4\servers\default\default-ear\default-war\WEB-INF\classes
         JAVA_HOME=C:\j2sdk1.4.0_01
         Path=C:\j2sdk1.4.0_01\bin;C:\WINNT\system32;C:\WINNT;
              C:\Program Files\Network Associates\PGPNT;C:\Program Files\MTS;d:\MSSQL7\BINN
    Thank you so much for your expertise.

    Hello,
    I think that you use the import-declarations incorrectly.
    Your code says:
    import com.zswingpackage1;
    ... The meaning of the above declaration is the following: Import the class "zswingpackage1" from the package "com". The compiler cannot find that class, but it is probably never asked to find it in your code, so it won't report an error.
    If you want to import the whole package use the following declaration instead:
    import com.zswingpackage1.*;
    ... That means: import all classes from from the package "com.zswingpackage1".
    You can also import just the classes needed, e.g.:
    import com.zswingpackage1.swing_optgrp_eg1;
    ... I hope that does the job.
    S&oslash;ren

  • Having problems importing my .mov file.

    I am having problems importing several .mov files into iMovie. I also can't import .wmv files and I have been utterly confused. I know I have to convert the files but I don't want to pay for a program because I will only be converting 4 files. Please help!

    What is Mpeg Streamclip
    It is a free conversion application that accesses the QT structure and all installed QT components without having to pay the $30 for QT Pro or purchasing GarageBand. It's "engine" is MPEG-based, so it can do some things that QT Pro cannot do ( e.g., retaining audio content when converting multiplexed compression formats). On the other hand, it cannot perform layer operations like QT Pro can so these applications are somewhat complementary.
    and is there anyway you can send me a link to download this program please?
    MPEG Streamclip

  • Import javax.mail package does not exists

    Hi,
    when i tried to compile the source code for email using jdk1.3.1, it compiled fine. but when i tried to compile using jdk1.4.., it had the following errors such as
    import javax.mail package does not exists,
    import javax.mail.internet package does not exists
    package javax.activation does not exist
    Is it because of the jdk version problem???
    Pls help me

    I have the same problem with javax.ejb
    Now i've downloaded and installed the j2ee and set my classpath to the j2ee.jar. I've had to make a new path cause i'm running XP.
    This doesn't work.
    to compile it in Jcreator or JBuilder I can make it work by adding this package (j2ee.jar) in the project settings - required libraries.
    But I have to do this for every project again and again.
    I can make it work but i thougt the classpath would be enough ??
    Bassegio

  • Not  able to access default package classes in own package

    I created a class called Constant.java in default package(no package ).
    I have Connection.java in util package.
    I am trying to use the Constant.java in my Connection.java like below..
    public class Constant
         public static final String NEW = "01";
    package util;
    import Constant;
    public class Connection
    I am unable to compile the class Connection. My question here is Won't I able to access default package in my util package.. ?

    java_guy04 wrote:
    Djaunl , I understand.
    but, Will I able to access default package in my util package.. ? is this correct.No, you won't be able to use classes out of the "default" package.
    Because, AFAIK, if you use a classname that you haven't imported, Java automatically attempts to locate this class in the same package as the current class. It does not check the "default" package (unless that is also the current package), and since the "default" package does not have a package name, you can't import those classes either.

Maybe you are looking for