Overwrite java parameters with environment variables or other mechanism???

I am using several java programs on my machine. Each of them uses some deeply nested startup script so I have no chance to modify the parameters of the java command.
I would need to change certain parameters though, e.g. the heap size or certain system properties.
Is there a way to do this by e.g. setting environment variables or modifying a user-specific configuration file?
I am using jdk 1.5.0_06 on Linux (Ubuntu).

Well the ones I am dealing with do not, unfortunately.
I am also interested in a general way to tune the JVM settings without modifying each and every call statement.
Surely there must be some mechanism to achieve this??

Similar Messages

  • Java classpath with Environment variable..

    Hi,
    I need to start an Java application with an Environment variable(EV) as class path.
    Ex:
    I have an EV APP_PATH =c:\myapp
    so i will give java -cp c:\myapp, instead of doing like this I need to give APP_PATH in the java -cp<EV>.
    I gave like this java -cp %APP_PATH% and that doesn't work...
    Is this the correct way or how to do this ?
    Thanks.

    I gave like this java -cp %APP_PATH% and that doesn't
    work...It does if APP_PATH has the correct value.
    Try echo %APP_PATH% and see if it's what you expect. They plug whatever that returns into your java command.
    Is this the correct way or how to do this ?That's the correct way. You APP_PATH must be wrong.

  • Problem with environment variables

    JAVA_HOME = C:\JBuilder9\jdk1.4
    Path = C:\oracle\product\10.1.0\Db_1\bin;C:\oracle\product\10.1.0\Db_1\jre\1.4.2\bin;C:\oracle\product\10.1.0\Db_1\jre\1.4.2\bin\client;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;.;C:\oracle1\product\10.1.0\Db_3\jdbc\lib\classes12.zip
    When I run foo.java I get this error, which i believe is because of some kind
    of problem with environment variables.
    Exception in thread "main" java.lang.NoClassDefFoundError: OraThinI eliminated this path
    C:\oracle\product\10.1.0\Db_1\jre\1.4.2\bin
    just to check whether two paths of jdk bin folder is causing problem but I see no change.
    Please help

    I had solved it myself
    I am a genious :P
    Just do this
    JAVA_HOME = C:\JBuilder9\jdk1.4
    CLASSPATH = C:\oracle\product\10.1.0\Db_1\jdbc\lib\classes12.zip;.;%JAVA_HOME%\bin
    PATH= C:\oracle\product\10.1.0\Db_1\bin;C:\oracle\product\10.1.0\Db_1\jre\1.4.2\bin;C:\oracle\product\10.1.0\Db_1\jre\1.4.2\bin\client;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;.;C:\oracle1\product\10.1.0\Db_3\jdbc\lib\classes12.zip;%JAVA_HOME%\bin

  • Help reqd on Trace with environment variables

    Hi,
    Please let me know the procedure to set trace with environment variables.
    Kindly forward any related links to this.
    regards,
    Naveen.A

    Hi Naveen,
              Go through this help documents. Hope it helps.
    http://help.sap.com/saphelp_nw04/helpdata/en/5e/4dfca06fc1ea4ea31c0c522c62cb1a/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/ef/8eb899cf32416eaa452329c64acb5f/frameset.htm
    Cheers,
    Aravindhan

  • Problem with environment variable & compiling

    G'day all,
    I'm totally confused :(
    I've set my environment detail but when I use javac the command window just does nothing. The cursor (or flashing thingo) drops to the line below and just hangs there. If i manually type in the entire path javac works fine.
    Image of my environment variable window is here:
    http://img130.imageshack.us/img130/5120/environvariables.jpg
    Using Windows 7, JDK 1.6.0_18 and latest version of Eclipse is installed.
    Second issue:
    I wrote a program using Eclipse. It all went into a package named "openagil". 3 classes in total. Class "A", "B", "C". A uses both B and C. It creates an instance of B and C. Included in each is package openagil; at the very top.
    Running in eclipse it works fine. However, how do I compile this using javac and then in turn run it? The .java files are located within a workbench folder (java) and then in the package directory (openagil). These are contained on the D drive so "d:\java\openagil" - No class variables are set as I am unsure how this is done (despite reading a few guides).
    I can do javac d:\...*.java and it'll compile all of them fine but I am then unsure how to run it. I think what I do is do java openagil.classA but this pulls up errors - an "exception in thread' error followed by a "noclassdeffound: openagil/classA" then a whole bunch of URL/Access Controller stuff.
    I understand programming fine, but configuring this is a bitch. My Java book doesn't cover installation nor does it cover packages and the

    LordMidol wrote:
    Second issue:
    I wrote a program using Eclipse. It all went into a package named "openagil". 3 classes in total. Class "A", "B", "C". A uses both B and C. It creates an instance of B and C. Included in each is package openagil; at the very top.
    Running in eclipse it works fine. However, how do I compile this using javac and then in turn run it? The .java files are located within a workbench folder (java) and then in the package directory (openagil). These are contained on the D drive so "d:\java\openagil" - No class variables are set as I am unsure how this is done (despite reading a few guides).
    I can do javac d:\...*.java and it'll compile all of them fine but I am then unsure how to run it. I think what I do is do java openagil.classA but this pulls up errors - an "exception in thread' error followed by a "noclassdeffound: openagil/classA" then a whole bunch of URL/Access Controller stuff.You need to us the -classpath (or -cp) command line option to specify where java looks for your .class files. I think it would be java -cp d:\java openagil.classAFYI class naming convention is to start with a capital letter - YourMainClass for example. It may help to go here [http://java.sun.com/javase/6/docs/technotes/tools/index.html] and go to General Information, then click on How Classes Are Found.

  • Problem with environment variable settings

    I am using J2SDK1.4.1
    I have set the classpath variables and path variables properly.
    When I go to commandline c:\> and type the command "javac" I get a message as follows---
    Registry key 'Software\JavaSoft\Java Runtime Environment\CurrentVersion'
    has value '1.4', but '1.3' is required.
    Error: could not find java.dll
    Error: could not find Java 2 Runtime Environment.
    If I change directory to c:\j2sdk1.4.1\bin> and type javac c:\dir_name\filename.java then the file compiles but when I try to run the java file I get an error message "Exception in thread main no ClassDef Found".
    How do I compile and run my java files.
    Can any body help me out.

    Your registry has some information in it that is in conflict with the 1.4.1 installation. Search the forums, there are some strings that address this problem of version conflicts.

  • Problem with ENVIRONMENT VARIABLES in MS-DOS

    I have just installed JDK & J2EESDK under the directory C:\Program Files.
    I set my JAVA_HOME to C:\Program Files\jdkblahblah\bin
    and J2EE_HOME to C:\Program Files\j2eesdkblahblah\bin
    and CLASSPATH to %J2EE_HOME%\lib\j2ee.jar
    As you may have noticed there is a space in the directory "Program Files" and this has been giving me a lotta problems. When i try to run any batch files it doesn't recognise the classpath...Same thing happens when i try to run javac with the -classpath option.
    Even when i use full path names instead of env.variables it still has problems as it is assuming the latter part after the space(Files\j2ee..) and the one before the space(C:\Program) as two different paths....
    How do i fix this? I have a work-around but, I would like to know how to fix this thing...

    I guess that surrounding the path with quotes might help. You have windoze on your 'puter, haven't you. In case of Win2K, right click on "my computer", select "properties", select "special", and then "environment variables". There you may edit the PATH. I guess editing the classpath is also a must.
    Or, alternatively, uninstall java, and reinstall it in the root directory, without having white spaces in the path. Makes your life much easier...

  • Java and UNIX environment variables

    Hi folks,
    am I right when I say that it is not possible to access UNIX environment variables from Java (these ones delared by the export statement)?
    Cheers,
    Heiko

    Yes.. Since some OS do not have the  concept of environment variables,it is directly not possible.
    But using the method System.getProperties you can get
    some inf about the environment.
    the following links may be of some help to you
    http://www.javaworld.com/javaworld/javaqa/2001-07/01-qa-0706-env.html
    http://www.jguru.com/faq/view.jsp?EID=11422

  • Unable to start java tools - Error : Environment variable JAVA_HOME not set

    hi all,
    I am not able to start the java tool - Visual Admin, Configtool, etc in the solaris Bash shell.
    I was given authorizations on solaris and i'm able to view the logs and browse in solaris boxes,
    But, when i try to start Visual Admin, it says" ERROR environment variable JAVA_HOME not set "
    Since,my colleagues are using this tool for years, how come the environment variable is not set only for my user profile ?
    Is it like the environment variable has to set seperately for every user profile ?
    Do i need to set it initially for my profile eventhough it is working for others ?
    i am confused..please help.
    Addy

    Nicholls, Thanks for your quick reply.
    Ofcourse, I use my login ID to use java tools and they use their's obviously.I don't use <SID>adm.
    We WRQ reflection for X-Windows and Putty for Command line Solaris Access.
    When i try to use VA through the X-Window tool WRQ reflection, I am not able to start the tool.
    My doubt here is, Do we need to setup the environment variable for every new user initially for the first time ? ( I am a new user for this environment )
    Supposing if i need to setup the environment variable, do i need to set it up for the all the Solaris Boxes i use ?
    I am able to browse through the files.when i try to start the VA by giving ./go i am not able to start it up.
    Appreciate your time and valuable replies.
    Addy

  • Does "Allow log on locally" work with environment variables?

    This is merely out of curiosity and just because I'm doing some conceptual gambling.
    I'd like to create a GPO having the Allow log on locally set to something like the following list:
    %OWNER%
    BUILTIN\Administrators
    The concept behind this is to prepare the system during OS installation with a value to the OWNER environment variable to allow only the specified user account (apart from the Administrators group, of course) to log on to the system without A) having to
    configure this setting locally on the client and B) having a great range of different GPOs to handle all the user/computer combinations.
    My questions are:
    Does this work at all?
    If it works, what do I need to provide as a value?
    I've already tried to set <user name>, <domain name>\<user name> and
    <user name>@<FQDN> but none of those seem to work.

    Hi,
    Glad to see your problem resolved. Hope your experience could helps other who had same cofusion.
    Roger Lu
    TechNet Community Support

  • Rendering java-parameters with JavaWebStart

    Hi,
    how can I render java-parameters like -Xms128m to JavaWebStart?
    Note, this has to be done within the jnlp-file, the client must not have to do anything!!!

    I suppose you've read the Developers guide, if you have you'll know that nothind is said, so I suppose nothing could be done.
    Realize to that th -X parameters of the VM are not garanteed to be implemented on al the VM, Sun usually does but third partys are not forced to implement them, so the client may hav a VM not hable to undestand them.
    Abraham.

  • Create a Java Object with Dynamic Variables

    Hi ,
    I am constructing a web based system which stores personal information on people. I have created a Person class with all the obvoius variables, forename, surname, address etc.. My problem is that some clients wish to make use of some of the variables, some want other variables and as i meet others they wish to add in some new variables eg
    Client 1 wishes to store; Forename, Surname and Address
    Client 2 wishes to store Forename, AltForename, Surname, AltSurname and Address ( AltForename - this is an alternative Forename in this case the Irish translation of their English name)
    Client 3 wishes to store Forename, Surname, Title, Address, Height, Weight, DOB, School, Occcupation.
    Each of the clients above need to submit these in an online form with each form looking different due to the fields they have to enter and also with different validation rules.
    At present i have a Person object handling all fields i can think of and different validation methods depending on the client, but there must be a better way of doing this as each time a new field is added by a new or existing client, i not only have to update the java and jsp but also the DB.
    This is all web based and i wish to use the same code base and data source for all clients. I also wish it to be all web based. So in theory if a client asked to add in a "middle name" field to their form and make it mandatory, i could go to an admin page which lists all the possible input element types and select the "field type" then set validation rules on it.
    All the web based and DB parts can be ignored - the main issue here is creating a Person class which can have any number of variables of varying types ( String, Int, etc)
    Regards,
    Cormac
    Edited by: cormacodonnell on Jun 27, 2008 6:33 AM

    cormacodonnell wrote:
    Hi ,
    I am constructing a web based system which stores personal information on people. I have created a Person class with all the obvoius variables, forename, surname, address etc.. My problem is that some clients wish to make use of some of the variables, some want other variables and as i meet others they wish to add in some new variables eg
    Client 1 wishes to store; Forename, Surname and Address
    Client 2 wishes to store Forename, AltForename, Surname, AltSurname and Address ( AltForename - this is an alternative Forename in this case the Irish translation of their English name)
    Client 3 wishes to store Forename, Surname, Title, Address, Height, Weight, DOB, School, Occcupation.You could extend the Person class with 3 sub classes, but that might be overkill just to store personal info.
    Each of the clients above need to submit these in an online form with each form looking different due to the fields they have to enter and also with different validation rules.
    At present i have a Person object handling all fields i can think of and different validation methods depending on the client, That's probably how I'd do it if it's not too much trouble. But to be OO you should probably go the inheritence route.
    but there must be a better way of doing this as each time a new field is added by a new or existing client, i not only have to update the java and jsp but also the DB. Welcome to software development. It's called "feature creep" or "scope creep". As soon as you get your code working right and deploy it and get ready to go on vacation, the customer always comes back with something else they "need" or "forgot". The app I'm building right now I've rewritten or changed 7 times in 3 months because nobody has a clue what they really need.

  • Parameters with jsp variables

    Hi all,
              I want to know if it is possible to pass JSP script variables as parameters
              between functions and files
              for example in this tag
              <cm:selectbyid contenthome="com.beasys.commerce.axiom.document.Document"
              contentid="<%= contentId %>"
              id="newsItem" />
              I would like to pass the "newsItem" content variable to another file (as a
              return from a function) to be used later for operations such as
              <cm:printdoc id="newsItem" />
              Is this possible and if not, is there a work around it that enables me to
              place my logic of content selection in a different location than the display
              of the content
              Thanks in advance
              May AbdelRazik
              

    I am so frustrated.
    I have tried to write the syntax many many times, what's wrong of using jsp:include?
    What JSP version supports jsp:include?
    Thanks!
    "Unterminated error if
    i write <jsp:include page="date.jsp">; no error if using
    <jsp:include page="date.jsp">, but no effect.
    //demo.jsp
    <HTML>
    <BR><BR><BR><BR><BR><BR>
    <jsp:include page="date.jsp">
    <jsp:param="name" value="testingvalue" />
    </jsp:include >
    </HTML>
    //date.jsp
    <HTML>
    <%@ page import="java.util.*"%>
    <%@ page import="javax.servlet.http.*"%>
    <%
    String name = request.getParameter("name");
    %>
    <%= new java.util.Date()%> Parameter <%=name %>
    <BR>
    </HTML>

  • JAVA parameters with Config tool

    Hi,
    I am new to working with the JAVA stack.
    Could you please reveal us on the general parameters that we configure with the Config tool.
    I have already referred the SNOTE: 723909 which describes all the parameters. But we need the details of the
    parameters that are changed frequently with the JAVA stack administration.
    Any link to the document would be more helpful.
    Thanks & Regards
    DVRK

    No interview questions.
    That info is widely available.
    Read the "Rules of Engagement"
    Regards
    Juan

  • WD Java: Problem with Model out of other DC

    Hi, all!
    I' ve got 2 WD Development Components: One is hosting an Adaptive RFC-Model, the other one my UI. I put the model into its DCs Public Part and declared it as Child DC of the other one.
    After successfully building & deploying both DCs, I receive the following error:
    java.lang.NullPointerException
         at com.sap.tc.webdynpro.progmodel.context.MappingInfo.getDataNode(MappingInfo.java:78)
         at com.sap.tc.webdynpro.progmodel.context.MappedNodeInfo.getDataNode(MappedNodeInfo.java:199)
         at com.sap.tc.webdynpro.progmodel.context.MappedNodeInfo.getStructureType(MappedNodeInfo.java:108)
         at com.sap.tc.webdynpro.progmodel.context.MappedNodeInfo.getStructureType(MappedNodeInfo.java:109)
         at com.sap.tc.webdynpro.progmodel.context.NodeInfo.initStructureType(NodeInfo.java:688)
         at com.sap.tc.webdynpro.progmodel.context.NodeInfo.initAfterCompletedMapping(NodeInfo.java:676)
         at com.sap.tc.webdynpro.progmodel.context.MappingInfo.getDataNode(MappingInfo.java:83)
         at com.sap.tc.webdynpro.progmodel.context.MappingInfo.initMapping(MappingInfo.java:121)
         at com.sap.tc.webdynpro.progmodel.context.MappingInfo.init(MappingInfo.java:117)
         at com.sap.tc.webdynpro.progmodel.context.MappedNodeInfo.doInit(MappedNodeInfo.java:207)
         at com.sap.tc.webdynpro.progmodel.context.NodeInfo.init(NodeInfo.java:654)
         at com.sap.tc.webdynpro.progmodel.context.NodeInfo.init(NodeInfo.java:657)
         at com.sap.tc.webdynpro.progmodel.context.Context.init(Context.java:40)
         at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:199)
         at com.sap.tc.webdynpro.progmodel.controller.Component.getCustomControllerInternal(Component.java:436)
         at com.sap.tc.webdynpro.progmodel.controller.Component.getMappableContext(Component.java:374)
         at com.sap.tc.webdynpro.progmodel.controller.Component.getMappableContext(Component.java:403)
         at com.sap.tc.webdynpro.progmodel.context.MappingInfo.getDataNode(MappingInfo.java:79)
         at com.sap.tc.webdynpro.progmodel.context.MappingInfo.initMapping(MappingInfo.java:121)
         at com.sap.tc.webdynpro.progmodel.context.MappingInfo.init(MappingInfo.java:117)
         at com.sap.tc.webdynpro.progmodel.context.MappedNodeInfo.doInit(MappedNodeInfo.java:207)
         at com.sap.tc.webdynpro.progmodel.context.NodeInfo.init(NodeInfo.java:654)
         at com.sap.tc.webdynpro.progmodel.context.NodeInfo.init(NodeInfo.java:657)
         at com.sap.tc.webdynpro.progmodel.context.Context.init(Context.java:40)
         at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:199)
         at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.init(ClientComponent.java:347)
         at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.init(ClientApplication.java:370)
         at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.execute(WebDynproMainTask.java:608)
         at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:59)
         at com.sap.tc.webdynpro.clientserver.cal.ClientManager.doProcessing(ClientManager.java:248)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doWebDynproProcessing(DispatcherServlet.java:154)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:116)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doGet(DispatcherServlet.java:48)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    Following some recommendations I already created a "Dummy"-WD Component with a "do nothing"-method in the Model-DC which I then call in the UI-DCs wdDoInit() to instantiate the model, but without any success.
    Has anybody got an idea?
    Thanks a lot in advance!
    Regards,
    Thomas

    Hi, Maksim!
    Thank you very much for your answer!
    Yes, it' s the full exception chain. Could you perhaps tell me where to start the error-search?
    Regards,
    Thomas

Maybe you are looking for