Program File/Class File

Am trying to get Program File and Class File to
communication. I get this error message:
A file found in a source-path must have the same package
structure as the definitions package “Nproj”.
Any suggestions? I would so appreciate it.
The Class File is in the folder “Nproj’.
Program File:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
layout="absolute">
<mx:Script>
<![CDATA[
import Nproj.Product;
var myProduct = new Product();
myProduct.setDesc("Teddy Bear");
trace(myProduct.getDesc());
]]>
</mx:Script>
</mx:Application>
Class File:
package Nproj
public class Product {
var desc:String;
public function Product() {
public function getDesc():String {
return desc;
public function setDesc(myVar:String):void {
desc = myVar;
Thanks,
BudHud

"BudHud" <[email protected]> wrote in
message
news:g9ndhf$knm$[email protected]..
> Am trying to get Program File and Class File to
communication. I get this
> error message:
>
> A file found in a source-path must have the same package
structure as the
> definitions package ?Nproj?.
People googling on that text quite often wind up on this page
of my blog:
http://flexdiary.blogspot.com/2008/03/importing-packages-in-as3.html
HTH;
Amy

Similar Messages

  • Java.io.File class file

    hi may i know how can i get this java.io.File class file, where can i download it from to use it.

    Nothing..... just a visit from the Deprecation Fairy..... she was a little plastered and removed
    java.io.File by mistake .... :)

  • How to move(migrate) OAF files(class files,PG files) using tool(Kintana)

    Hi,
    How to move(migrate) OAF files(class files,PG files) using tools(Kintana).
    Just want to know process for moving(migrating) OAF Files(class,PG) one instance to over instance(i.e dev to testing) using tools like kintana. We are planning to PVCS as versioning tool.
    Thanks

    New Line Types need to be added to Kintana Workflows and these line types should be able to use the xmlimport/xmlexport scripts.
    We have customized Kintana to migrate forms personalizations using FNDLOAD.
    I think, Change Management team should be able to address this.
    Srini

  • Restart application or reload jar-file(class-files)

    hi,
    i write an update service for my application!everytime a update is available, the new jar-file(my application) will be downloaded and replace the old, running jar-file! now i want to restart my application to use not a mix of old and new class-files in the vm!
    is there any possibility for restarting my java vm or is there another way to "refresh the class-files in the vm"?
    thx mseele

    Hi,
    The easiest way is to terminate the jvm (using System.exit), and just have a loop in the script file that starts your application. In that way your application will be restarted when the jvm exits.
    To write a classloader of your own is another, but a lot harder way.
    /Kaj

  • Cannot acces (a class), bad class file, class file contains wrong class

    Hi,
    I am trying to implement a Java package and I've never done this before. The package is called 'randomX' and I downloaded it from here: http://www.fourmilab.ch/hotbits/source/randomX/randomX.html
    I downloaded the .tar file on my Windows Vista system, unzipped it, and dragged and dropped into(in my case): C:\Program Files\Java\jdk1.6.0_05\src\java\util
    This is also the directory where Random.java is, so I figured it went there, plus the Java Documentation says that, I think.
    The Java Docs are here: http://www.fourmilab.ch/hotbits/source/randomX/doc/
    Thanks in advance,
    Rommel.

    dcminter wrote:
    No. That's not right - you need to put the JAR file into your classpath.
    [http://en.wikipedia.org/wiki/Classpath_(Java)|http://en.wikipedia.org/wiki/Classpath_(Java)]
    If it doesn't come with a JAR file then you'll need to build it first. Sounds like that might be outside your comfort zone.Thanks for the link and the tip. I have no idea what a JAR file is, much less how to build one.
    However, the thing has a "Makefile" file. Can I build the JAR from this?
    #   Makefile for randomX package
    JAVA = /usr/java/jdk1.5.0_06
    CLASSPATH = $(JAVA)/classes:..:.
    SRC = randomX.java randomJava.java randomHotBits.java randomLCG.java \
          randomMCG.java randomLEcuyer.java randomXdemo.java
    CLASS = $(SRC:.java=.class)
    all:     
         javac -classpath ..  *java ; cp -p *class randomX
    test:
         java randomXdemo
    clean:
         rm -f *.bak *.class
         rm -rf doc
         mkdir doc
         rm -rf randomX
         mkdir randomX
    RELEASE = $(SRC) Makefile
    release:
         tar cfvz randomX.tar.gz $(RELEASE)
    html:
         javadoc -classpath $(CLASSPATH) -d doc *.java
    images:
         ( cd $(JAVA)/images ; tar cfv /tmp/ZZimages.tar . )
         rm -rf doc
         mkdir doc
         mkdir doc/images
         (cd doc/images ; tar xfv /tmp/ZZimages.tar )
         rm -f /tmp/ZZimages.tar
         touch randomX.java
    .SUFFIXES:  .java .class

  • How do I make a batch file if the .class file uses a foreign package?

    I am trying to make an MS-DOS batch file using the bytecode file from the Java source file, called AddFields.java. This program uses the package BreezySwing; which is not standard with the JDK. I had to download it seperately. I will come back to this batch file later.
    But first, in order to prove the concept, I created a Java file called Soap.java in JCreator. It is a very simple GUI program that uses the javax.swing package; which does come with the JDK. The JDK is currently stored in the following directory: C:\Program Files\Java\jdk1.6.0_07. I have the PATH environment variable set to the 'bin' folder of the JDK. I believe that it is important that this variable stay this way because C:\Program Files\Java\jdk1.6.0_07\bin is where the file 'java.exe' and 'javac.exe' are stored. Here is my batch file so far for Soap:
    @echo off
    cd \acorn
    set path=C:\Program Files\Java\jdk1.6.0_07\bin
    set classpath=.
    java Soap
    pause
    Before I ran this file, I compiled Soap.java in my IDE and then ran it successfully. Then I moved the .class file to the directory C:\acorn. I put NOTHING ELSE in this folder. then I told the computer where to find the file 'java.exe' which I know is needed for execution of the .class file. I put the above text in Notepad and then saved it as Soap.bat onto my desktop. When I double click on it, the command prompt comes up in a little green box for a few seconds, and then the GUI opens and says "It Works!". Now that I know the concept of batch files, I tried creating another one that used the BreezySwing package.
    After I installed my JDK, I installed BreezySwing and TerminalIO which are two foreign packages that make building code much easier. I downloaded the .zip file from Lambert and Osborne called BreezySwingAndTerminalIO.zip. I extracted the files to the 'bin' folder of my JDK. Once I did this, and set the PATH environment variable to the 'bin' folder of my JDK, all BreezySwing and TerminalIO programs that I made worked. Now I wanted to make a batch file from the program AddFields.java. It is a GUI program that imports two packages, the traditional GUI javax.swing package and the foreign package BreezySwing. The user enters two numbers in two DoubleField objects and then selects one of four buttons; one for each arithmetic operation (add, subtract, multiply, or divide). Then the program displays the solution in a third DoubleField object. This program both compiles and runs successfully in JCreator. So, next I moved the .class file from the MyProjects folder that JCreator uses to C:\acorn. I put nothing else in this folder. The file Soap.class was still in there, but I did not think it would matter. Then I created the batch file:
    @echo off
    cd \acorn
    set path=C:\Program Files\Java\jdk1.6.0_07\bin
    set classpath=.
    java AddFields
    pause
    As you can see, it is exactly the same as the one for Soap. I made this file in Notepad and called it AddFields.bat. Upon double clicking on the file, I got this error message from command prompt:
    Exception in thread "main" java.lang.NoClassDefFoundError: BreezySwing/GBFrame
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
    4)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
    at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    Caused by: java.lang.ClassNotFoundException: BreezySwing.GBFrame
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    ... 12 more
    Press any key to continue . . .
    I know that most of this makes no sense; but that it only means that it cannot find the class BreezySwing or GBFrame (which AddFields extends). Notice, however that it does not give an error for javax.swing. If I change the "set path..." command to anything other than the 'bin' folder of my JDK, I get this error:
    'java' is not recognized as an internal or external command,
    operable program or batch file.
    Press any key to continue . . .
    I know this means that the computer cannot find the file 'java.exe' which I believe holds all of the java.x.y.z style packages (native packages); but not BreezySwing or any other foreign packages. Remember, I do not get this error for any of the native Java packages. I decided to compare the java.x.y.z packages with BreezySwing:
    I see that all of the native packages are not actually visible in the JDK's bin folder. I think that they are all stored in one of the .exe files in there because there are no .class files in the JDK's bin folder.
    However, BreezySwing is different, there is no such file called "BreezySwing.exe"; there are just about 20 .class files all with names like "GBFrame.class", and "GBActionListener.class". As a last effort, I moved all of these .class files directly into the bin folder (they were originally in a seperate folder called BreezySwingAndTerminalIO). This did nothing; even with all of the files in the same folder as java.exe.
    So my question is: What do I need to do to get the BreezySwing package recognized on my computer? Is there possibly a download for a file called "BreezySwing.exe" somewhere that would be similar to "java.exe" and contain all of the BreezySwing packages?

    There is a lot of detail in your posts. I won't properly quote everything you put (too laborious). Instead I'll just put your words inside quotes (").
    "..there are some things about the interface that I do not like."
    Like +what?+ This is not a help desk, and I would appreciate you participating in this discussion by providing details of what it is about the 'interface' of webstart that you 'do not like'. They are probably misunderstandings on your part.
    "Some of the .jar files I made were so dangerously corrupt, that I had to restart my computer before I could delete them."
    Corrupt?! I have never once had the Java tools produce a corrupt Jar. OTOH, the 'cannot delete' problem might relate to the JRE gaining a file lock on the archive at run-time. If the file lock persisted after ending the app., it suggests that the JRE was not properly shut down. This is a bug in the code and should be fixed. Deploying as .class files will only 'hide' the problem (from casual inspection - though the Task Manager should show the orphaned 'java' process).
    "I then turned to batch files for their simple structure and portability (I managed to successfully transport a java.util containing batch file from my computer to another). This was what I did:
    - I created a folder called Task
    - Then I copied three things into this folder: 1. The file "java.exe" from my JDK. 2. The program's .class file (Count.class). and 3. The original batch file.
    - Then I moved the folder from a removable disk to the second computer's C drive (C:\Task).
    - Last, I changed the code in the batch file...:"
    That is the +funniest+ thing I've heard on the forums in the last 72 hours. You say that is easy?! Some points.
    - editing batch files is not scalable to 100+ machines, let alone 10000+.
    - The fact that Java worked on the target machine was because it was +already installed.+ Dragging the 'java.exe' onto a Windows PC which has no Java will not magically make it 'Java enabled'.
    And speaking of Java on the client machine. Webstart has in-built mechanisms to ensure that the end user has the minimum required Java version to run the app. - we can also use the [deployJava.js|http://java.sun.com/javase/6/docs/technotes/guides/jweb/deployment_advice.html#deplToolkit] on the original web page, to check for minimum Java before it puts the link to download/install the app. - if the user does not have the required Java, the script should guide them through installing it.
    Those nice features in deployJava.js are available to applets and apps. launched using webstart, but they are not available for (plain) Jar's or loose class files. So if 'ensuring the user has Java' is one of the requirements for your launch, you are barking up the wrong tree by deploying loose class files.
    Note also that if you abandon webstart, but have your app. set up to work from a Jar, the installation process would be similar to above (though it would not need a .bat file, or editing it). This basic strategy is one way that I provide [Appleteer (as a downloadable ZIP archive)|http://pscode.org/appleteer/#download]. Though I side-step your part 1 by putting the stuff into a Jar with the path Appleteer/ - when the user expands the ZIP, the parts of the app. are already in the Appleteer directory.
    Appleteer is also provided as a webstart launched application (and as an applet). Either of those are 'easier' to use than the downloadable ZIP, but I thought I would provide it in case the end user wants to save it to disk and transport the app. to a machine with no internet connection, but with Java (why they would be testing applets on a PC with no internet connection, I am not sure - but the option is there).
    "I know that .jar and .exe files are out because I always get errors and I do not like their interfaces. "
    What on earth are you talking about? Once the app. is on-screen, the end user would not be able to distinguish between
    1) A Jar launched using a manifest.
    2) A Jar launched using webstart.
    3) Loose class files.
    Your fixation on .bat files sounds much like the adage that 'If the only tool you have is a hammer, every job starts to look like a nail'.
    Get over them, will you? +Using .bat files is not a practical way to provide a Java app. to the end user+ (and launching an app. from a .bat looks quite crappy and 'second hand' to +this+ user).
    Edit 1:
    The instructions for running Appleteer as a Jar are further up the page, in the [Running Appleteer: Application|http://pscode.org/appleteer/#application] section.
    Edited by: AndrewThompson64 on May 19, 2009 12:06 PM

  • Maven problem: class file not added in excecutable after compilation

    Hi,
    I ran into the following issue.
    I created a program, capable of reading an identity card from an electronic card reader. I use maven for dependency management and compilation.
    The libraries used for reading the card reader are not from any maven repository. So I cheated a little bit and added the jar file to the repository myself
    and created a pom file for it too in the repository. I respected the structure groupId - artifactId - version . It is something like
              <dependency>
                   <groupId>be.belgium.eid</groupId>
                   <artifactId>beid35JavaWrapper-win</artifactId>
                   <version>3.5</version>
                   <type>jar</type>
              </dependency>
    The jar file and a pom file are then to be found on that location. When running the program in my development environment, everything runs fine.
    But when I create an executable for this program, the class files for these libs are not added to the created executable.
    questions:
    1/ Do I also need to create the .sha1 file for this. If so: how?
    2/ What are these .sha1 files
    3/ Has anyone written a similar program, but with eid libs from maven? Which ones?
    thanks for any help
    Edited by: user8276126 on Apr 2, 2011 9:07 AM

    try clearing cache and restarting tomcat. If you post the code that you are using to call the methods it will help to find the issue.

  • Error in reading .class files

    What kind of program opens .class files?
    i'm new to java technology and am very confused with all these.
    Can someone please help?
    .class files ...
    i think its got something to do with JVM
    please send me instructions on how to run .class files
    thanks

    You need java.exe from the JRE or J2SDK. You can find the download links on the front page of http://java.sun.com. At its simplest, if your class file is called MyProgram.class, you would run it with the command "java MyProgram".

  • Urgent help needed with class file platform transfer

    Hi,
    I am working at home on Java in the windows (2000) system. Now I have compiled a java source code which compiles fine. This is an applet and works fine.
    However, when I am uploading the files( class files generated and the html file) to the Sun Unix system, the applet does not work. My first question is: Does this class file generated in Windows system not transferable in the Unix system?
    At this point, I uploaded the java source file to the Unix system. The source file has been created in Textpad in the Windows environment. Now using telnet I used the javac command to compile the source file in Unix system. Now, I am seeing three errors which was not the case in the Windows environment? I have no idea why the same source code is working on one platform and producing error in another?
    Any help is highly appreciated. Thanks. Regards.

    What are the errors?

  • How can i run a program outside of Forte? (Forte and java/class files)

    im making a program with forte... and i have a bunch of class files, i form file and a java file... how can i put these in one file so poeple without forte can run it...
    thanks

    jmburns wrote:
    I am trying to do a silent install of a program I built using LabVIEW 8.5.  I also need to call an exe after the installation, so I am using the "run executable after installation" option on the Advanced tab of the installer.  I then pass the following command lines to the setup.exe:
    /qb /acceptlicenses yes /r
    This installs the LabVIEW program successfully, but does not then run the additional exe afterward.  If I run the setup.exe normally (with no command line parameters), the additional exe gets run.
    Thanks,
    Jason
    This problem is fixed in a future release of LabVIEW. Here's the CAR ID 67549 for tracking purposes.
    Message Edited by Bob P on 07-10-2008 09:10 AM

  • Java Concurrent Program .class file location

    Hi frnds,
    I need to know the .class file location of a java concurrent prog. I know the filename from concurrent program executables and my concurrent program filepath is oracle.apps.xxogl.f04.cp.file. But I dont know where the exact location of the file is. pls help me.
    I searched for the same and found the following article in many places which doesnt seem to help me much.
    http://geektalkin.blogspot.com/2008/03/oracle-apps-java-concurrent-program.html
    pls help. thanks in advance.
    Lisan

    Hi;
    pls file can be found like
    /apps_st/appl/bom/12.0.0/patch/115/sql/
    Contains SQL*Plus scripts used to upgrade data, and .pkh, .pkb, and .pls scripts to create PL /SQL stored procedures.
    Regard
    Helios

  • .class file location of a java concurrent program

    Hi frnds,
    I need to know the .class file location of a java concurrent prog. I know the filename from concurrent program executables and my concurrent program filepath is oracle.apps.xxogl.f04.cp.file. But I dont know where the exact location of the file is. pls help me.
    I searched for the same and found the following article in many places which doesnt seem to help me much.
    http://geektalkin.blogspot.com/2008/03/oracle-apps-java-concurrent-program.html
    pls help. thanks in advance.
    Lisan

    Hi Lisan,
    Which version are you using? Folder strucure differs for 11i and R12 versions.
    All the class files will be placed under the JAVA_TOP folder. From there you have to follow your package structure. Here it is oracle/apps/xxogl/f04/cp/file
    HTH,
    Syed.

  • Generation .class file  for Java Concurrent Program

    Hi
    Below if my sample java concurrent program code and registered concurrent program
    package oracle.apps.sample;
    import oracle.apps.fnd.cp.request.*;
    public class Hello implements JavaConcurrentProgram {
    public static final String RCS_ID = "$Header$";
    public void runProgram(CpContext ctx) {
    ctx.getLogFile().writeln("-- Hello World! --", 0);
    ctx.getOutFile().writeln("-- Hello World! --");
    ctx.getReqCompletion().setCompletion(ReqCompletion.NORMAL, "");
    Created a sample directory under $JAVA_TOP: $ mkdir $JAVA_TOPoracle/apps/fnd/cp/sample
    Copied Hello.java into $JAVA_TOP/oracle/apps/fnd/cp/sample and ran below command to compile
    $ cp $HOME/Hello.java $JAVA_TOP/oracle/apps/fnd/cp/sample
    But getting error
    javac: file not found: /oracle/apps/fnd/cp/sample
    Usage: javac <options> <source files>
    use -help for a list of possible options
    Please suggest what was issue and is there any option to generate class file in J developer in local (Windows) instead of doing on application server if yes what are steps to be followed to generate class in windows
    Thanks
    Arjun

    Please post the details of the application release, database version and OS.
    But getting error
    javac: file not found: /oracle/apps/fnd/cp/sample
    Usage: javac <options> <source files>
    use -help for a list of possible optionsHow do you get this error?
    Thanks,
    Hussein

  • Java Programming: Any Ideas for breaking a huge class file into smaller ?

    Hello Java pros,
    I have some very huge class files, some with dozens of methods; each method containing an average of a screen-page full of code.
    Obviously, such huge class files are difficult to maintain inspite of using an IDE, especially when changes have to be made to a bunch of a category of methods scattered all over the class.
    I am wondering if there are ways/best-practices out there to make the core class file smaller/smarter - fr eg.
    <a> by retaining the real core definitions within the core class and moving the detailed implementation outside the core class
    <b> by breaking down the file into more manageable pieces - something to the effect of using 'include' files that some languages support
    etc.
    Thanks for your help in advance.
    Sree Nidhi

    If you have huge class files with dozens of methods, maybe the design of your application is not so sound. You could use all kinds of OO design techniques to design your application so that it is easier to maintain.
    Start by learning about design patterns. The most famous book about design patterns is this one: http://www.amazon.com/exec/obidos/ASIN/0201633612/qid=1029971487/sr=2-1/ref=sr_2_1/102-4299125-5141710
    Here is also a nice book about anti-patterns: http://www.antipatterns.com/
    Jesper

  • NetBeans IDE 4.1 & a class file

    Hello, I use NetBeans IDE 4.1 to write my java programs. I've been assigned to write a program that will prompt the user for an input. To make this easier, my University has written a file called "In.java" so we can easily get any type of input from the user. For example if we want the user to enter his/her name, we would write:
    System.out.println ("Please enter your name: ");
    String name = In.getString(); //allows user to enter a string
    The "In.java" file is supposed to be kept and compiled in the directory I'm working in. I kept it in C:\j2sdk1.4.2_09 and it works fine when I write a program in notepad but not NetBeans IDE. It does not recognize the "In.class" file. Any way to get around this? Thanks in advance.

    NetBeans 4.1 is bundled with J2sdk1.5.0_04. Check your NetBeans classpath and see if it is pointing to the newer sdk.
    If so, it needs to be changed to point to your older SDK...
    ... or, get your In.class file into the current NetBeans classpath...
    ... or read up on, and use the new Scanner class in the new sdk.

Maybe you are looking for

  • Content of email messages is not displayed although all the email messages are listed.  Cannot bring up any of the messages!

    Question:  Has anyone experienced on an IPad 2 this problem?  I receive all emails but on my IPad cannot open any of them.  This was not true a month ago and I have found no way to correct the problem.  Would appreciate any input.

  • Error message: "The iTunes Music Library file is locked" Help?

    I made the stupid mistake of disconnecting my iPod nano when it said "Don't Disconnect". Now when I try to open iTunes, it says that the Music Library file is locked. How am I supposed to unlock it?

  • Two tables columns compare

    Hi Using below sql get the columns discrepncy .I want to display the discprency of columns from two tables in form of flat file using pl/sql. select col1,col2 from A minus select * from B -- Rows in A that are not in B union all select col1,col2 from

  • Modify SIL_GLBalanceFact to populate Balance_Global1_Amt column.

    Hello Everyone, Any help on the following scenario Will be much appreciated! -->We have data coming in from 2 Peoplesoft instances(one with USD currency values and other with CAD currency values) -->Currently we are extracting these values and loadin

  • Jsp and dates

    Hello to everybody. I need help from someone. I have a jsp page which selects some appointments from a database (MS Access is the driver), which belong to one day. So the query is: SELECT appointment.* FROM [day] INNER JOIN appointment ON day.idgiorn