Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Setting Environment variables
03-25-2008, 11:19 PM
Post: #1
Setting Environment variables
Hi all,

We are using JNI (Java and C++). A method is in java calls the C++ api’s using JNI .



This native method is using an environment variable which needs to be set programmatically. Please help me out how can is set the env variable and where to set ,I am using windows and AIX environment

Regards,
Krishna
Find all posts by this user
Quote this message in a reply
03-27-2008, 02:42 AM
Post: #2
RE: Setting Environment variables
Hi

by using System.setProperty method u can set the env variable programmatically or dynamically

example

PHP Code:
System.setProperty("jasper.reports.compile.class.path"envClassPath);
             
System.setProperty("scalatest.output"outDir.getCanonicalFile.getAbsolutePath
             
System.setProperty("scalatest.lib"LATEST_LIB
             
System.setProperty("scalatest.cwd"outDir.getParent

and also to add class or jar files dynamically to jvm use the class loader or urlclass loader class to load.

see the following url

http://svn.atlassian.com/fisheye/browse/...58&r2=3508
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: