KMatle Expert Licensed User Longtime User Dec 6, 2015 #1 Maybe I'm getting old (and I missed something), but.. Adding the jHttputils2 lib does not work. Submitting a job (Download2) gives Code: Copy java.lang.IllegalStateException: Toolkit not initialized Using the code modules instead works fine. What did I miss here?
Maybe I'm getting old (and I missed something), but.. Adding the jHttputils2 lib does not work. Submitting a job (Download2) gives Code: Copy java.lang.IllegalStateException: Toolkit not initialized Using the code modules instead works fine. What did I miss here?
rwblinn Well-Known Member Licensed User Longtime User Dec 6, 2015 #2 Hi, as building a Non-UI application, you can not use jHttputils2 lib as it is JavaFx based. Use instead the code modules httpjob and httputils2service. See attached example. Attachments B4JHowToNonUIHTTP.zip B4JHowToNonUIHTTP.zip 10.8 KB · Views: 741 Upvote 0
Hi, as building a Non-UI application, you can not use jHttputils2 lib as it is JavaFx based. Use instead the code modules httpjob and httputils2service. See attached example.
KMatle Expert Licensed User Longtime User Dec 6, 2015 #3 rwblinn said: you can not use jHttputils2 lib as it is JavaFx based Click to expand... Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Dec 7, 2015 #4 If you go over the source code you will see that it uses the UI compiler directive to exclude the problematic sub: Code: Copy #If UI 'Returns the response as a bitmap Public Sub GetBitmap As Image Dim b As Image b = fx.LoadImage(HttpUtils2Service.TempFolder, taskId) Return b End Sub #End If The compiled jHttpUtils2 library was compiled from a UI project so it can only work with a UI project. Upvote 0
If you go over the source code you will see that it uses the UI compiler directive to exclude the problematic sub: Code: Copy #If UI 'Returns the response as a bitmap Public Sub GetBitmap As Image Dim b As Image b = fx.LoadImage(HttpUtils2Service.TempFolder, taskId) Return b End Sub #End If The compiled jHttpUtils2 library was compiled from a UI project so it can only work with a UI project.
JakeBullet70 Well-Known Member Licensed User Longtime User Jun 16, 2016 #5 KMatle said: Maybe I'm getting old (and I missed something), but.. Click to expand... You and me both. Upvote 0
KMatle said: Maybe I'm getting old (and I missed something), but.. Click to expand... You and me both.
Erel B4X founder Staff member Licensed User Longtime User Jun 16, 2016 #6 You should use jOkHttpUtils2_NONUI library. Upvote 0