mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
changes to include local jre as part of the path
This commit is contained in:
+7
-2
@@ -4,8 +4,13 @@ REM --- if you're running out of memory, change the 128m
|
||||
REM --- (which means 128 megabytes) to something higher.
|
||||
|
||||
set SAVEDCP=%CLASSPATH%
|
||||
set CLASSPATH=java\lib\rt.jar;java\lib\jaws.jar;lib;lib\build;lib\pde.jar;lib\kjc.jar;lib\antlr.jar;lib\oro.jar;lib\comm.jar;%windir%\system32\qtjava.zip;%windir%\system\qtjava.zip
|
||||
set SAVEDPATH=%PATH%
|
||||
|
||||
start .\java\bin\javaw -ms128m -mx128m PdeBase
|
||||
set CLASSPATH=java\lib\rt.jar;java\lib\jaws.jar;lib;lib\build;lib\pde.jar;lib\kjc.jar;lib\antlr.jar;lib\oro.jar;lib\comm.jar;%windir%\system32\qtjava.zip;%windir%\system\qtjava.zip
|
||||
set PATH=java\bin;%PATH%
|
||||
|
||||
start javaw -ms128m -mx128m PdeBase
|
||||
REM start .\java\bin\javaw -ms128m -mx128m PdeBase
|
||||
|
||||
set CLASSPATH=%SAVEDCP%
|
||||
set PATH=%SAVEDPATH%
|
||||
|
||||
@@ -195,6 +195,21 @@ WinMain (HINSTANCE hInst, HINSTANCE hPrev, LPSTR lpCmd, int nShow)
|
||||
return 0;
|
||||
}
|
||||
|
||||
// need to add the local jre to the path for 'java mode' in the env
|
||||
if (local_jre_installed) {
|
||||
char *env_path = (char *)malloc(512 * sizeof(char));
|
||||
strcpy(env_path, getenv("PATH"));
|
||||
|
||||
char *paf = (char *)malloc(1024 * sizeof(char));
|
||||
sprintf(paf, "%s\\java\\bin;%s", loaddir, env_path);
|
||||
|
||||
if (!SetEnvironmentVariable("PATH", paf)) {
|
||||
MessageBox(NULL, "Could not set PATH environment variable",
|
||||
"Processing Error", MB_OK);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
//MessageBox(NULL, cp, "whaadddup", MB_OK);
|
||||
|
||||
// add the name of the class to execute and a space before the next arg
|
||||
|
||||
Reference in New Issue
Block a user