Create a LinkFile in Windows with JAVA

Hi !
I need a possibility in my java program to make a link file.
The OS is Windows. How can JAVA create a LinkFile ?
My ideas:
- If there is a possibility on the MS-DOS console I would use the Runtime.exec command.
- If the LinkFile is an ASCII-File I woudl write a new file and give the correct content to the file so that it will be handeld as LinkFile.
I think my ideas dont work.
Can you help me ?
Thx Wolfgang

All about Windows Links at
http://www.wotsit.org/search.asp?page=3&s=windows

Similar Messages

  • How to create a pop up window with text information?

    Hi experts,
    I am a newbie in LC and I have created a form to be sent to the vendors by our buyers.  Everything seems fine except the Accounting Manager would like to include our Financial Details in the form.  I would like to simply create a pop up window with the information which will be activated by pressing a button.  I have tried to create an invisible button and a visible button to achieve this but didn't succeed. 
    p.s. I have no javascript background but slowly learning.  I would appreciate if anyone can assist me to complete the task.
    Thanks a million.

    Hi Mdjco,
    Thanks for replying.  What I need to accomplish is to have another page of information with all the financial details on the pop up window and the vendor has a choice to print it out or not.  After the form is filled out, it is to be sent back to our buyers.  So instead of me inserting a 2nd page with the information, I would like to hide it unless someone presses a button to show it.
    I have found something like making 2 buttons, one is invisible with all the information on it and the other one "visible" to activate the invisble button.  Didn't work at all.
    Also another question is after the vendor insert the digital signature, it automatically asked to save (which I found out why from help) and then it opens up the email and sends the form as XML.  I will need it to send as PDF, possible??
    Much appreciated.

  • Can i create an exetutable (.exe) program with java???????

    I would like to learn how i can create an exetutable (.exe) program with java.
    Is there any additional package which i should download or buy it?
    Also i would like to write files into CD's direct from my application.
    Is there any library which i must download or buy?
    Thanks!

    check out the free open source GNU gcj native compiler for Java to see if it will do what you want.
    http://gcc.gnu.org/java/
    for writing data files you could use java.io.BufferedWriter. For sound files, look in the javax.sound package

  • Creating Desktop shortut in Windows from Java

    Does any one have any idea about Creating Desktop shortut in Windows from Java.

    You need to use the COM interface IShellLink (sorry). See the following link for details: http://myfileformats.com/search.php?name=lnk. You could write a native method that encapsulates the calls or possibly use a Java/COM bridge. As an alternative, you could use something like InstallAnywhere. Perhaps you could also have a look at jEdit or another open-source project that creates shortcuts as part of its install (as well as shell extensions).
    Good luck.
    Phil

  • How do I create a new document window with JS

    I would like to create a new window for an open document  modify the duplicate document, export and close leaving the original document in it's original state. Is there a way to do this with Jave script?
    If I were to do this manually I would go to the Window menu and select > New Window. Then I could make the changes I want, export and close without changing the open file.
    How to sript this?
    Thanks,
    GM

    Your right,
    What I really want to do is save a copy : File > Save a Copy and then open the copy.
    The reason I don't like the saveAs() is that your original document is no longer open, so you then have to reopen it. You lose the ability to undo.
    I want to be able to run an export script that modifies the document and exports to photoshop but I want to do this without disrupting my work on the original document. The original document would ideally be left open and unchanged so that I can continue working on it or use the Undo function as needed.
    Is there a way to Save a Copy with script?
    thanks,
    GM

  • How to create dom treeof html page with java

    hi, all
    i met with a problem how to create dom tree of html page wih jave, that is, given a html page, how to create a dom tree of this page with java?
    thanks in advance.
    regards
    richard

    but i m using this code to create node in html file
    HTMLLIElement li = (HTMLLIElement)appHTML.createElement("LI");
    Text txt = appHTML.createTextNode(name);
    li.appendChild(txt);
    appHTML.getElementById("name").appendChild(li);
    this will display all name value which is coming from database,
    and i want to assign a hyperlink to it,
    I have id with name also so I thought that using id i will
    create javascript like
    function popup(id)
         if(id==1)
              var n1 = window.open("../list/name1.html");
         if(id==2)
              var n1 = window.open("../list/name2.html");
    this way i want to popup particular file if i can pass id value in this function
    so want hyperlink like
    name

  • How to create a ms-access table with java?

    hi all
    i've my application and i want to add the capability to creat an access file (.mdb) and then, via SQL , create a table, with many columns of many types, and with a primary key too.
    i know that it's also an SQL problem, but i'm searching for it everywhere
    thanx for your reply
    sandro

    Hi,
    It would have been much better if you had specified your development environment- the database driver class depends on which environment you are working with. Forexample, if you are working with vj++6 you can make use of the com.ms.jdbc.odbc.JdbcOdbcDriver class. If you are using IBM's Visual Age for Java3.5 you can find the sun.jdbc.odbc.JdbcOdbcDriver. Oneway or another you should have the .class for jdbc-odbc(usu they have the form: xxx:jdbc:odbc:JdbcOdbcDriver). Check all the packages that are available in your development environment that have the form xxx.jdbc.odbc.JdbcOdbcDriver.(And not clear what you know and what you don't - so I start from the very elementary steps)
    Anyways, What you have to know is that it is not possible to create databases (e.g. .mdb) directly from a Java application(as far as I know). What is possible is to create new tables inside an already created database and process queries based on those tables.In short what I am saying is : you need to have a DSN before writing applications that create tables.
    Follow the following steps to create DSN(for win2000):
    1)Go to the control panel and click the 'administrative tools'
    2)In the 'administrative tools' click to open ODBC(data sources)
    3)Click the 'add' button and choose 'Microsoft Access driver'
    4)In the DSN text field enter the dsn (e.g., Test)
    5)If you want to create a table in an already existing database choose select and select one. However, if you want to create a new database click 'create' and enter a name for your database(e.g. ExampleDB.mdb). If you do this successfully it will issue a successfull operation message.
    6)Click advanced and enter the login name(e.g. Albert) and password(e.g. mxvdk) for the database
    7)Click 'ok's to finish the operation.
    After the above three operations what you will have is an empty database(with no tables) named "ExampleDB.mdb" in the directory you specified.
    Now, you can write a java application that creates a table inside the database "ExampleDB.mdb".
    Check this out:
    import java.sql.*;
    public class Class1{
    public Class1(){
    String userName = "Albert";
    String password = "mxvdk";
    String dsn = "Test";
    String databaseURL = "jdbc:odbc:"+dsn;
    //This is just an sql table creating statement- have nothing to do with java
    String sqlCreateStmt = "CREATE TABLE StudentTable" +
    "(StudentID varchar(32) PRIMARY KEY," +
    "name varchar(30)," +
    "age int)";
         try{
         Class.forName("com.ms.jdbc.odbc.JdbcOdbcDriver");
         }catch(ClassNotFoundException eCNF){
              System.err.println("ClassNotFoundException:");
              System.err.println(eCNF.getMessage());
         try{
         con = DriverManager.getConnection(databaseURL,userName,password);
         stmt = con.createStatement();
         stmt.executeUpdate(sqlCreateStmt);
         }catch(SQLException e){
    System.err.println("SQLException:");
    e.printStackTrace();
         //insert one sample data
    insertSampleData();
    private void insertSampleData(){
         String sampleStudentID = "scr-342-tch";
         String sampleStudentName = "Tom James";
         int sampleStudentAge = 24;
    //This is just an sql table updating statement- have nothing to do with java
         String sqlUpdateStmt = "INSERT INTO StudentTable VALUES ('"+
                             sampleStudentID+"','"+
                             sampleStudentName+"',"+
                             sampleStudentAge+")";
         try{
              stmt.executeUpdate(sqlUpdateStmt);
              }catch(SQLException e){
              System.err.println("SQLException:");
              e.printStackTrace();
    public static void main(String[] args){
    new Class1();
    private Connection con;
    private Statement stmt;
    //This program runs perfectly in my VJ++6.0 (console application mode) and also in my IBM's
    //visual Age for Java3.5 (with sun.jdbc.odbc.JdbcOdbcDriver as my database driver)
    //If you are developing in another development environment, what you need to change is the
    //"com.ms.jdbc.odbc.JdbcOdbcDriver" in Class.forName("com...") stmt.
    //If you run this program more than once, it will issue 'tableAlreadyExists' message
    If you still experience the problem, pls be specific and repost!

  • Opening a browser window with Java

    Is there a way I can open a Browser Window (with a specific html document) from Java? Thanks.

    Use Runtime.exec(cmd) with the following command:
    Under Windows 9x:
       command.com /C" start "urltofile.html"Under other Windows:
       cmd.exe /C [start] "urltofile.html"  (start is needed when url begins with 'http://")

  • Create a popup help window with javahelp

    hi:
    As the title states, I want to create a popup help window. I know there is
    a short hand, which uses "DisplayHelpFromSource(helpset)" as an action event. Then add this event to listener. I don't use this way, since
    I need to reserve the structure below (which implements actionListener interface). Any idea?
    * When user click the "help" button, "createHelpViewer" will create
    * a user help window & popup.
    public void actionPerformed(ActionEvent e) {
            try {
                MainFrame.getReference().createHelpViewer(javaHelpFrame);
            catch (GeneralException ex) {
                ErrorHandler.errDialog(ex.getDescription(), CommonUtil
                        .getActionName(this), ex);
         * Create java help viewer
        public void createHelpViewer(JInternalFrame javaHelpFrame) throws GeneralException {
            if (javaHelpFrame != null) {
                return;
            String mainHSName = "gui/files/jhelpset.hs";
            HelpSet mainHS = null;
            // Create helpset
            try {
                ClassLoader cl = this.getClass().getClassLoader();
                URL hsURL = CommonUtil.getResourceURL(mainHSName);
                mainHS = new HelpSet(cl, hsURL);
            catch (Exception ex) {
                throw new GeneralException(
                        "Help Set " + mainHSName + " not found",
                        ex);
            // Display javahelp
            // How to display the javahelp?
        }

    Here is a sample of a pop-up window that I did...
    I created a small gallery of some of my Edge animations..
    Use the left and right arrow on your keyboard to navigate through images...
    Click on the image you want to view...
    A large window pops up and you can view the animation...
    Click on the X to close the pop up
    http://www.meschrene.puremadnessproductions.net/Samples/Gallery/Edge-Samples.html

  • Creating Link to New Window with Defined Size and Cursor Change

    Hello,
    I seem to be having a problem having a hot-spot link open a new window and perform the way I want it to. I have tried a few different ways of going about this, as described below:
    The first method when defining the hot spot was to use the properties menu provided at the bottom of Dreamweaver when I click on the hot spot. When I test the page, the cursor changes to a hand and I can open the link in a new window BUT I cannot define the width and height of the new window.
    The second method was after defining the hot spot, using the behaviors menu from the tag inspector. From here, I would add an Open Browser Window behavior using the onClick event. Here, I can open the new window in a pre-defined width and height BUT when I test the page, the cursor does not change to a hand. It just remains the standard arrow.
    The question is, how I can define the hot spot to where the mouse will change to a hand when I scroll over it AND when the window opens, it is set to the width and height I want to define?
    Thanks,
    Smartin1007

    Good Morning Gentlemen,
    I tried placing the cursor script into the code without success. Either I'm not applying it correctly or it could be that the code in use is a combination of html and Java scripting.
    Right now, I converted all of the image maps to the behaviors technique because I need the specific window sizes for the application that is being created. Steve, I am using DW CS4, and a sample of the code is provided below:
    map name="Map"
    area shape="rect" coords="19,466,56,503" alt="Stage Hydrograph - North Fork Licking River at Mt. Olivet, KY" onClick="MM_openBrWindow('StageHydrograph/MtOlivet.html','','width=915,height=665')"
    /map
    Note that there is no href reference, because I haven't found a suitable way of having an href reference with target=_blank to where I can define the new window size.
    I really appreciate the advice and time that is being taken to help solve this problem.

  • Can't create engine: a new feature with Java Plug-in 1.6.0-beta2 ?

    Hi
    We use Java.Help embedded in an applet to check small pieces of text. The whole things works without problems until recently: the full text search does not work anymore when the applet is called with http, it does work when it is called as File in the browser. I suspect the automatic upgrade of JRE 1.6.0-beta2 is related to this.
    I have tried to put
    grant codeBase "http://www.unifr.ch/dokpe/procedures/procall.jar" {
    permission java.security.AllPermission;
    }in my security file but it does not change the problem.
    The url is http://www.unifr.ch/dokpe/procedures/index.htm
    Thanks for any help
    Fran�ois Rappaz
    The complete error stack is
    MergineSearchEngine: params: {engine=com.sun.java.help.search.DefaultSearchEngine, data=_jhs}
    Exception while creating engine named com.sun.java.help.search.DefaultSearchEngine for view: javax.help.SearchView@dfe303
    java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
         at java.lang.reflect.Constructor.newInstance(Unknown Source)
         at javax.help.search.MergingSearchEngine.makeEngine(MergingSearchEngine.java:169)
         at javax.help.search.MergingSearchEngine.<init>(MergingSearchEngine.java:63)
         at javax.help.JHelpSearchNavigator.getSearchEngine(JHelpSearchNavigator.java:102)
         at javax.help.plaf.basic.BasicSearchNavigatorUI$SearchActionListener.actionPerformed(BasicSearchNavigatorUI.java:110)
         at javax.swing.JTextField.fireActionPerformed(Unknown Source)
         at javax.swing.JTextField.postActionEvent(Unknown Source)
         at javax.swing.JTextField$NotifyAction.actionPerformed(Unknown Source)
         at javax.swing.SwingUtilities.notifyAction(Unknown Source)
         at javax.swing.JComponent.processKeyBinding(Unknown Source)
         at javax.swing.JComponent.processKeyBindings(Unknown Source)
         at javax.swing.JComponent.processKeyEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)
         at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
         at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
         at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
         at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    Caused by: java.security.InvalidParameterException
         at com.sun.java.help.search.DefaultSearchEngine.<init>(DefaultSearchEngine.java:75)
         ... 35 more
    MergineSearchEngine: startSearch()

    I have found a thread in another forum with the same problem, I think: http://forum.java.sun.com/thread.jspa?forumID=42&threadID=616794
    One more point: I have remove the Plug-in 1.6.0-beta2 and use now the 1.5.0_06 version: I can use the full text search without problem !
    any idea someone ?
    Fran�ois

  • Creating a WCF MTOM application with Java Client

    Well I am treading into new ground here.  I need to create a WCF that will pull files from a database in an image column and either send them to a Java service that will accept binary data.  We send an XML file to the Server which is running Java. 
    During the processing of the XML the message may indicate that there are files that need to be included (like attachments in email).  So the Java Service (I suppose) would send a request to a .NET WCF service requesting the files.  The service would
    then retrieve the files from the SQL Server (in the image column) and send them to the calling Java application.  I have been looking around the web some and run across MTOM and I suppose this is the best way to send this, but I have a couple of questions:
    1. Do I need to grab the files from the database and stream them to a temp file first, then use MTOM to send the files?
    2. Can I just send the files from the database to the Java client?  The files are read into a byte array and then saved as a binary data type in SQL Server. (Code to create the file below).
    3.  I am coming into this new so examples would be nice, I mean real basic stuff so I can understand how to make this WCF the correct way.  I have no control over the Java Client, I will let them deal with how to configure the data they get.
    Any help is appreciated.
    Code I use to store any file into SQL:
    Dim fs As New FileStream(filePath, FileMode.Open, FileAccess.Read)
    Dim ilen As Integer = CInt(fs.Length)
    Dim bFile(ilen - 1) As Byte
    fs.Read(bFile, 0, ilen)
    fs.Close()

    Hi,
    Welcome to MSDN.
    I would suggest you consider posting this issue in the forum Mr. Monkeyboy suggested.
    In addition, issues about java are not supported in these forums.
    Thanks for your understanding.
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Can i create & use ms-word files with java?

    I am making an application in which I need to write some information into a formatted ms word document. I am familiar with writing into a .txt file, but have no idea how to create / or even add info taken from text fields and insert it into an exixting word file. If anyone has any ideas or code frags I would really appreciate the help. Thanks

    Provided that you are on a Windows machine and that Word is installed, you can manipulate an instance of the MSWord ActiveX control to create documents (that's how we do it). See:
    http://danadler.com/jacob/

  • Create a dll for windows with gcc

    hello!
    I have made a program in 'C' under linux and i want to make it into a dll with gcc to use it in labview under windows.
    Has anyone already done a such thing? so what is the magic option to pass to gcc to make it properly?
    Thank you.

    vincent72 wrote:
    Thank you for your replies. unfortunately, these options don't work on our computer. the keyword 'declspec' wasn't reconnised by our gcc. we also tried the keyword '__attribute ((dllexport))__' but it didn't work anymore.
    I think the standard gcc attribute is more
    something like attribute(export). After all gcc environments typically
    use shared libraries and not DLLs. But then again not every gcc
    compiler will be able to just create proper Win32 executables. As
    explained already, there needs to be quite a lot in the toolchain for
    the intended target.
    For instance the compiler/linker should support COFF library format in
    order to create a valid Win32 executable file unless you have a your
    own format specific Win32 compatible loader that gets linked in and
    understands your library format. Also declspec() is a Microsoft
    specific extension not supported by off the shelf gcc. And gcc has no
    intentions to add anything they consider non-standard, and most
    Microsoft extensions are non-standard.
    MingW does come with a patched gcc, that supports the most important
    things to be able to create valid Win32 executables but most other gcc
    versions don't.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Best way to have a button click create a pop-up window with link URL?

    Hi everyone,
    What is the best way to set a button's click to open a pop-up browser window and take the user to a specific link?
    I did a bit of research and it looks like there are many methods and I'm not sure if the posts were older, but many mention that some of the methods are inconsistent with different browsers + get caught in pop-up blockers...
    Different methods:
    navigationToURL()
    window.open()
    ExternalInterface.call()
    Many thanks,
    DK

    Just to clarify a bit: The observer pattern is not really used for "simple binding". I mean, if your application is really small, I can't say that it would hurt to implement an observer pattern just that it might be more of an overkill ( but not completely an overkill ). If the stuff you are trying to do is really simple then using simple listeners and dispatchers is fine ( even in more complex situations, events come in really handy ).
    So, don't overkill if the application is not aimed to evolve/change and be as flexible as possible. Design patterns are great when they are used correctly and in the correct situation. Just because they solve certain problems well, that doesn't mean that all applications need the complexity and abstraction many patterns bring ( you could build a simple Hello World! app in tons of classes with N patterns but what would be the point? ).
    I hope you understand what I mean. Good luck.

Maybe you are looking for

  • Artist name not appearing in list

    I received a new Ipod Classic 160GB for Christmas. I have transferred some CD's to it and some of the names of the artists are not appearing in the list of names. The albums are there - is there any way to get these to display? Thanks!

  • JSF action before the page is displayed?

    Hi all, What's the best way to execute a backing bean method before the page is rendered? I have to fill out some selectOneMenus on the page with a backing bean method. Will the onload JavaScript function in the <body> tag do this for me? How does on

  • Upgrading to 10.5

    I just bought my fiance an apple as his college grad present. Problem is, it runs 10.3 Panther, and we want to install the 10.5.4 Leopard so that we can run Adobe Creative Suite 4. The computer is an iMac G4 800MHz/512MB/60GB Can I even do this with

  • ITunes 10.5.2 locking up immediately after execution

    Is anyone else experiencing problems with the new 10.5.2 version that was just recently released?  Ever since I loaded it iTunes locks up immediately with the waiting "hourglass" and stays this way continually requiring a hard exit to get out. I have

  • String Limitation

    Hi, Does anybody know if they still have the 4000 char string limitation in ORACLE 11g?? In other words, is it possible to UPDATE a CLOB field and harcode more than 4000 char in the Update script ? Thanks, Marc.