Dll for java classes

Hi,
is it possible to create a .dll having some java classes?
thanks.

JNI example
CNI docs
You then do stuff like (in C++):
java::util::Hashtable *ht = new java::util::Hashtable(120);Mmm, Why is JNI soo stinky in comparision. :)

Similar Messages

  • Get the relative path for java class

    How to get Relative path for java class which is inside in web-inf directory in webapps

    ajay.manchu wrote:
    Hi gimbal2,
    My Requirement is i need to run a java class from batch file,when i created batch file in that i need to mention the complete path of the java class,so instead of mentioning that i want to provide only java class name,thats why i asked that one..
    can u help me regarding that....
    Thanks in advanceI wonder how that would work then. Let's take a fictive example. You have a class com.mycompany.myapp.Foo. This would mean that the class is stored in some directory like this:
    c:/webrootdir/myapp/WEB-INF/classes/com/mycompany/myapp/Foo.classTo be able to run such a class from the commandline using Java, you would have to invoke this command:
    java -cp c:/webrootdir/myapp/WEB-INF/classes com.mycompany.myapp.FooHow would knowing the exact path to this class help you?

  • Call Specs for Java Classes

    I have loaded some interdependent java classes in Oracle
    successfully, Not sure about how to write call specs for
    these as one method of class A needs an object of class B as
    input parameter.
    TIA
    PM

    A silly thought just occurred to me. Wouldn't it be
    great to have a dictionary of baby names for java
    classes? I sometimes have a hard time coming up with
    a name for a new class. You know, something other
    r than Foo. Be great if I could just look up some
    suggestions for the kind of thing I'm doing...okay
    back to work.What? I'd rather have a name which is related to what the class does. It doesn't make sense to call e.g. a Date class Jim.
    Kaj - not a class

  • Baby names for Java classes?

    A silly thought just occurred to me. Wouldn't it be great to have a dictionary of baby names for java classes? I sometimes have a hard time coming up with a name for a new class. You know, something other than Foo. Be great if I could just look up some suggestions for the kind of thing I'm doing...okay back to work.

    A silly thought just occurred to me. Wouldn't it be
    great to have a dictionary of baby names for java
    classes? I sometimes have a hard time coming up with
    a name for a new class. You know, something other
    r than Foo. Be great if I could just look up some
    suggestions for the kind of thing I'm doing...okay
    back to work.What? I'd rather have a name which is related to what the class does. It doesn't make sense to call e.g. a Date class Jim.
    Kaj - not a class

  • {@inheritDoc} not working for Java Classes

    Hello,
    i am using {@inheritDoc} for inherting super class's JavaDoc for a perticular function..
    It is working, if super class is my own class. i am able to see all JavaDoc in child class.
    But when i use {@inheritDoc} for extending JavaDoc of java class it is not working.
    i.e. if i am writing {@inheritDoc} in public void actionPerformed(ActionEvent e) method..
    It wont show any javadoc..
    How to add it? Do i need to give source of java classes too???
    And if it is Yes, then where to specifiy. and where to find source of Java classes, do they come with JDK? or NetBeans?? (If yes then where it is in JDK or Netbeans???)
    Thanks,
    Nachiket.

    Yes, you need to have the Java source, with the -sourcepath option, as described here:
    Inheriting Comments from J2SE - Your code can also automatically inherit comments from interfaces and classes in the J2SE. You can do this by unzipping the src.zip file that ships with the SDK (it does not contain all source files, however), and add its path to -sourcepath. When javadoc runs on your code, it will load the doc comments from those source files as needed. For example, if a class in your code implements java.lang.Comparable, the compareTo(Object) method you implement will inherit the doc comment from java.lang.Comparable.
    http://java.sun.com/j2se/javadoc/faq/#incrementalbuild
    If you want the full Java source get it from here:
    http://www.sun.com/software/communitysource/j2se/java2/index.xml
    http://java.sun.com/j2se/javadoc/faq/#sourcecode
    -Doug

  • Dll for java help...

    I 'd like to create a specific dll usable by java and i just have one dll not usable with java.
    i need your help if you know a routine, program .. that create automatically my dll for my java use.

    So im'going to be clear for people of all the world
    I'm working on a project in which i have to communicate with an video acquire board. I must retrieve video signal send by the camera to the video acquire board.
    Video acquire board constructor gives me a dll and a lib with functions but has not anticipated that maybe somebody will use a java program (Bad for me to be polite...)
    My problem is to call the methods of the constructor dll in java .I must use jni to generate a specific dll undertsood by java (dll containing a c and a h file with JNIEXPORT syntax.)
    But the constructor dll is not correctly written by the constructor to be interpreted by java.
    So the dll i must generate has to communicate with constructor dll and there, it is the dark side...
    Can you help me or have i lost you?

  • Looking for java class

    Hi everyone!
    I'm new to java programming and looking for a java class called
    JPlot2D.
    I have a java application that needs this class to run and i'm using netbeans v3.6 to write the programme. Please if anyone can help ,do it quickly.

    sorry, one last test
    http://forum.java.sun.com/thread.jspa?threadID=55
    8245&messageID=32322 26
    Nice try, but Sun improved that one out of existence too.

  • Xdk for java class generation exception

    Has anyone seen the following/know how to avoid it?
    When I use oracg -d store_data.dtd, I am receiving the following
    exception:
    C:\Jim\config>oracg -d store_data.dtd
    Error: DTD Class Generator failed to generate classes.
    java.lang.SecurityException: sealing violation
    Any help would be appreciated.
    jim

    Jinyu,
    I guess the next release will need to be waited for as I have
    not been able to get you to respond to my questions.
    In the meantime, I'll have to use Sun's JAXB as I know it will
    generate the classes I want.
    jim
    PS: I am still available to work through this with you, but I
    need to move forward.

  • Classpath for java class for Business Operation

    I am running wls 7.0 with wli on Solaris.
    I am running studio on my developemt w2k pc and connectioning to my unix wls.
    I want to define a business operation using my FCV.class. Where should I put the
    class (pc or server) and where do I need to append my classpath information ?

    Business operations can only access classes from the application and extension
    classpath. This is a WLI limitation.
    Giora
    "Davidson Hutton" <[email protected]> wrote:
    >
    I am running wls 7.0 with wli on Solaris.
    I am running studio on my developemt w2k pc and connectioning to my unix
    wls.
    I want to define a business operation using my FCV.class. Where should
    I put the
    class (pc or server) and where do I need to append my classpath information

  • How do I call a simple java class from a bpel process?

    Hi.
    In JDeveloper 10.1.4.3.0 I've created a simple java class that does an ftp get operation followed by an unzip. The class uses some 3rd part libraries (jars).
    I want to use a simple bpel process to schedule a daily execution of this java class, and deploy it all to our SOA-server, - and was looking into using the <bpelx:exec> function.
    The java class and the bpel process is all stored in the same JDeveloper project.
    How do I put this together so that both my java class and the necessary jars are available to the bpel process?
    I've looked into the JavaExecSample.bpel, and it's says something about "...the class com.otn.samples.javaexec.CreditCalculator is locally packaged with this BPEL process".
    How do I do that?
    Can I make it and test it all locally from my workstation (only JDeveloper installed, I guess there's nothing that can execute the bpel code?), or do I have to compile class etc (make war-file?) and deploy to SOA server (BPEL-INF/lib or classes?) before anything can be tested?
    (I guess all this is simple, once you know how, but being a newbie to this I need a shove in the right direction :-)
    Regards,
    -Haakon-

    To create a java class and dependent jars inside the BPEL process project you need to do the following:
    1. Right click on your BPEL process project and select New and then Java Class from the Items.
    2. Make the BPEL process project, JDeveloper would compile the java classes and add them into the BPEL suite case jar, see the output folder and check the BPEL suite case jar file for java classes and dependent jars.
    You can test your Java classes from JDeveloper IDE, no need to deploy the classes on SOA server. When you make the BPEL project it compiles .bpel files and Java classes. You can test your classes once .bpel file and java classes compiled successfully.
    Regards,
    Dharmendra
    http://soa-howto.blogspot.com

  • Import only Java classes

    Hi,
    I've got a export dump (with rows=N) and now I would like to import only the JAVA CLASSES/RESOURCE from this export dump .
    Can someone please assist in the procedure to follow?
    Thanks.

    I dont believe that you can specifically ask for java classes to be imported with imp. You can with datapump import.
    You could do an import with the indexfile parameter and look at the DDL that would have been run, and pick out your java classes out of this?

  • How to generate the java classes of the database tables

    Hi,
    I am using Sun One 4 update1 CE for generate java classes of tables from an Oracle database. I have got the database schema file. However, when I right clicked on the database schema file, there is no selection for "Generate Java...".
    Besides, when I was trying to use database Schema template from the project tab in the explore window by double click on the project, after following all the procedures of inputing the database url, driver, uername, password, and select the table to generate, the following exception came out:
    Tue Jan 28 16:22:28 PST 2003: java.lang.NullPointerException: Posted StackTrace
    Annotation: Exception occurred in Request Processor
    org.openide.util.RequestProcessor$Holder: Posted StackTrace(task org.netbeans.core.ModuleActions$1@e4b7d3 [-31035, 1, -1])
    at org.openide.util.RequestProcessor$Holder.fillInStackTrace(RequestProcessor.java:300)
    at java.lang.Throwable.<init>(Throwable.java:195)
    at java.lang.Exception.<init>(Exception.java:41)
    at org.openide.util.RequestProcessor$Holder.<init>(RequestProcessor.java:280)
    at org.openide.util.RequestProcessor$Task.createHolder(RequestProcessor.java:333)
    at org.openide.util.RequestProcessor.post(RequestProcessor.java:100)
    at org.openide.util.RequestProcessor.post(RequestProcessor.java:73)
    at org.netbeans.core.ModuleActions.invokeAction(ModuleActions.java:123)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at org.openide.explorer.view.TreeView.invokeAction(TreeView.java:878)
    at org.openide.explorer.view.TreeView$PopupSupport.mouseClicked(TreeView.java:958)
    at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:208)
    at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:207)
    at java.awt.Component.processMouseEvent(Component.java:5096)
    at java.awt.Component.processEvent(Component.java:4890)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3450)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3174)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3095)
    at java.awt.Container.dispatchEventImpl(Container.java:1609)
    at java.awt.Window.dispatchEventImpl(Window.java:1585)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    [catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
    Tue Jan 28 16:22:28 PST 2003: java.lang.NullPointerException: <no message>
    java.lang.NullPointerException
    at org.netbeans.modules.projects.ProjectDataObject.add(ProjectDataObject.java:204)
    at org.netbeans.modules.projects.AddNewAction.performAction(AddNewAction.java:88)
    at org.openide.util.actions.NodeAction.actionPerformed(NodeAction.java:167)
    at org.netbeans.core.ModuleActions$1.run(ModuleActions.java:105)
    at org.openide.util.Task.run(Task.java:152)
    [catch] at org.openide.util.RequestProcessor$ProcessorThread.run(RequestProcessor.java:622)
    Any suggestions to the solution of these problems are greatly appreciated. Thanks.
    Yi-Xiong

    you also could use this to generate java beans out of database tables:
         * Convert SQL type code to corresponding Java class.
         * @param sqlType One of java.sql.Types.xxx.
         * @return Class that corresponds to the given type.
        public static Class toClass(int sqlType) {
            Class result = null;
            switch (sqlType) {
            case Types.BIGINT :
            case Types.INTEGER :
            case Types.SMALLINT :
            case Types.TINYINT :
                result = Integer.class;
                break;
            case Types.BIT :
            case Types.BOOLEAN :
                result = Boolean.class;
                break;
            case Types.CHAR :
                result = Character.class;
                break;
            case Types.DATE :
            case Types.TIMESTAMP :
                result = java.util.Date.class;
                break;
            case Types.DECIMAL :
            case Types.DOUBLE :
            case Types.FLOAT :
                result = BigDecimal.class;
                break;
            case Types.NULL :
                result = null;
                break;
            case Types.LONGVARCHAR :
            case Types.VARCHAR :
            default :
                result = String.class;
                break;
            return result;
        }//toClass()
         * Create a Java bean (source file) to map a database table. The class name is the table name, the bean
         * properties are the table columns. Each column will result in a property with a corresponding set() and
         * get() method.
         * @param connection Database connection to load table from.
         * @param tableName Name of table to create the bean for.
         * @param packageName Name of package for Java class.
         * @param className Name of Java class to create.
         * @param superClass Optional name of super class.
         * @return Java source of container class.
         * @throws SQLException, IOException
         * @see <a href="http://java.sun.com/blueprints/corej2eepatterns/Patterns/DataAccessObject.html">Data Access Object </a>
        public static String getTableBean(Connection connection, String tableName, String packageName, String className, String superClass)
                throws SQLException, IOException {
            String result = null;
            if (connection != null && tableName != null) {
                //read table columns:
                DatabaseMetaData dmd = connection.getMetaData();
                ResultSet resultSet = dmd.getColumns(null, "%", tableName, null);
                Properties props = new Properties();
                if (resultSet != null) {
                    while (resultSet.next()) { //for each table
                        String name = resultSet.getString("COLUMN_NAME");
                        int type = resultSet.getInt("DATA_TYPE");
                        props.setProperty(name, ""+type);
                    }//next table
                }//else: resultSet unavailable
                Set imports = new HashSet();
                StringBuffer sb1 = new StringBuffer(); //fields
                StringBuffer sb2 = new StringBuffer(); //methods
                StringBuffer sb3 = new StringBuffer(); //toString()
                Enumeration enum = props.keys();
                while (enum.hasMoreElements()) {
                    String columnName = (String) enum.nextElement();
                    //change first character of column name to lower case:
                    String fieldName = columnName.substring(0, 1).toLowerCase() + columnName.substring(1);
                    //datat type:
                    String stype = props.getProperty(columnName, ""+Types.VARCHAR);
                    int type = (new Integer(stype)).intValue();
                    Class javaClass = toClass(type);
                    String typeName = "String"; //default
                    if (javaClass != null) {
                        String javaClassName = javaClass.getName();
                        int lastDot = javaClassName.lastIndexOf('.');
                        if (lastDot >= 0) {
                            typeName = javaClassName.substring(lastDot + 1);
                        if (!javaClassName.startsWith("java.lang.")) {
                            imports.add(javaClassName);
                    //field:
                    sb1.append("    /** ");
                    sb1.append(columnName);
                    sb1.append(" */\n");
                    sb1.append("    private ");
                    sb1.append(typeName);
                    sb1.append(" ");
                    sb1.append(fieldName);
                    sb1.append(" = null;\n");
                    //toString() method:
                    sb3.append("        sb.append(\",");
                    sb3.append(fieldName);
                    sb3.append("=\");\n");
                    sb3.append("        sb.append(");
                    sb3.append(fieldName);
                    sb3.append(");\n");
                    //set method:
                    sb2.append("    /**\n");
                    sb2.append("     * Set ");
                    sb2.append(columnName);
                    sb2.append(".\n     *\n     * @param value ");
                    sb2.append(columnName);
                    sb2.append(" to set.\n");
                    sb2.append("     */\n");
                    sb2.append("    public void set");
                    sb2.append(columnName);
                    sb2.append("(");
                    sb2.append(typeName);
                    sb2.append(" value) {\n        ");
                    sb2.append(fieldName);
                    sb2.append(" = value;\n    }\n\n");
                    //get method:
                    sb2.append("    /**\n");
                    sb2.append("     * Get ");
                    sb2.append(columnName);
                    sb2.append(".\n     *\n     * @return ");
                    sb2.append(columnName);
                    sb2.append(".\n     */\n");
                    sb2.append("    public ");
                    sb2.append(typeName);
                    sb2.append(" get");
                    sb2.append(columnName);
                    sb2.append("() {\n");
                    sb2.append("        return ");
                    sb2.append(fieldName);
                    sb2.append(";\n    }\n\n");
                }//next column
                //build class source code:
                StringBuffer sb = new StringBuffer();
                sb.append("/* $Header: /data/iComps/icf/prg/java/src/de/icomps/sql/JDBCUtils.java 9     24.10.03 14:25 Hilpert $ */\n");
                sb.append("package ");
                sb.append(packageName);
                sb.append(";\n\n");
                //import statements:
                Iterator iterator = imports.iterator();
                while (iterator.hasNext()) {
                    String jcn = (String) iterator.next();
                    sb.append("import ");
                    sb.append(jcn);
                    sb.append(";\n");
                if (imports.size() > 0) {
                    sb.append("\n");
                //class:
                sb.append("/**\n");
                sb.append(" * Container class to store data of one record (row) of table '"+tableName+"'.\n");
                sb.append(" *\n");
                sb.append(" * @version $Revision: 9 $ ($Date: 24.10.03 14:25 $)\n");
                sb.append(" * @author $Author: Hilpert $\n");
                sb.append(" */\n");
                sb.append("public class ");
                sb.append(className);
                if (superClass != null) {
                    sb.append(" extends ");
                    sb.append(superClass);
                sb.append(" {\n\n");
                //fields:
                sb.append(sb1.toString());
                //methods:
                sb.append("\n\n");
                sb.append(sb2.toString()); //methods
                //overwrite toString() method:
                sb.append("    /**\n");
                sb.append("     * Overwrite super.\n");
                sb.append("     *\n     * @return String representation of the object.\n");
                sb.append("     */\n");
                sb.append("    public String toString() {\n");
                sb.append("        StringBuffer sb = new StringBuffer(super.toString());\n\n");
                sb.append(sb3.toString());
                sb.append("\n        return sb.toString();\n");
                sb.append("    }\n\n");
                sb.append("}//"+className);
                result = sb.toString();
            }//else: input unavailable
            return result;
        }//getTableBean()

  • How to apply java .class  to html?

    For java .class file, I am sure I follow exactly what the tutorials said to apply it to htm file but it just doesn't work. I applied it by adding the applet element with the .class file as the attribute. Is that wrong? I googled for it and an article said it is probably because of wrong .class file name. I am very sure it is not the case for me and it must not be upper or lower case thing. Any hint to fix it?
    My code is like this:
    <applet code="file_name.class" name=file_name archive=file_name.jar height="x" width="y"></applet>

    try this:
    <applet code="whatever.class" width=100 height=100>
    </applet>
    Works for me.

  • FodAdfCalendar Tutorial java classes

    Hello my friends,
    I'm developing an ADF application and trying to add a calendar into my page. I searched and found a tutorial -> http://www.oracle.com/technetwork/developer-tools/jdev/calendar-091799.html
    In this tutorial, there ara some java classes like ADFUtils.java, JSFUtils.java etc. I've just copied and pasted the codes into my classes with same name. But compiler couldn't find some packages and abstract classes :
    import oracle.adf.view.rich.event.CalendarActivityEvent;
    import oracle.adf.view.rich.event.CalendarEvent;
    import oracle.adf.view.rich.model.CalendarActivity;
    import javax.faces.application.Application;
    import javax.faces.application.FacesMessage;
    import javax.faces.component.UIComponent;
    import javax.faces.component.UIViewRoot;
    import javax.faces.context.ExternalContext;
    import javax.faces.context.FacesContext;
    I looked up the FodAdfCalendar folder for java classes. There are no classes named "CalendarActivity" or any other. How can i add them in my project? In FodAdfCalendar Project i went to declaration of CalendarActivity class, it has a code block, but when i add to my proj still has errors.
    Does anybody have an idea about this problem?
    Helps will be appreciated.
    Erdo
    Edited by: erdo on 16.Şub.2013 15:40
    Edited by: erdo on 16.Şub.2013 15:42

    Erdo, you don't need to create the library, it's already there. open the view controller project properties, select the 'Libraries and Classpath' node and check if you see the 'ADF Faces Runtime 11' library. If not, click on 'Add Library' and select the library from the available list. That should solve your problem.
    Timo

  • Suggestions on how to organize Java classes

    I am a new Java developer. Some of the resources I've been reading mention the use of directory structures that match the package structure, i.e. com.mycompany.util resides in .\com\mycompany\util.
    Since I am starting the first-ever Java project at my company I want to organize the classes I am creating in an effective way such that others can use them in the future. I plan on creating some utility classes that will be used by future projects.
    What I'm interested in is how people out there organize their classes on source control, and what is the best place to check them out to? I.e. should I check them out to the root
    c:\com\mycompany\util
    or a special directory defined just for Java classes
    c:\javastuff\com\...
    or to my project directory
    c:\myproject\com\...
    How would each method affect the CLASSPATH? I am thinking of using the first or second method. That way I only need one CLASSPATH defined.
    On source control should I store all the java files in one structure
    ./com/mycompany/...
    or should I store project specific java files in a project subdirectory and have a "common" directory for files used in multiple projects?
    I just want to get this organized properly up front so I don't have to move it all around later. I'm sure everyone does this differently but I wondered if there is a convention that is widely used.
    Thanks.

    Read up on "packages"
    http://java.sun.com/docs/books/tutorial/java/package/index.html
    and then organize your stuff according to your needs.

Maybe you are looking for

  • Limitation on data that can be fetched (ABAP RFC) via a Web Service?

    Hi, Is there any limit on the data that can be fetched via a Web Service (ABAP exposed as Web Service). I am trying to fetch PI monitoring data from ABAP Tables via a Web Service and there can be thousands of messages proceesed say in a day and what

  • ITunes freezes briefly when un-pausing near the end of a long file

    On the 1.6GHz G5 pro, 10.5.7 and iTunes 8.2 (and the problem occurred in earlier versions as well). I wouldn't notice this issue with 3-5 minute songs, but it's getting to be a problem with e.g. podcasts of several hours' duration. When the elapsed t

  • BAPI for posting TCode MI04, MI09 & MI10

    Hello Gurus, can someone tell me which BAPI's to use for postings of above mentioned transactions? Regards, Alej

  • Upgrade from "Classic" Broadband to "More Broadban...

    Hi First post here I am currently on the origianl Classic Broadband package and wish to upgrade to More Broadband Evening & Weekend to save a few pounds each month. As I run a business from home I can't afford any break in service or drop in the qual

  • Radio buttons are disabled in Custom Infotyope

    Hi All,   I have created a custom infotype for rating.This infotype is having 5 radiobutton fields. In the field attributes i marked this as an input field.But if go in PA30(create) these radiobuttons are disabled.I am not able to make an input. Than