Run java file in inno setup - java

I have program in java who are copying some files to home java folders. In cmd it's work. I don't know how use it in Inno Setup.
I tried:
Filename: "{cmd}"; Parameters: "/C ""cd {app}""/C ""java Javaxcomm"; Flags: runhidden waituntilterminated runascurrentuser
Filename: "java"; Parameters: "Javaxcomm"; WorkingDir: "{app}"; Flags: runhidden waituntilterminated runascurrentuser
Filename: "cmd"; Parameters: "/C java {app}\Javaxcomm"

I found another way. Maybe someone this will help. It isn't my code.
[Code]
var
javaVersion: String;
javaPath: String;
function InitializeSetup(): Boolean;
begin
if RegValueExists(HKLM, 'SOFTWARE\JavaSoft\Java Development Kit', 'CurrentVersion') then
begin
RegQueryStringValue(HKLM, 'SOFTWARE\JavaSoft\Java Development Kit', 'CurrentVersion', javaVersion);
MsgBox('Found Java Development Kit version ' + javaVersion, mbInformation, MB_OK);
if RegValueExists(HKLM, 'SOFTWARE\JavaSoft\Java Development Kit\' + javaVersion, 'JavaHome') then
begin
RegQueryStringValue(HKLM, 'SOFTWARE\JavaSoft\Java Development Kit\' + javaVersion, 'JavaHome', javaPath);
MsgBox('Found Java Development Kit java_home: ' + javaPath, mbInformation, MB_OK);
Result := True;
end
else
begin
MsgBox('Java Path not set for JDK' + javaVersion, mbInformation, MB_OK);
MsgBox('RE-install java', mbInformation, MB_OK);
Result := False;
end
end
else if RegValueExists(HKLM, 'SOFTWARE\JavaSoft\Java Runtime Environment', 'CurrentVersion') then
begin
RegQueryStringValue(HKLM, 'SOFTWARE\JavaSoft\Java Runtime Environment', 'CurrentVersion', javaVersion);
MsgBox('Found Java Runtime Environment version ' + javaVersion, mbInformation, MB_OK);
if RegValueExists(HKLM, 'SOFTWARE\JavaSoft\Java Runtime Environment\' + javaVersion, 'JavaHome') then
begin
RegQueryStringValue(HKLM, 'SOFTWARE\JavaSoft\Java Runtime Environment\' + javaVersion, 'JavaHome', javaPath);
MsgBox('Found Runtime Environment java_home: ' + javaPath, mbInformation, MB_OK);
Result := True;
end
else
begin
MsgBox('Java Path not set for Java Runtime Environment' + javaVersion, mbInformation, MB_OK);
MsgBox('RE-install java', mbInformation, MB_OK);
Result := False;
end
end
else
begin
MsgBox('v1 has not been found on your computer.'#13#13'Please Install it and try again.', MbError, Mb_Ok);
Result := False;
end
end;
function GetJAVAHome(S: String) : String;
begin
Result := javaPath;
end;
Source: "{#MojaAppZrodla}\commapi\comm.jar"; DestDir: "{code:GetJAVAHome}\lib\ext"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "{#MojaAppZrodla}\commapi\win32com.dll"; DestDir: "{code:GetJAVAHome}\bin"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "{#MojaAppZrodla}\commapi\javax.comm.properties"; DestDir: "{code:GetJAVAHome}\lib"; Flags: ignoreversion recursesubdirs createallsubdirs

Related

How to run a command with path including spaces (bundled JRE) when using AfterInstall with Inno Setup

I am installing a Java program as an exe with a bundled JRE folder. I can't get the setup to successfully call the bundled java.exe with my application.
So my laptop has Java installed already so the following worked:
[Files]
Source: "jre\*"; DestDir: "{app}\jre"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "build\launch4j\Application Lite.exe"; DestDir: "{app}"; Flags: ignoreversion; \
AfterInstall: MyAfterInstall
[Code]
procedure MyAfterInstall();
var ResultCode: Integer;
begin
Exec(
'cmd.exe',
'/c java -cp ' + AddQuotes(ExpandConstant('{app}\Application Lite.exe')) +
' com.examplesoftware.applicationlite.support.hibernateSupport',
'', SW_SHOW, ewWaitUntilTerminated, ResultCode);
end;
Where {app} is by default c:\Example Software\Application Lite.
The following does not work when I try use the bundled JRE:
[Code]
procedure MyAfterInstall();
var ResultCode: Integer;
begin
Exec(
'cmd.exe',
'/k ' + AddQuotes(ExpandConstant('{app}\jre\bin\java.exe')) +
' -cp ' + AddQuotes(ExpandConstant('{app}\Application Lite.exe')) +
' com.examplesoftware.applicationlite.support.hibernateSupport',
'', SW_SHOW, ewWaitUntilTerminated, ResultCode);
end;
I get the error:
'c:\Example' is not recognized as an internal or external command,
operable program or batch file.
If I use echo with the code like this:
Exec(
'cmd.exe',
'/k echo ' + AddQuotes(ExpandConstant('{app}\jre\bin\java.exe')) +
' -cp ' + AddQuotes(ExpandConstant('{app}\Application Lite.exe')) +
' com.examplesoftware.applicationlite.support.hibernateSupport',
'', SW_SHOW, ewWaitUntilTerminated, ResultCode);
and copy the command it works. I don't understand why it is breaking.
You do not need the cmd, it only makes it more complicated. This should work:
Exec(
ExpandConstant('{app}\jre\bin\java.exe'),
'-cp ' + AddQuotes(ExpandConstant('{app}\Application Lite.exe')) +
' com.examplesoftware.applicationlite.support.hibernateSupport',
'', SW_SHOW, ewWaitUntilTerminated, ResultCode);
Had it not work and you have wanted to debug the command with the cmd /k, you need to wrap whole command to double-quotes:
Exec(
'cmd.exe',
'/k "' + AddQuotes(ExpandConstant('{app}\jre\bin\java.exe')) +
' -cp ' + AddQuotes(ExpandConstant('{app}\Application Lite.exe')) +
' com.examplesoftware.applicationlite.support.hibernateSupport"',
'', SW_SHOW, ewWaitUntilTerminated, ResultCode);

Ask for password when try to uninstall my java application in Windows

I've made an installer of my java application for Windows. After installing it in Windows everything works perfectly. Now I want to add a feature which should ask for a Password when I try to uninstall my Application without password one must not be able to uninstall it.
One other thing that I want to know is, whether I need to make a separate uninstaller or I can add these functionalities in my installer itself?
Any help would be appreciated.
P.S. Here I'm targeting Windows OS to install applications.
In short, I want that if someone tries to uninstall my application, he prompted for a password and if he enters the right password then
and then he can able to uninstall it.
I don't know to achieve above want, whether I need to change my
installer or I need to create a custom uninstaller.
Finally, after so much effort I found some good source that explains to me all the questions.
In Inno Setup pascal script I can modify some code to achieve password protection like this:
[Setup]
AppName=UninsPassword
AppVerName=UninsPassword
DisableProgramGroupPage=true
DisableStartupPrompt=true
DefaultDirName={pf}\UninsPassword
[Code]
function AskPassword(): Boolean;
var
Form: TSetupForm;
OKButton, CancelButton: TButton;
PwdEdit: TPasswordEdit;
begin
Result := false;
Form := CreateCustomForm();
try
Form.ClientWidth := ScaleX(256);
Form.ClientHeight := ScaleY(100);
Form.Caption := 'Uninstall Password';
Form.BorderIcons := [biSystemMenu];
Form.BorderStyle := bsDialog;
Form.Center;
OKButton := TButton.Create(Form);
OKButton.Parent := Form;
OKButton.Width := ScaleX(75);
OKButton.Height := ScaleY(23);
OKButton.Left := Form.ClientWidth - ScaleX(75 + 6 + 75 + 50);
OKButton.Top := Form.ClientHeight - ScaleY(23 + 10);
OKButton.Caption := 'OK';
OKButton.ModalResult := mrOk;
OKButton.Default := true;
CancelButton := TButton.Create(Form);
CancelButton.Parent := Form;
CancelButton.Width := ScaleX(75);
CancelButton.Height := ScaleY(23);
CancelButton.Left := Form.ClientWidth - ScaleX(75 + 50);
CancelButton.Top := Form.ClientHeight - ScaleY(23 + 10);
CancelButton.Caption := 'Cancel';
CancelButton.ModalResult := mrCancel;
CancelButton.Cancel := True;
PwdEdit := TPasswordEdit.Create(Form);
PwdEdit.Parent := Form;
PwdEdit.Width := ScaleX(210);
PwdEdit.Height := ScaleY(23);
PwdEdit.Left := ScaleX(23);
PwdEdit.Top := ScaleY(23);
Form.ActiveControl := PwdEdit;
if Form.ShowModal() = mrOk then
begin
Result := PwdEdit.Text = 'removeme';
if not Result then
MsgBox('Password incorrect: Uninstallation prohibited.', mbInformation, MB_OK);
end;
finally
Form.Free();
end;
end;
function InitializeUninstall(): Boolean;
begin
Result := AskPassword();
end;
Source of information: this post

Find JRE installation path in Inno Setup

Followings are my requirement:
Check if the Java is installed
Check if it's installed in a custom directory
if it's, then save the directory path in a variable
Otherwise detect the version and save the standard path in a variable
Below is the code that detects the version and save the standard path to a variable
Problems with my code:
If both 32 and 64 bit is installed it detects the both ..My aim is to detect only 64 bit in case both is installed.
if DirExists(ExpandConstant('{pf32}\java\')) then Is this what i can use to detect custom directory?
I don't think the above code is the right way to find custom directory of java. if the user installed in a different folder other than Java. the other problem is if we uninstall java it doesn't delete the folder java/JRE.
I'm using #TLama's code from Need help on Inno Setup script - issue in check the jre install
[Code]
#define MinJRE "1.7.0"
#define WebJRE "http://www.oracle.com/technetwork/java/javase/downloads/jre6downloads-1902815.html"
function IsJREInstalled: Boolean;
var
JREVersion: string;
JREPath:string
begin
{ read JRE version }
Result := RegQueryStringValue(HKLM32, 'Software\JavaSoft\Java Runtime Environment',
'CurrentVersion', JREVersion);
MsgBox('JAVA 32 bit detected.', mbInformation, MB_OK);
JREPath := 'C:\Program Files (x86)\Java'
{ if the previous reading failed and we're on 64-bit Windows, try to read }
{ the JRE version from WOW node }
if not Result and IsWin64 then
Result := RegQueryStringValue(HKLM64, 'Software\JavaSoft\Java Runtime Environment',
'CurrentVersion', JREVersion);
MsgBox('JAVA 64 bit detected.', mbInformation, MB_OK);
JREPath := 'C:\Program Files\Java'
{ if the JRE version was read, check if it's at least the minimum one }
if Result then
Result := CompareStr(JREVersion, '{#MinJRE}') >= 0;
end;
function InitializeSetup: Boolean;
var
ErrorCode: Integer;
begin
Result := True;
{ check if JRE is installed; if not, then... }
if not IsJREInstalled then
begin
{ show a message box and let user to choose if they want to download JRE; }
{ if so, go to its download site and exit setup; continue otherwise }
if MsgBox('Java is required. Do you want to download it now ?',
mbConfirmation, MB_YESNO) = IDYES then
begin
Result := False;
ShellExec('', '{#WebJRE}', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode);
end;
end;
end;
JRE installation path is stored in registry like this:
[HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment]
"CurrentVersion"="1.8"
[HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\1.8]
"JavaHome"="C:\\Program Files\\Java\\jre1.8.0_172"
You can retrieve the installation path of the latest version (with 64-bit preference) using a code like this:
const
JavaKey = 'SOFTWARE\JavaSoft\Java Runtime Environment';
function GetJavaVersionAndPath(
RootKey: Integer; var JavaVersion: string; var JavaPath: string): Boolean;
var
JREVersion: string;
begin
Result :=
RegQueryStringValue(RootKey, JavaKey, 'CurrentVersion', JavaVersion) and
RegQueryStringValue(RootKey, JavaKey + '\' + JavaVersion, 'JavaHome', JavaPath);
end;
{ ... }
var
JavaVersion: string;
JavaPath: string;
begin
if GetJavaVersionAndPath(HKLM64, JavaVersion, JavaPath) then
begin
Log(Format('Java %s 64-bit found in "%s"', [JavaVersion, JavaPath]));
end
else
if GetJavaVersionAndPath(HKLM32, JavaVersion, JavaPath) then
begin
Log(Format('Java %s 32-bit found in "%s"', [JavaVersion, JavaPath]));
end
else
begin
Log('No Java found');
end;
end;
Depending on which JRE you have installed, that registry data may not be there. A more generic solution is probably preferable.
I wanted something I could use across multiple Inno Setup projects, so I wrote a DLL for detecting Java details (home directory, etc.):
https://github.com/Bill-Stewart/JavaInfo
Download from here: https://github.com/Bill-Stewart/JavaInfo/releases
The download includes a sample Inno Setup .iss script that demonstrates how to use the DLL functions.

Exe - Embed JRE to a Standalone EXE? [duplicate]

I'm trying to install the most current platform (x64 or x86) appropriate Java Runtime Environment via Inno Setup (along with another application). I've found some script examples for how to detect the version and install if correct and adapted them to my needs but I keep running into this:
Unable to open file "path\to\JREInstall.exe":
CreateProcess failed: Code 5:
Access Is Denied
This is the code strictly responsible for installing the JRE:
[Setup]
AppName="JRE Setup"
AppVersion=0.1
DefaultDirName="JRE Setup"
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Files]
Source: "jre-8u11-windows-x64.exe"; DestDir: "{tmp}\JREInstall.exe"; \
Check: IsWin64 AND InstallJava();
Source: "jre-8u11-windows-i586.exe"; DestDir: "{tmp}\JREInstall.exe"; \
Check: (NOT IsWin64) AND InstallJava();
[Run]
Filename: "{tmp}\JREInstall.exe"; Parameters: "/s"; \
Flags: nowait postinstall runhidden runascurrentuser; Check: InstallJava()
[Code]
procedure DecodeVersion(verstr: String; var verint: array of Integer);
var
i,p: Integer; s: string;
begin
{ initialize array }
verint := [0,0,0,0];
i := 0;
while ((Length(verstr) > 0) and (i < 4)) do
begin
p := pos ('.', verstr);
if p > 0 then
begin
if p = 1 then s:= '0' else s:= Copy (verstr, 1, p - 1);
verint[i] := StrToInt(s);
i := i + 1;
verstr := Copy (verstr, p+1, Length(verstr));
end
else
begin
verint[i] := StrToInt (verstr);
verstr := '';
end;
end;
end;
function CompareVersion (ver1, ver2: String) : Integer;
var
verint1, verint2: array of Integer;
i: integer;
begin
SetArrayLength (verint1, 4);
DecodeVersion (ver1, verint1);
SetArrayLength (verint2, 4);
DecodeVersion (ver2, verint2);
Result := 0; i := 0;
while ((Result = 0) and ( i < 4 )) do
begin
if verint1[i] > verint2[i] then
Result := 1
else
if verint1[i] < verint2[i] then
Result := -1
else
Result := 0;
i := i + 1;
end;
end;
function InstallJava() : Boolean;
var
ErrCode: Integer;
JVer: String;
InstallJ: Boolean;
begin
RegQueryStringValue(
HKLM, 'SOFTWARE\JavaSoft\Java Runtime Environment', 'CurrentVersion', JVer);
InstallJ := true;
if Length( JVer ) > 0 then
begin
if CompareVersion(JVer, '1.8') >= 0 then
begin
InstallJ := false;
end;
end;
Result := InstallJ;
end;
In the full setup script the same message continues to come up.
How can I get the JRE Setup to run from this scripted setup file?
I was able to figure out the issue:
Evidently I was mistaken in my use of these lines:
Source: "jre-8u11-windows-x64.exe"; DestDir: "{tmp}\JREInstall.exe"; Check: IsWin64 AND InstallJava();
Source: "jre-8u11-windows-i586.exe"; DestDir: "{tmp}\JREInstall.exe"; Check: (NOT IsWin64) AND InstallJava();
and they should have been in place like so:
Source: "jre-8u11-windows-x64.exe"; DestDir: "{tmp}"; DestName: "JREInstall.exe"; Check: IsWin64 AND InstallJava();
Source: "jre-8u11-windows-i586.exe"; DestDir: "{tmp}"; DestName: "JREInstall.exe"; Check: (NOT IsWin64) AND InstallJava();
That seems to have solved the problem.
Also this line I was mistaken in:
Filename: "{tmp}\JREInstall.exe"; Parameters: "/s"; Flags: nowait postinstall runhidden runascurrentuser; Check: InstallJava()
It should have been:
Filename: "{tmp}\JREInstall.exe"; Parameters: "/s"; Flags: nowait runhidden runascurrentuser; Check: InstallJava()
This is the best solution my limited experience with this particular tool is able to come up with. I will look into the PrepareToInstall option when I have a chance but this works for now.
According to the initial question, "How do I install a JRE from an Inno script?", and taking as a starting solution the best proposed one, I propose a solution that I think works more coherently.
I understand that the user wants to install a JRE for their application if the target computer does not have installed a Java runtime environment or its version is lower than the required one. Ok, what I propose is to use the AfterInstall parameter and reorder a bit the distribution files in a different way.
We will first sort the files in the [Files] section in another way, putting first the redist install files.
Source: "redist\jre-8u121-windows-i586.exe"; DestDir: "{tmp}"; DestName: "JREInstaller.exe";\
Flags: deleteafterinstall; AfterInstall: RunJavaInstaller(); \
Check: (NOT IsWin64) AND InstallJava();
Source: "redist\jre-8u121-windows-x64.exe"; DestDir: "{tmp}"; DestName: "JREInstaller.exe"; \
Flags: deleteafterinstall; AfterInstall: RunJavaInstaller(); \
Check: IsWin64 AND InstallJava();
Source: "Myprog.exe"; DestDir: "{app}"; Flags: ignoreversion
The next step we must do is to modify the section [Run] as follows.
[Run]
Filename: "{app}\{#MyAppExeName}"; \
Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; \
Flags: nowait postinstall skipifsilent
And last but not least, we implemented in the [Code] section the RunJavaInstaller() procedure as follows:
[Code]
procedure RunJavaInstaller();
var
StatusText: string;
ResultCode: Integer;
Path, Parameters: string;
begin
Path := '{tmp}\JREInstaller.exe';
{ http://docs.oracle.com/javase/8/docs/technotes/guides/install/config.html#table_config_file_options }
Parameters := '/s INSTALL_SILENT=Enable REBOOT=Disable SPONSORS=Disable REMOVEOUTOFDATEJRES=1';
StatusText:= WizardForm.StatusLabel.Caption;
WizardForm.StatusLabel.Caption:='Installing the java runtime environment. Wait a moment ...';
WizardForm.ProgressGauge.Style := npbstMarquee;
try
if not Exec(ExpandConstant(Path), Parameters, '', SW_SHOW, ewWaitUntilTerminated, ResultCode) then
begin
{ we inform the user we couldn't install the JRE }
MsgBox('Java runtime environment install failed with error ' + IntToStr(ResultCode) +
'. Try installing it manually and try again to install MyProg.', mbError, MB_OK);
end;
finally
WizardForm.StatusLabel.Caption := StatusText;
WizardForm.ProgressGauge.Style := npbstNormal;
end;
end;
You may need to replace the Enabled value with 1 and the Disabled value with 0 if the Java runtime installer is not working properly. I have not experienced any problem doing it this way. Anyways, in the code you have a comment with the Oracle link if you want to take a look.
Finally, since unfortunately we can not receive the installation progress status of the JRE in any way, we show a message and a progress bar so that the user does not have the feeling that the installer has hung.
To do this, we save the state before, execute Exec with the flag ewWaitUntilTerminated, to wait for that installation to finish before continuing with ours, and we restore the previous state once the function execution has finished.

JNI code crash with core dump when throw is called under 64 bit

I'm working with java + c++ ( using JNI ) and i must load own native libraries but application failed with core dump when throw is called lthough the code is surrounded by an exception handler (see code below). It's the same code working without problem on linux 64bit, sparc 64bit and i386 32bit.
The problem occurred when trying to run an application under java 8 on intel SunOs.
The flag -m64 has been added to the Makefile and library was added to the LD_PRELOAD_64 and LD_LIBRARY_PATH_64 has been set correctly.
The java starting, successfully load library and run the native code (Java_com_jnetx_usw_chp_CHPMain_start) and crash on the throw:
INF:17:59:33.20:CHP main(27): CHPMain.run: ok load chp library. Start it...
NOT:17:59:33.22:CHP main(27): CHPMain.run: -> chp.start
Wed Nov 8 17:59:34 CHP::startTest : cycle = 1
Wed Nov 8 17:59:35 CHP::startTest : cycle = 2
Wed Nov 8 17:59:35 Try cause Exception...
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x0000000000012ab5, pid=10081, tid=0x0000000000000026
#
# JRE version: Java(TM) SE Runtime Environment (8.0_121-b13) (build 1.8.0_121-b13)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.121-b13 mixed mode solaris-amd64 compressed oops)
# Problematic frame:
# C 0x0000000000012ab5
#
# Core dump written. Default location: /home/kcc_64/x2001/bin/core or core.10081
#
# An error report file with more information is saved as:
# /home/kcc_64/x2001/bin/hs_err_pid10081.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
#
The native code
JNIEXPORT void JNICALL Java_com_jnetx_usw_chp_CHPMain_start
(JNIEnv *env, jobject jobj, jint trc_level,jobjectArray j_argv,jobject chp_main,jobject chp_smp)
{
chp = new CHP();
chp->startTest();
}
void CHP::startTest() {
int t = 1;
while (true) {
try {
poll(NULL, 0, 1000);
fprintf(stderr, "%s CHP::startTest : cycle = %d\n", getTime(), t++);
if ( 3 == t ) {
fprintf(stderr, "%s : Try generate Exception... \n", getTime());
throw 20;
}
}
catch (const int & e) {
fprintf(stderr, "%s : Catch, e = %d\n", getTime(), e);
break;
}
catch (...) {
fprintf(stderr, "%s : Catch unknown exception...\n", getTime());
break;
}
}
fprintf(stderr, "%s : CHP::startTest : End thread, exit\n", getTime());
}
Why the catch block is ignored and immediately we go to the system signal handler which ends with core dump (see pstack below)?
-bash-3.00$ uname -a
SunOS x2001 5.10 Generic_142910-17 i86pc i386 i86pc
-bash-3.00$ pstack core
-bash-3.00$ gcc --version
gcc (GCC) 4.4.2
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
pflags core
/38: flags = DETACH
sigmask = 0xfffffeff,0x0000ffff cursig = SIGABRT
pstack core
fffffd7fff291aea _lwp_kill () + a
fffffd7fff236c39 raise () + 19
fffffd7fff215bb0 abort () + 90
...
fffffd7ffe9d0343 JVM_handle_solaris_signal () + 8d7
fffffd7ffe9c8617 signalHandler () + 2f
fffffd7fff28c2e6 __sighndlr () + 6
fffffd7fff280bc2 call_user_handler () + 252
fffffd7fff280dee sigacthandler (b, fffffd7f7e2f5208, fffffd7f7e2f4ea0) + ee
--- called from signal handler with signal 11 (SIGSEGV) ---
0000000000013dd5 ???????? () + 28000d930d5
fffffd7fff2904d9 _SUNW_Unwind_RaiseException () + 46
fffffd7f7dea2c53 __cxa_throw () + 9b !!!!!!!!!
fffffd7f7f213310 _ZN3CHP9startTestEv () + 190
fffffd7fee215a14 * com/jnetx/usw/chp/CHPMain.start(I[Ljava/lang/String;Lcom/jnetx/usw/chp/CHPMain;Lcom/jnetx/usw/chp/CHPSmp;)V+0
fffffd7fee2083b6 * com/jnetx/usw/chp/CHPMain.run([Ljava/lang/String;Lcom/jnetx/usw/chp/CHPUpdateListener;)V+563 (line 377)
fffffd7fee2083b6 * com/jnetx/usw/chp/CHPProvider$1.run()V+20 (line 374)
fffffd7fee2007a7 * com/jnetx/usw/chp/CHPProvider$1.run()V+17760
fffffd7ffe4c10ff __1cJJavaCallsLcall_helper6FpnJJavaValue_pnMmethodHandle_pnRJavaCallArguments_pnGThread__v_ () + 8d7
fffffd7ffe4bcd3c __1cJJavaCallsMcall_virtual6FpnJJavaValue_nLKlassHandle_pnGSymbol_5pnRJavaCallArguments_pnGThread__v_ () + 424
fffffd7ffe4bd124 __1cJJavaCallsMcall_virtual6FpnJJavaValue_nGHandle_nLKlassHandle_pnGSymbol_6pnGThread__v_ () + 60
fffffd7ffe64030c __1cMthread_entry6FpnKJavaThread_pnGThread__v_ () + b8
fffffd7ffebd9679 __1cKJavaThreadDrun6M_v_ () + 5e1
fffffd7ffe9bdc85 java_start () + 175
fffffd7fff28bfbb _thr_setup () + 5b
fffffd7fff28c1e0 _lwp_start ()
The issue has been resolved:
There is a known issue with a slight mismatch in the ABI between these two (libgcc_s.so: _Unwind_RaiseException and Solaris libc.so: _Unwind_RaiseException). Binding symbols to the GCC runtime first causes it to be loaded before the Solaris runtime, and everything works out well. But, simply adding this explicitly to our shared library link line did not help anything.
so my simple workaround helped me:
LD_PRELOAD=/usr/sfw/lib/amd64/libgcc_s.so
The main reason has been in the version of gcc, i used 4.4, but fix has been made in 4.9 -
Mixing libc and libgcc_s unwinders on 64-bit Solaris 10+/x86 breaks EH
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788

Categories

Resources