A simple Q about package, import and classpath

Hi!
Could You help me! Where's the problem?
dir is C:\Omat tiedostot\Pasin Kansio\Et�lukio\eph200,
sub dirs are datat, javat (java-files) and luokat (classes),
file kaanna.bat is
"set classpath=C:\Omat tiedostot\Pasin Kansio\Et�lukio\eph200
del luokat\*.class
c:\jdk1.1.8\bin\javac -d luokat javat\Examiphobia.java"
Examiphobia.java is
"import luokat.*;
class Examiphobia...
new ExamiphobiaFrame(Asetukset[0]);
ExamiphobiaFrame.java is
"import luokat.*;
class ExamiphobiaFrame..."
Thanks /m35Fin

Laitetaanpa nyt kuitenkin enklanniks� jotta muutkin ymmärtää...
The problem is that package structure and directory structures are different things.
You can't import the package "luokat" since there is no package called that. Packages are made with the package declaration: "package packageName;".
So, remove "import luokat.*;". It's not needed.
Instead, modify kaanna.bat:
set classpath="C:\Omat tiedostot\Pasin Kansio\Etälukio\eph200"
del luokat\*.class
REM cd to the real directory and compile
cd javat
c:\jdk1.1.8\bin\javac -d ..\luokat Examiphobia.java
REM cd back to parent
cd ..
I'd also recommend downloading up-to-date SDK, you may need it in the future...

Similar Messages

  • How to go about Setting PATH and CLASSPATH?

    I have problems compling the helloworldwww in the core programming.the error was:
    Exception in thread "main"java.lang.NoSuchMethodError:main
    my java programs are in c:\program files\java\bin
    My path :
    PATH=C:\WINNT\system32;C:\WINNT;c:\program files\java\bin
    My classpath
    set CLASSPATH=C:\WINNT\system32;C:\WINNT;c:\program files\java\bin.jar;.
    is there any error in my paths, if yes how to i go about setting the path and classpath??Im running on winXP.j2sdk1.4.1_02.

    set CLASSPATH=.;c:\program files\java\bin.jar;c:\program files\java\bin

  • Let's all contact Apple about CD imports and burning issues

    While reading through the posts here, it appears that there are alot of us with issues dealing with iTunes and CD imports and CD burning. Even using Quicktime 7.1.3, I still cannot even play a CD track. I can use other applications to import music, but the bottom line is that iTunes should let us import CD tracks. It doesn't. If you are having problems with these slow CD imports, or CD burning with iTunes 7, then we all need to contact Apple. I suggest that instead of trying to find a workaround, lets all get Apple to correct their iTunes application. When you open iTunes, click on iTunes in the toolbar across the top of your monitor and scroll down to the line "Provide iTunes feedback" Fill out the questions and describe exactly what CD import/burning issues that you are having. We will not hear back from Apple individualy, but if we all start letting them know directly that there is an issue, maybe they will get the message and fix these problems. We all appear to be passionate about Apple and iTunes. Lets get these problems resolved. Okay?

    I am having no problems. I did with my Ti667 when the optical drive died.
    I am onto the latest version of iTunes and can report no problems for me.
    Oppp......... my iTS country changes and I changed back and my account is in good order.
    MJ

  • About package name and transport request number

    Hello Gurus,
            I know when doing some changes in the sap bw system, and performing activation subsequently , you are prompted to save the changes into some package and transport request. my question is:
            in the real project, where does those package name and transport request number come from?   make up by myself or provided by project management, or someone else?  if doing by youself, how to make up package name and transport request number ?
    Many thanks.

    package is like a folder in windows.. u create package for a project and than collect all the relevant transports in it.
    to create package u use SE80.. Transport req number are configured by basis team.. its usually source system ID and running serial number...
    package name can be decided by tech architect or by ur team manager..

  • Packages, import and Inheriting with static

    Hello.
    I am programming a program, in which the main class (file: Main.java) uses objects declared in Components.java.
    The problem is, the import of the components only works if I explicitly make the main class inherit from the components class with whose objects being declared as 'static'. A simple import instruction, the way I learned it, in the main class such as 'import <project>.components;' does not work.
    Sample code:
    Current state; working
    Main.java:
    package <project>;
    public class Main extends Components {  
        public static void main(String[] args) {
            start();
    }Components.java:
    package <project>
    public class Components {
        public static void start() {
            // code
    }Desired:
    Main.java
    package <project>;
    import <project>.components;
    public class Main {  
        public static void main(String[] args) {
            start();
    }Components.java:
    package <project>
    public class Components {
        public void start() {
            // code
    }How to realize this idea into a working program?
    Thanks in advance!

    I apologize for not conveying my problem proberly, but you have to know I did not learn Java with reference material in the English language, therefore it might happen that some terms are not translated correctly (by me) and thus not equaling the standardised terms.
    Anyway, let me try to rephrase my problem.
    I want to use the object declared in Components.java in the main class/main methode of the file Main.java. In order to achieve this goal I used inheriting, concretely the main class inherits from the components class, as a makeshift to use Components.java's objects in the main class. However this is not the way I want to accomplish my objective with.
    To make a long story short I just want to utilise Components.java's object in Main.java's main method. The manner to achieve this does not matter, though I want to do it preferably with 'import'.
    Hope this clears things up. Thank you anyway.
    Edited by: Ikaragua on May 31, 2008 6:00 AM
    Solution found.
    package project;
    public class Main {  
        public static void main(String[] args) {
            Components.start();
    }

  • Error regarding package concept and classpath

    Dear All,
    I am just compiling two java classes which is part of struts frame work.
    Register Form.java:
    package app;
    import org.apache.struts.action.*;
    public class RegisterForm extends ActionForm
    protected String username;
    protected String password1;
    protected String password2;
    public String getUsername(){return username;}
    public String getPassword1(){return password1;}
    public String getPassword2(){return password2;}
    public void setUsername(String username){this.username=username;}
    public void setPassword1(String password){this.password1=password;}
    public void setPassword2(String password){this.password2=password;}
    I am compiling this file its compiling and i put this class file in app folder and the i am compiling the second java file.
    package app;
    import org.apache.struts.action.*;
    import javax.servlet.http.*;
    import java.io.*;
    public class RegisterAction extends Action
    public ActionForward perform(ActionMapping mapping,ActionForm form,HttpServletRequest req,HttpServletResponse res)
    RegisterForm rf = (RegisterForm) form;
    String username=rf.getUsername();
    String password1=rf.getPassword1();
    String password2=rf.getPassword2();
    if(password1.equals(password2))
    return mapping.findForward("success");
    else
    return mapping.findForward("failure");
    when i am compiling i got error as
    package app;
    import org.apache.struts.action.*;
    import javax.servlet.http.*;
    import java.io.*;
    public class RegisterAction extends Action
    public ActionForward perform(ActionMapping mapping,ActionForm form,HttpServletRequest req,HttpServletResponse res)
    RegisterForm rf = (RegisterForm) form;
    String username=rf.getUsername();
    String password1=rf.getPassword1();
    String password2=rf.getPassword2();
    if(password1.equals(password2))
    return mapping.findForward("success");
    else
    return mapping.findForward("failure");
    C:\j2sdk1.4.1_04\bin>javac RegisterAction.java
    RegisterAction.java:10: cannot resolve symbol
    symbol : class RegisterForm
    location: class app.RegisterAction
    RegisterForm rf = (RegisterForm) form;
    ^
    RegisterAction.java:10: cannot resolve symbol
    symbol : class RegisterForm
    location: class app.RegisterAction
    RegisterForm rf = (RegisterForm) form;
    no problem in struts jar and servlet jar file i set classpath correctly for this but i cant resolve thsi error.
    can any one help on this issue.
    i need urgently.
    Thanks
    Balaji.A.U.

    i need urgently.Oh. In that case, I'm probably too late. What a bummer.

  • Warning about package deals and what they include for how long!

    I am completely livid with my recent interactions with customer service.  Besides the lack of knowledge and lack of care being obvious, they also seem to forget to disclose important details about the packages you are signing up for.  A few months back I called into customer service to seek a better, less expensive package.  Besides the fact that changing my package created a fiasco of no service for three days and 8 plus hours calling into customer service with each rep telling a different tale, I realized today that my premium channels (HBO and Starz) were missing.  Upon calling the rep told me that those channels were a 3 month promotion! What the F!!! Why didn't the customer service rep tell me this the day I signed up?  The premium channels being included was the reason why I took the 1 year package! I even asked again and again that day and repeated the package details back with a confirmation back from the rep that yes I get those channels!  THANKS A LOT FOR LEAVING OUT THE DETAIL THAT THEY ONLY LASTED 3 MONTHS!!! Worst customer service ever!!!!! 

    Hello boo21,
    I apologize for any inconvenience this has caused you. I have sent you a private message to further assist you.
    You can click on my name (Comcastcares) and click on "Private Message Me”. 
    At the top of each Forum page you will see a small envelope 
    This is the icon for Private Messages, referred to as ‘PM’s’. A Private Message is a way to communicate in private, to another User, Moderator, or Administrator out of public view in the Forums.
    The gray envelope icon will have a number next to it if you have any new messages waiting. 
    To open a PM to read it, double click on the envelope. If you click on the white envelope a window will open with tabs for your Private Message Inbox, Sent Messages, Friends, Ignored Users, and Compose new Message. You can also access this area by clicking on the Username in a Thread or post. By default, Private Messages are enabled. You can disable this feature in My Settings>Preferences> Private Messenger.
    http://forums.xfinity.com/t5/Billing/Price-increas/m-p/2542019

  • A simple question about packaging

    Hello,
    I have a question related to java package.
    I download a java package from web, suppose the jar file is: fghi.jar, includes classes and source files.
    I copy it to c:\temp\ directory, and then uncompress it onto my C:\temp\ directory.
    Then the directory structure is: c:\temp\com\abcd\fghi\swing
    one of the file under c:\temp\com\abcd\fghi\swing directory is Test.java:
    package com.abcd.fghi.swing;
    public class Test {
    public static void main(String[] args){
    I want to run the test program after compiling it
    c:\temp\com\abcd\fghi\swing\java Test
    Then it gives the error message:
    "Exception in thread "main" java.lang.NoClassDefFoundError"
    By the way, I had modified my CLASSPATH variable,
    CLASSPATH=c:\temp\fghi.jar
    My computer OS is windows 2000.
    Can anyone tell me how I can run it successfully?
    Thank you very much!

    If you didn't change anything in the java program, you don't need to compile them. In order to run the Test java program, change current directory to c:\temp and run following command.
    java com.abcd.fghi.swing.Test

  • Simple question about af:panelTabbed and required="true"

    Hello,
    I have a component af:panelTabbed with four tabs:
    In the fourth tab i have an af:inputText with the tag required="true"
    The problem is: The required is only applied if i am at the fourth tab (where the inputText is on).
    If i am at first tab, the form is commited and the required is not applied.
    Any help, please ?
    Victor Jabur

    To complement, here is my jspx and my Managed Bean:
    When i click at cb1 button, the focus would have to go for tab4, but the partial refresh doesn't work. If i use the refreshPage() method posted above, the focus works, but as mentioned, it's not web 2.0 common use.
    JSPX:
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <f:view>
    <af:document id="d1" title="Test Tab Component">
    <af:form id="fm1">
    <af:commandButton id="cb1" text="Execution Action" action="#{myBean.executeAction}" partialSubmit="true"/>
    <af:panelTabbed id="ptab" styleClass="AFStretchWidth">
    <af:showDetailItem id="tab1" text="Tab 1"/>
    <af:showDetailItem id="tab2" text="Tab 2"/>
    <af:showDetailItem id="tab3" text="Tab 3"/>
    <af:showDetailItem id="tab4" text="Tab 4" binding="#{myBean.tab4}" clientComponent="true">
    <af:inputText id="it1" label="Input Text" binding="#{myBean.inputText}" clientComponent="true"/>
    </af:showDetailItem>
    </af:panelTabbed>
    </af:form>
    </af:document>
    </f:view>
    </jsp:root>
    Managed Bean:
    package com.test;
    import javax.faces.application.FacesMessage;
    import javax.faces.context.FacesContext;
    import oracle.adf.view.rich.component.rich.input.RichInputText;
    import oracle.adf.view.rich.component.rich.layout.RichShowDetailItem;
    import oracle.adf.view.rich.context.AdfFacesContext;
    public class MyBean {
    private RichInputText inputText = new RichInputText();
    private RichShowDetailItem tab4 = new RichShowDetailItem();
    public void executeAction(){
    if(this.inputText != null){
    if (this.tab4 != null) {
    FacesContext context = FacesContext.getCurrentInstance();
    FacesMessage facesMsg = new FacesMessage(FacesMessage.SEVERITY_ERROR, "Enter a value", "");
    context.addMessage(this.inputText.getClientId(context), facesMsg);
    this.inputText.setValid(false);
    this.tab4.setDisclosed(true);
    AdfFacesContext.getCurrentInstance().addPartialTarget(this.inputText);
    AdfFacesContext.getCurrentInstance().addPartialTarget(this.tab4);
    //AdfFacesContext.getCurrentInstance().partialUpdateNotify(this.inputText);
    //AdfFacesContext.getCurrentInstance().partialUpdateNotify(this.tab4);
    public void setInputText(RichInputText inputText) {
    this.inputText = inputText;
    public RichInputText getInputText() {
    return inputText;
    public void setTab4(RichShowDetailItem tab4) {
    this.tab4 = tab4;
    public RichShowDetailItem getTab4() {
    return tab4;
    }

  • Please help, simple question about Smart Playlists and Live Updating

    PLEASE for some reason I've never gotten an answer on this.
    I have a Smart Playlist called "Recently Played" with Live Updating. No matter how I set the parameters, the most recently played *song will ALWAYS appear on the bottom of the list when using my iPhone on the go.* I bolded that because I want you to be aware I'm not talking about on iTunes - I'm aware you can change how the list is viewed on iTunes.
    When using your iPod/iPhone on the fly and Live Updating is enabled, is there any way to make the most recently played song appear at the very top???
    Thanks so much

    Haven't seen that problem before but try the following: in iTunes, right-click the playlist name and enable the option "Copy to Play Order." Then sync.
    The normal use of "Copy to Play Order" when you have the playlist displayed in iTunes in some sort order, but you want it to display in the iPod in shuffled order (as it will actually play). Different problem than you are observing, but the same thing "might" help.... Let us know.

  • Simple question about iPhone backups and password

    I can't remember the password to my iPhone-backup in iTunes. But, phew, I haven't lost any data, as I have my iPhone with all data intact. So I deleted the backup in iTunes, and tried to start a fresh backup with a new password. But alas, that doesn't seem to be possible (it backs up, but doesn't ask for a password, and when trying to uncheck encryption I get asked for a password).
    Does this mean iTunes now won't let me back up and retrieve the data I actually have on my very own phone? And does it mean that I now have two options:
    a. Keep on using my iPhone, keeping the data on it, but without the ability to backup and retrieve the backups, or
    b. restore and set up my iPhone as a new device, losing all my data

    If you update you will not be able to go back to a previous iOS version. The iOS is not included in the backup.  The following link gives details of what is included: iTunes: About iOS backups

  • [SOLVED] Question about package updates and ABS

    Hello,
    I have manually compile my kernel in order to apply a patch my laptop needs to suspend. So I use abs and customize the pkgbuild. A few days ago when the update for kernel26-2.6.33.3-2 came out, I thought I'd just refresh abs, rebuild, and then I'd be up to date. But instead now pacman -Syu tells me that there is still an update for the kernel.
    Does building from ABS not get you the latest package update?
    Also, what exactly is the package update compared to a software update? I'm guessing that it is an arch only update to the package but the software itself is the same version. Or am I totally off?
    Thanks for the help!
    Last edited by Fingel (2010-05-12 03:42:38)

    When building via ABS, the package installed gets its version from the PKGBUILD ($pkgver-$pkgrel).  Pacman just looks at available version vs installed version to tell if you should upgrade.
    Your abs tree was probably just not up to date; just because pacman -Syu says your mirror has a package, doesn't mean building via abs _at that moment_ will get that version.
    Be sure to run `abs` to update your tree, then when you're editing the PKGBUILD, check which version it's building.  In some cases, you can simply increment those numbers right in the PKGBUILD before building as source files are often fetched based on those variables, etc. -- but I don't know if I'd recommend that when building something like the kernel.
    Last edited by brisbin33 (2010-05-11 17:08:12)

  • Simple question about environment variables and setting the class path???

    ok I have been trying for a few months now ontrying to set the class path..
    I work with windows vista..
    on the environment variables user variables,
    I have the name of the variable as class
    and the value as C:\Program Files\Java\jdk1.6.0_04\bin;.
    where javac is...
    on the system variables I have
    its name as class
    and the value as C:\Program Files\Java\jdk1.6.0_04\bin;.
    why is this not reading javac

    The PATH environment variable should have as an entry the directory containing your javac executable. The CLASSPATH should have have entries which define your library directories and entries which are your jar file libraries. In the early days, probably the only CLATHPATH entry you will need will be a '.' to indicate the current directory.
    The Java tutorial covers ALL of this.

  • Simple question about table structure and HR in BW

    i need to following data from HR:
    current FTE, employee number, cost place
    i dont think the current FTE is stored per employee. Therefor is would need a list that contains:
    mutation start date, mutation end date, FTE, employee, cost place
    i think cost place is a custom field.
    my question : what tables names and field names do i need?
    Thanks in advanced

    Hi,
    For Head Count you can use 0HR_PA_0 datasource and the other Employee details like start date and end date you can get them from employee master data and FTE can be calculated from the Emloyee Master Data and Head count data.
    Hope this helps...
    Thanks,

  • A simple question about c:out and the ADF bindings

    I have a small problem which I can't figure out :-(
    The solution is probably dead easy, but I don't see it ..
    The problem is :
    I have a jsp-file which have the following tags :
    <c:out value="${bindings.EstimatedInterest}" />
    <c:out value="${bindings.RemainingAmount}" />
    And I want to have one more field which just adds these two together.
    But I get this error :
    Attempt to coerce a value of type "oracle.jbo.uicli.binding.JUCtrlAttrsBinding" to type "java.lang.Long" (null)
    Can anyone pls point me in the right direction ?
    With regards, TA

    Hi Thor,
    try this,
    <c:set var="EstimatedInterest" value="${bindings.EstimatedInterest}"/>
    <c:set var="RemainingAmount" value="${bindings.RemainingAmount}"/>
    <c:out value="${EstimatedInterest+RemainingAmount}" />
    oscar

Maybe you are looking for

  • Unable to insert data in the table

    Hi, I've a document which has a doctype that points to a URL. When I try to insert this document in the table (xmltype column), I am getting the following errors: ORA-31011: XML parsing failed ORA-19202: Error occurred in XML processing LPX-00263: co

  • Converting Macbook Keyboard to be Bilingual in Windows

    Okay, I'll get straight to the point. I'm running a spanish tutoring program on windows using bootcamp on my white macbook. Problem is, I need my keyboard to be bilingual in order to be able to type spanish characters. I followed some instructions fo

  • Alternative window closing

    Hi, I was wondering if it is possible to close a pop up window (pane with a text area) with a key press such as Alt-Enter (or something) similar that does not involve moving the mouse to the top right-hand corner of the pop-up and pressing the X?

  • A suggestion to help the customer

    With so many reps on The board tripping over each other answering the same question 3 times with 3 different answers in many instances, how about opening up the email option again and re-assign some the  reps to handle questions there instead of here

  • Darren's Weekly Nugget 06/08/2009

    One of the little-known features of string controls is the Update Value while Typing option: With this option selected, a Value Change event will fire with the Event Structure any time a character is typed (or deleted) in the string control...this is