Showing posts with label Relative Path. Show all posts
Showing posts with label Relative Path. Show all posts

Tuesday, November 11, 2008

How to invoke your Dll using relative path

public Form1()
{
InitializeComponent();
Assembly a = Assembly.LoadFile(@"F:\by Ratno\Final Skripsi\UML Studio Project\NeutralNotation\bin\Debug\NeutralNotation.dll");
Module m = a.GetModule("NeutralNotation.dll");
Type typen = null;
foreach (Type t in m.GetTypes())
{
if (t.Name.Trim().Equals("Neutral"))
{
typen = t;
}
}

ConstructorInfo[] ci;
ci = typen.GetConstructors();
d=(AbstractDiagram.IDiagram) ci[0].Invoke(null);
toolStrip1.Items.AddRange(d.GetNotationCollection()); 

}

Read More......

Monday, November 10, 2008

How to Read Working Directory in Java

This posting is tutorial to get working directory from java application. Working directory means a directory where our java application running.



package readworkingdirektory;

import java.io.IOException;

/**
 *
 * @author Ratno Kustiawan
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) throws IOException {
        // TODO code application logic here
        System.out.println(System.getProperty("user.dir"));
        
    }

}

Read More......