Java Interface with Package

Hai,
I cannot run this package with interface.
My interface is interTest.java Under
C:\Test\src\com\jeya
package com.jeya;
public interface interTest {
public void Myname(String n);
My java program is classTest.java under
C:\Test\src\com\jeya
package com.jeya;
public class classTest implements interTest
public void Myname (String n) {
System.out.println(n);
public static void main(String args[])
classTest st=new classTest();
st.Myname("Jeyanthi");
After compiling interface the Class file are stored in
C:\Test\classes\com\jeya\interTest.class
But If I run the classTest.java, It shows the error in "implements interTest" Cannot Resolve Symbol .
So pls help to solve this problem

Hi Jaya,
After you have create the package,
you should run the file from this path, like this,
C:\Test\src>java com.jeya.classTest
regards
Dhinakaran

Similar Messages

  • Java interface with xml communication

    Hello everybody,
    For a project i need to make a java interface with xml communication.
    For example ; from 1 laptop I press on a java button and then i need to get a text message on the other laptop.
    The java interface is already created now the xml code for communication.
    I hope someone can help me how to start with the xml code.
    Are there any templates that i can use?

    I need to use XML for this, cause it is in the
    assignment.As far as communication is concerned, it doesn't matter that you are sending XML. You can send any kind of data. So first find out how to send data, then send data which is XML.
    I only want to know if its possible to send data/text
    from 1 laptop (windowsxp prof) to the other laptop
    (also windows xp prof).Provided the other laptop is running a server that can receive that data.
    Maybe its easier if I send data to a specific IP
    address?Provided there is a server running at that IP address that can receive that data. You can use an IP address to connect to a server but that has nothing to do with sending the data.
    Its important that the communication between 2 system
    is in XML language.XML is not a programming language. XML is a format for storing data. You can certainly send XML-formatted data between two computers.
    So i hope u have a solution for my problem.The solution would be for you to learn how communication between two computers works in the real world. If you have an assignment that says you have to make communication work, surely there was something taught to you before about how to do it?

  • Can java interface with windows to do things

    Good evening
    I am a student and i am trying to do a project and i wanted to ask everyone here before i asked my teacher,
    what i am trying to do is this . create a class that can be run from the desktop that will give me a window of option to do following things
    1) install printer drivers
    2) run a uninstall program
    3) use keys like CTRL ALT SHIFT AND F6 to pop open windows, and is there a way that can have a password entered automatically?
    4) change registry keys
    5) call up reg keys
    6) copy files from one computer ( laptop ) to my lab class over the network onto a specific profile?
    if someone out there can just tell me weather or not Java has the capiablity of interfacing with windows control panel, or any of the above stuff let me know and just give me a push in the right direction Please.
    Derek

    Speaking of Java itself.
    1) install printer driversNo
    2) run a uninstall programNo
    3) use keys like CTRL ALT SHIFT AND F6 to pop open windows, and is there a way that can have a password entered automatically?Depends what you mean but you might be able to do this using the Robot (in the awt package.)
    4) change registry keysNo
    5) call up reg keysNo
    6) copy files from one computer ( laptop ) to my lab class over the network onto a specific profile?Depends on what you mean. Java can be used to send files to other computers. Doing that requires that you understand how the other computer (not your compute) processes are controlled.
    You can of course do all of the above with windows API (not java) calls. And this is the forum about the JNI interface which allows a Java program to access native APIs, like the Windows one. It does however require quite a bit of detail work in a language besides Java, like C or C++. It is going to be easier if you have quite a bit of experience with those. If not then plan on spending a lot of time learning (factor that into how long it will take to do your project.) And of course you would need to research the APIs for all of the above.
    If it matters the registry one is rather easy in terms of the windows API. And you can find many examples of C/C++ code to access it.

  • Question about mapping a JAVA Interface with Flex

    I am using Granite Data Services (Java backend) with my Flex
    client.
    The Java server has an Interface called
    public interface IService {String getServiceName();}
    The flex client makes a remote service call on the server
    POJO which returns any implementation of the specified interface.
    On the flex side I have an interface
    [Bindable]
    [RemoteClass(alias="com.*****.proxy.pojo.IService")]
    public interface IService{function getServiceName():String;}
    As shown i am binding it to the server interface.
    From the client I make a call to the server and handle the
    result as shown below
    var serviceInstance:IService =
    (remoteO.testInterface.lastResult as IService);
    Alert.show("Service Name :
    "+serviceInstance.getServiceName());
    The call reaches the server and the remote method is being
    called however the Alert is not working.
    Please Help !!

    //Start other thread closeT
    System.exit(0)
    //code for thread closeT
    //wait 10 s
    Runtime.getRuntime().halt()
    Gil

  • Java interface with Crystal Reports

    Post Author: [email protected]
    CA Forum: JAVA
    Hello everyone,I need to build a Java interface for JSP to interact with crystal reports.Could anyone recommend any book or forward me the url's where I can find the related material with examples. Eagerly Waiting for reply!Thanks,Prathima.

    Post Author: MJ@BOBJ
    CA Forum: JAVA
    The latest version of the Java Report Component (JRC) is available from the Diamond website.  This download is actually a plugin for Eclipse but you can still use the JRC runtime jars to use the SDK APIs in your JSP page.  You will also find lots of resources such as samples, videos, and forums to help you get started.  You can also refer to the DevLibrary for more information.

  • Unable to add java files with package statement

    Hi all,
    I have the following problem. I add to my project(JBuilder8) a set of java files that
    they have in their headers the statement...
    package jp.gr.java_conf.tame.swing.table;except one with statement...
    package jp.gr.java_conf.tame.swing.colorchooser;If i try to compile the project i get the following message many times for
    each file...
    "AttributiveCellRenderer.java": Error #: 901 : package
    jp.gr.java_conf.tame.swing.table stated in source
    C:\Development\JBProjects\cellspan\AttributiveCellRenderer.java does not
    match directory . at line 4, column 36What i have to do to embed correctly the java files?
    Thank you for advance, kostas.

    Sounds like your source file is in the wrong directory. The directory the file's in has to match the package.

  • Java interface with Microsoft C# or C++ DLLs

    Can anyone provide me with examples or reference to examples where I can access Microsoft DLLs written in C# or C++ from a Java applet or application?
    I know that JNI provides the interface, but I am looking for a real life example of how to use it.
    Thanks.

    JNA is a nice wrapper around JNI and it lets you avoid writing anything other than Java. I posted a nice, short JNA example where I call a function in Kernel32.dll from Java (http://forum.java.sun.com/thread.jspa?threadID=5222886&start=0&tstart=0). The code is towards the bottom of the first page of the post. Good luck.
    - Travis

  • Java interface with PLC (programmable logic controller)

    hi everyone,
    I'm a totally new to java as well as PLC. Pls help me if anyone has any idea to help me.
    I would like to create a road traffic simulator by using java which the simulator can communicate with PLC.
    I will create a crossroad. Each junction will have three colour lights (green, yellow, red).
    The PLC is to control the traffic lights in the simulator while the simulator will output the length of vehicle in each junction.
    How should i do?
    What should i do?
    I'm urgently looking forward for your answers. thank you!

    I'm assuming you are interested in using Java RTS (Sun's implementation of JSR-01) since you posted to this forum.
    Java RTS has more than enough predictability to simulate (and in fact replace in production) any PLC.
    My suggestion is that you use Java RTS for the complete simulation. It's much simpler since the complete logic can be executed in a single JVM no PLC would be required.
    If you need proof that Java RTS is so capable check out these videos.
    http://www.youtube.com/watch?v=xH1yUXd9krU (JavaOne 2007)
    http://www.youtube.com/watch?v=g5Ky2ApC4Y4 (JavaOne 2008)
    You can download Java RTS here
    http://java.sun.com/javase/technologies/realtime/rts/
    Note that for academic work there is no fee to use JavaRTS.
    Please stay in touch and let us know more about your porject. Traffic signaling and control is an area in which I am interested and for which, we believe, Java RTS offers significant advantages.
    Cheers, Greg

  • Java Application interface with MS Excel through DDE

    We have a financial application written in JAVA and have requests from users that want to interface with the application. Meaning, They would like the Java application interface with Excel. For example, if you had a C++ application, you could create a DDE link in Excel that points to the C++ application and receive the data.
    How could I do this with a Java Applictaion ? I was told that there was an application written that lets Java interface with Excel.
    Any ideas or does anyone know ?

    JNI

  • Java Interface Question.

    There are classes in the Java SDK, such as the Interface:
    org.w3c.dom.Document
    that have factory methods in them that carry out actual operations.
    But how can this be possible, because when I program an interface:
    public interface test {
    public void setString(String s);
    It will only compile thus, with no implementation on the method signatures?
    How do Java interfaces with factory methods to this?
    org.w3c.dom.Node is another one. Where does the functionality/method implementation
    come from?

    public interface MyInterface {
         public void method1();
    class MyImplementation implements MyInterface {
         public void method1(){
    public class MyFactory {
         public static MyInterface createMyInterface(){
              return new MyImplementation();
    public class Test{
               public static void main(String args[]){
                      MyInterface x=MyFactory.createMyInterface();
                      x..method1();
    }Now can you understand this? Assume all These classes are separate classes. This is not a problem with inner classes. Before make a reply, try to understand it or post a reply as saying it is not clear rather than posting this kind of post.

  • XI interface with third party using Java API

    Hi All,
    We have the following requirement:
    XI needs to interface with an external third party system which has JAVA API capabilities and the corresponding JAR files available to us.
    I have seen a few threads where it was mentioned that we could call the Java methods directly in User Defined functions:
    Process Integration (PI) & SOA Middleware
    My question: Is this approach feasible in our scenario? Also I guess we do not need to configure any adapter for this Java Method call within the UDF.
    Your help will be greatly appreciated and rewarded.
    Regards,
    Jai.

    Thanks Stefan.
    Our requirement has slightly changed. We have installed a thirdparty application on XI Server (within our network , inside filrewall). The application with Java API Jar file. All it does is a Lookup and retruns a value.
    We are planning to import the Jar file into imported Archives and call the method within a UDF.
    Is this feasible? I am going to give it a try.
    Your expert comments are greatly appreciated.
    Thanks
    Jai

  • Implementing DOM Interface with existing Java classes

    I had planned on using some tree-like Java classes as a Document Object Model, which would give me access to all sorts of XML and DOM tools like parsers and XSLT transformers. Initially, I thought all that would be neccessary is to implement all the DOM Interfaces in org.w3c.dom and then I would have a set of classes that conformed to DOM Level 1. It was my understanding that interfaces such as DOMImplementation and Document would interface with various XML tools, allowing creation of a class that implements Document and then Document would have its various factory methods that know how to create the various DOM nodes such as Element, Attr, Text, NamedNodeMap, NodeList, etc.
    The problem I'm seeing now is that the JAXP specification (which is what the latest Xerces and Xalan tools conform to) has something called a DocumentBuilder and DocumentBuilderFactory that appear to be necessary to tell the framework what type of class to instantiate that implements the Document DOM interface. Those appear to have a lot of methods that deal with parsing of XML documents and I didn't really want to write or even subclass any existing Parsers in order to get the functionality of traversing and transforming a set of classes that implement the DOM interface.
    Am I missing something here? Is it possible to plug in any (set of classes for) DOMImplementation and get them to work with the various DOM and XML tools out there?
    Is there an easier way to allow parts of an application access to internal data structures but have the more generic tools or APIs, such as XSL transformers, access that same set of classes as a DOM with the generic DOM interface methods?
    Can someone provide me with some guidance here? I'm in the process of finalizing some design on a system and need to know if this is possible or if I need to alter my design.
    Thanks.

    If I understand you correctly, I think I am working on a similar issue. I am unhappy with the methods given by the DOM for retrieving data from the XML file and for building a file. Our software has a bunch of code that uses these classes and it is extremely ugly. My solution was to create a facade on top of the DOM model. Essentially I have some simple classes that store all the pertinent info (for me) about the XML structure. Essentially that is the element or attribute name, its values and in the case of the element, it's children. This makes it easier for me to build and retreive the data. What I then built was a loader class and a builder class. The loader takes an XML file and parses it in using the DOM classes and builds a structure using my classes and returns the root element. The builder takes a root element and creates a DOM object out of it. This frees me of having to code around the DOM classes all over the place and makes it simple to upgrade our XML code if the DOM changes or a better DOM is released. I am using factories to facilitate this and allow me to have loaders for specific types of XML documents so that I can have a class for each which further simplifies the XML related tasks of other developers on my team.

  • Is anyone know how to run the examples in 3d user interfaces with java 3d

    hi dear ,
    I am trying to run the examples in 3d user interfaces with java 3d.
    I hope i can load the library in jcreator. but the libarary for this book are classes files , it do not have jar file for it . the jcreator do not read these classes . i do not know why ? i am wonder if there any one run these code before can give me some idear .
    thanks so much .
    the code u can get from this link.
    http://www.manning.com/books/barrilleaux/source
    thank you for u to have a look for me .
    regards
    xiaocui

    <h2>{color:red}CROSS POSTED{color}</h2>
    [t-5289810]
    Cross posting is rude.
    db

  • Interfacing a java program with hardware

    I need to be able to interface a java program
    with data in the parallel or serial ports of the computer.
    I have no idea how to go about this, could someone please help me.
    Thanks

    http://java.sun.com/products/javacomm/

  • Interfacing java application with digital camera

    Dear all,
    I've a question and I need your help.
    I've my swing/javafx application and I need to interface it with a digital camera.
    How should I proceed? How can I understand which digital camera offers support for java integration?
    Do you have some model for me?
    Thanks

    I don't know anything about using Java directly with digital cameras. However I have a few observations. When you say you want to interface Java with a digital camera, do you mean you just want to display the image in a Java application? If so, you can use the software that came with the digital camera to download the images as *.jpeg (or whatever) to the hard disk. Then you can use Java to easily read the files from the hard disk and display them or move them to some other location. For instance, when you display them in Java, then you can then ask the user to fill out various textfields to go along with the image such as giving a title to the image or a description.
    If instead you want to write Java to grab the images from the camera directly, I think that's a bad idea. I imagine different digital cameras have uniquely written custom software to communicate between the digital camera and say, Windows 7 (I'm guessing). I doubt all the manufacturers have agreed upon a common way to communicate. Therefore if you take this route, you will end up creating a large set of Java programs to communicate with each model of camera. A maintenance nightmare.
    However, I have seen applications such as taking passport photos that appear to communicate directly with a digital camera wired to the computer which I imagine the vendor supplied with the application.

Maybe you are looking for

  • Satellite M60-104 Bluetooth - AGAIN

    I have the above machine and I understand BT is not installed. I am really annoyed about this as it was sold as a BT enabled machine. Anyway I am trying to connect the machine to a mobile phone and its not working with a BT USB stick purchased from a

  • Jdev 11.1.2.0.0 AdfJarLibrary AModule as Application Module Instance

    Hi all, My Adf library "MainAdfLib" are added with other sub-libraries as "Application Module Instance" modality. In "MainAdfLib" project i see all datacontrol details , here are all ok, but when i added the project "MainAdfLib" in one of my view-con

  • FCS academic pricing very enticing

    Academic pricing on FCS is offered at the university where I work. I know that it's not upgradable. On the other hand, the full price for FCS is just too steep for the time being. What I'd like to know is when the latest version of the FCS suite was

  • Shutdown of a server in a cluster

              Hi everybody!           Our application is made up of an object cluster with 2 servers (serving EJBs). We           use Bea WLS 5.1 SP9.           When we stop a server (we do this with a delay (lock) ) so that pending operations           

  • CFX_CFX_ error

    I know that the CFX_ tags are custom tags and I should go to the author for support.  But the author hasn't responded to my request for help, and I think it's a CF admin issue, anyway.  I think it's a setting, somewhere. I'm getting a "Cannot process