facebook

Configure Myeclipse to call class file on starup of server

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MyEclipse IDE
  2.  > 
  3. Installation, Configuration & Updates
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #248623 Reply

    gsoftwares
    Member

    Hello,

    I want to run custom class file on startup of server, Can you please help me how to define it with proper syntax in MYECLIPSE IDE.

    i.e with “-D” option

    I am using oracle 10g server

    Thanks,
    GBK

    #248626

    Riyad Kalla
    Member

    GBK,
    Navigate to Window > Preferences > MyEclipse > Application Servers > Oracle AS > JDK, then in the 2nd box add your -D options 1 per line.

    #248630

    gsoftwares
    Member

    I am looking for syntax, say my class is “com.pack.testclass” when how should i define with -D option

    Thanks

    #248642

    Riyad Kalla
    Member

    GBK,
    -D is used to set environment variables, not implicitly run classes. Our connector does not provide built in support for running code before the app server starts, sorry I misunderstood your question.

    #248659

    gsoftwares
    Member

    Ok, I want to define system vairable at start up of server and then read it like, system.getproperty(“XYZ”), Can you let me know how and where to define.

    e.g java -Dcom.dor.configProperties=com.dor.config.configProperties ‘this is not working when I start server’

    Thanks
    gbk

    #248663

    Riyad Kalla
    Member

    GBK,
    You have it right, using -D sets a system property. I just tried this with Tomcat.

    I added an Optioanl Java VM ARgument of: -DtestProperty=SOMETEST

    then created this JSP:

    
    <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
      <body>
        System Property: [<%= System.getProperty("testProperty") %>]
      </body>
    </html>
    

    and it printed out:

    
    System Property: [SOMETEST] 
    

    So maybe you have a typo somewhere.

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: Configure Myeclipse to call class file on starup of server

You must be logged in to post in the forum log in