How  can I start my Java Application using double-click  in Windows XP?

I hava developed an editor in java. The file made by this editor is saved as the .cte format. so, I need to associate this file with the editor, which means that when you double click the .cte file ,this file will be opened in the editor just like the notepad.
I know that Jbuider has used the JNI to achieve this way to open a project. So, will you kindly tell me the details about this technique or give me some document? My E_Mail is [email protected]
Best Regards,
Maria

I think this can be done from a batch file which you can execute when you install your application.
There are two commands which you are interested in, and they are:
assoc - Displays or modifies file extension associations.
ftype - Displays or modifies file types used in file extension associations.
You should use assoc to associate an extension with a file type, and ftype to associate the file type with an application.
E.g. jar is associated with this on my machine:
.jar=jarfile (from assoc)
jarfile="C:\Program Files\Java\jre1.5.0_06\bin\javaw.exe" -jar "%1" %* (from ftype)
Kaj

Similar Messages

  • How can i start my java application using double-click in WindowsXP?

    i hava developed an editor in java. The file made by this editor is saved as the .cte format. so, I need to associate this file with the editor, which means that when you double click the .cte file ,this file will be opened in the editor just like the notepad.
    I know that Jbuider has used the JNI to achieve this way to open a project. So, will you kindly tell me the details about this technique or give me some document? My E_Mail is [email protected]
    Best Regards,
    Maria

    Must you use native code? Can't you do what I said in your other thread?
    http://forum.java.sun.com/thread.jspa?threadID=699476
    Kaj

  • How can i let my java application closes the other opened windows

    how can i let my java application closes the other opened windows: like any other Microsoft Internet Explorer windows ... provided that my java application is not the one i used to open those other windows.... thanks in advance

    you'll have to use JNI to access the windowAPI
    then you need a list of window handles ... I think there was a function called getWindow and in order to close them you use sendMessage .... for details check out msdn (microsoft developer network)
    somwhere I saw a tool called JUtil, which might help you getting started on accessing the win api from java
    regards
    Spieler

  • How can i built a java application using java debug class on Log4J

    Hi,
    As java API support the MethodEntryEvent, using which I can get the automatic logging statements when the method is entered or exited as HelloExample.main(with argument type).
    Where HelloExample is the class name.
    Main is the method entered with its argument types.
    In some cases I have the o/p as
    -- VM Started --
    ====== main ======
    main -- HelloExample
    callerMethod -- HelloExample
    ====== main end ======
    -- The application exited --
    By using Log4J is there any possibility of getting these sort of o/p along with the loggers supported by Log4J. i mean to say can i built an java application which supports the MethodEntryEvent and MethodExitEvent from java API and also uses the Log4J debugging. I took an e.g. trace example, which (in J2SE 1.4.x or 5.x) will be found in $JAVA_HOME/demo/jpda/examples.jar and unpacking it by
    jar -xvf $JAVA_HOME/demo/jpda/examples.jar i found the com/sun/tools/example/trace/Trace.java and passed the class constructed with logger taken from Log4J. In this case the logging message is displayed on the console. As per the requirement i need to transfer the whole o/p to an output file along with Log4J logger statements. in this case i should not give any command in the cosule except compiling and executing the programme. the programm also should able to run without the main() as i need to integrate Log4J with an application and the code must me application server independent. i need the output as i got using MethodEnteryEvent (shown as above) in case of java application built using Log4J.
    Can any one help me in this regard. can any one give me some suggestion or any programme of this sort. All suggestions are welcomed.
    Thanks & Regards,

    hi,
    can someone help me how to implement logging for method entry parameters and
    method exit return value.
    can someone help me how to use log4j and integrate it to the method entry
    logging and method exit logging.
    Here what i need is without writing the log statements for the method entry and
    method exit i need to log it to the file
    along with other log4j debug statements i provide in the file.I should be able
    to configure whether to enable/disable the logging
    for method entry and method exit. In method entry i should be able to log the
    parameters the method take and in method exit
    i should be able to log te return value to the log file, before the method is
    returned to the callee.
    i hope i am clear
    Thanks in advance.

  • How can i launch another java application using Runtime class?

    I created a java process which invokes another java application called Launch as shown below,
    Process p=Runtime.getRuntime().exec("java -classpath=C:\\Program Files\\bin\\nettools\\ui\\updates Launch");
    But it is not working...can any one help me on this?
    Edited by: deepakchandaran on Sep 20, 2007 7:10 AM

    You could search the forum and Google.
    it has been answered before.
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html

  • How to start a java application by double clicking just like windows gui?

    Hi,
    I want to open the user-defined file in my java application. The way is like the notepad in windows:1.double click the file name 2.the file is opened in the java application 3.if this file has opened at the same time ,then the last opened will be read-only.
    Could you tell me how to carry it out ? Thank you
    from Maria

    !!! Please give me a help! i am thirsty for itSo, to get this straight, you have a Java application in a jar. For some reason, you do not execute this directly. Are you aware that you can execute a jar directly without the need to write a C++ exe to do it?
    Anyway, for some reason, instead you have a C++ application which launches the JVM with your jar main class.
    Well, you want to do two things. First of all, on Windows level, you need to associate the file type of your user file with your application. Note that they have to have a specific file extension that you choose. To associate the file type with an executable, you open a windows explorer, go to View, Folder Options, File Types and add an entry for your file type and specify it to open with your application. If you do not know how to do this, google for "windows associate file type with program executable" or something alike.
    Now, if you double-click one of your user files, the associated exe will open, and it will receive the file name as a command line argument. In your C++ application, you will need to pass this argument, a file name, to the Java application where you launch it.

  • How can I run a java-application on starting of Windows 2000

    How can I run a java-application without any user on starting of Windows 2000?
    For example, if the computer is restarted and nobody enter into it yet, my java-application should run anyway.
    How can I do that?

    Hi, you have to put it in a Windows service.
    To do this you have a program, Srvany.exe that allow to insert a .exe or .bat program in a Windows service.
    For example, i develop a program, TomcatGuardian and i put it in a service because i need to run it in a server without Administrator logged in.
    Regards,
    Ivan.

  • Can we run a java application using Runtime.exec()?

    Can we run a java application using Runtime.exec()?
    If yes what should i use "java" or "javaw", and which way?
    r.exec("java","xyz.class");

    The best way to run the java application would be to dynamiically load it within the same JVM. Look thru the class "ClassLoader" and the "Class", "Method" etc...clases.
    The problem with exec is that it starts another JVM and moreover you dont have the interface where you can throw the Output directly.(indirectly it can be done by openong InputStreams bala blah............). I found this convenient. I am attaching part of my code for easy refernce.
    HIH
    ClassLoader cl = null;
    Class c = null;
    Class cArr[] ;
    Method md = null;
    Object mArr[];
    cl = ClassLoader.getSystemClassLoader();
    try{
         c = cl.loadClass(progName.substring(0,progName.indexOf(".class")) );
    } catch(ClassNotFoundException e) {
    System.out.println(e);
         cArr = new Class[1] ;
         try{
         cArr[0] = Class.forName("java.lang.Object");
         } catch(ClassNotFoundException e) {
         System.out.println(e);
         mArr = new Object[1];
         try{
         md = c.getMethod("processPkt", cArr);
         } catch(NoSuchMethodException e) {
         System.out.println(e);
         } catch(SecurityException e) {
         System.out.println(e);
    try {            
    processedPkt = md.invoke( null, mArr) ;
    } catch(IllegalAccessException e) {
              System.out.println(e);
    } catch(IllegalArgumentException e) {
              System.out.println(e);
    }catch(InvocationTargetException e) {
              System.out.println(e);
    }catch(NullPointerException e) {
              System.out.println(e);
    }catch(ExceptionInInitializerError e) {
              System.out.println(e);
    }

  • How can i get a java application

    how can i get a java application on my mac pro?

    I'm not sure I understand the question. If the application is a standalone applet, you download it as you would any other application or file. If the applet is embedded in a web site, just go to the appropriate web page.
    If you can provide more specifics about what it is you are trying to download/accomplish, perhaps we can be of more specific assistance.
    Regards.

  • How can I debug webdynpro java application?

    hi,
    How can I debug webdynpro java application?
    Thanks

    Check this document
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d0cb32c5-36a7-2910-2c9b-ba4a5bbdbb56
    Also check this sdn thread Re: DeBugginng The WebDynPro Application particularly shailesh kumar posting
    /padmanaban
    Edited by: Padmanaban on Sep 26, 2008 1:55 AM

  • My iTunes account has been disabled.  How can I start another iTunes account using same email address

    My iTunes account has been disabled.  How can I start another iTunes account using same email address?

    Why would you start another account?
    This will only cause problems

  • How can I have a single cursor using elements 9 with Windows 7?

    Currently the cursor on my screen is 3 small boxes in place of the single arrow.  I am using Photoshop Elements 9 With Windows 7.  I have loaded the patch files currently in the Adobe system without any success.

    Thank-you that solved the issue.
    In a message dated 4/20/2014 8:57:10 P.M. Eastern Daylight Time, 
    [email protected] writes:
    Re:  How can I have a single cursor using elements 9 with Windows 7? 
    created by Barbara B. (http://forums.adobe.com/people/Barbara+B.)  in 
    Photoshop Elements - View the full  discussion
    (http://forums.adobe.com/message/6315096#6315096)

  • How can I run a Java-Application with a Desktop-Icon ?

    Hello,
    I have got a problem: I want my Java-application directly by clicking on a desktop icon. Is there anybody who can tell me how to do so ? (I don't want to change my application into an exe File !!!).
    It would be nice if you could give me a detailed explanation (or a link to thus) because I'm not used to the Windows-Classpath System (...as far as I need this...I don't know).
    Thank you very much,
    Findus

    Ok...in the syntax just postet I forgot to set the absolute path of the file...but eveb if I do so it does not work...here the variations I tried...
    D:\j2sdk1.4.1_01\bin>java D:\Viever\Gui
    Exception in thread "main" java.lang.NoClassDefFoundError: D:\Viever\Gui
    D:\j2sdk1.4.1_01\bin>java D:/Viewer/Gui
    Exception in thread "main" java.lang.NoClassDefFoundError: D:/Viewer/Gui
    D:\j2sdk1.4.1_01\bin>java D:\Viewer\Gui.class
    Exception in thread "main" java.lang.NoClassDefFoundError: D:\Viewer\Gui/class
    D:\j2sdk1.4.1_01\bin>java D:Viewer/Gui
    Exception in thread "main" java.lang.NoClassDefFoundError: D:Viewer/Gui

  • How can I execute a bash script by double clicking in finder

    Hello!
    How can I execute a bash script using finder? Or better: How can I create an alias, which executes my bash script?
    Thanks Johann

    Add the suffix command in your script name. E.g. Script.command.

  • How can I interface a Java application which is not running under NetDynamics, to use the EJBs in a NetDynamics application?

    One of them uses Enterprise Java Beans implemented with a SUN NetDynamics application server. The other is a straight Java application. Ideally I want the second application to remotely invoke methods on the existing Java beans, so the existing business logic will not be duplicated.
    This would seem to be simple, but NetDynamics appears to substitute some proprietary code for part of the EJB interface, and it is not immediately obvious how to let "foreign" java programs access the beans.
    I would appreciate it if anyone is able to provide any information on how to achieve this. If you know of any sample code that I could look at, that would be a help too. This may (or may not) be known to SUN as a "stand alone java client".

    hi,
    can someone help me how to implement logging for method entry parameters and
    method exit return value.
    can someone help me how to use log4j and integrate it to the method entry
    logging and method exit logging.
    Here what i need is without writing the log statements for the method entry and
    method exit i need to log it to the file
    along with other log4j debug statements i provide in the file.I should be able
    to configure whether to enable/disable the logging
    for method entry and method exit. In method entry i should be able to log the
    parameters the method take and in method exit
    i should be able to log te return value to the log file, before the method is
    returned to the callee.
    i hope i am clear
    Thanks in advance.

Maybe you are looking for

  • What DVD writers will work with Pismo?

    A list would be nice- my original drive just died. Drives that would fit in the expansion bay as well as external Firewire drives. Bonus points for not needing any new software or tweaking. Any successes out there? I didn't find any at accelerateyour

  • FIGL extractor to use in BCS

    I'm in a BCS project and designed to be the BW consultant for the project. I know that there is a base named EC-CS that you can read FIGL datas into a cube in BW to import these data later to a BCS cube. But I heared that there is a new solution that

  • How to add attributes to a DATS type characteristic

    I need to add some attiributes to a 0CALDAY type of characteristic.  I need to be able to do automatic time conversion in my transformations (e.g. from Cal Day to Cal Month or Cal Year).  I also need to have intelligent variable offsets in my queries

  • Alignment Failure

    i just bought a new c6380, right out of the box, have the same problem with alignment failure.  called hp customer service, tells me i have to bring the inks and the printhead to get replaced.  i bought the thing brand new.  they also tell me there i

  • Camera Raw Version in PS elements 13

    What Camera Raw version (not Process Version but e.g.8.3) comes with PS Elements 13?