The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,854 other subscribers

Archive for the ‘Java Platform’ Category

When the x86 Server JVM.DLL cannot be found

Posted by jpluimers on 2017/02/02

Searching for the below error message didn’t reveal useful results.

Error: missing `server' JVM at `C:\Program Files (x86)\Java\jre1.8.0_111\bin\server\jvm.dll'.
Please install or use the JRE or JDK that contains these missing components.

First the actual solution

[WayBackSetup Elasticsearch | Elasticsearch Reference [5.1] | Elastic provided this solution that was introduced in[WayBackSetup Elasticsearch | Elasticsearch Reference [5.0] | Elastic:

Elasticsearch ships with default configuration for running Elasticsearch on 64-bit server JVMs. If you are using a 32-bit client JVM, you must remove -server from jvm.options and if you are using any 32-bit JVM you should reconfigure the thread stack size from -Xss1m to -Xss320k.

I had a 32-bit JRE installation as browsers usually are 32-bit and that’s what my Java need originated from.

So I edited config\jvm.options with this change:

49a50,51
> ## see https://www.elastic.co/guide/en/elasticsearch/reference/current/setup.html
> ## prevent errors like Error: missing `server' JVM at `C:\Program Files (x86)\Java\jre1.8.0_111\bin\server\jvm.dll'.
51c53
< -server
---
> # -server

Note I left out the -Xss1m change out as that entry wasn’t present in config\jvm.options (which is odd, but hey: documentation is always behind on code).

In a server environment, I’d probably not run Elasticsearch on Windows but on Linux and there all my software is x64 so the error should not happen.

Solving the 2 gigabyte memory limit

Immediately after trying this, I got an error about memory size:

Error occurred during initialization of VM
Could not reserve enough space for 2097152KB object heap

The reason is that in the same config\jvm.options file, elasticsearch reserves 2 gigabyte of heap space which on either experimental or 32-bit systems is an enormous amount of memory. So I made this change:

22,23c22,25
< -Xms2g
< -Xmx2g
---
> #-Xms2g
> #-Xmx2g
> -Xms1g
> -Xmx1g

Back to my search

The search for elasticsearch “Error: missing server' JVM atC:\Program Files (x86)\Java\” only revealed one result [WayBackSearch Lucene – pointing to [Archive.is as WayBack fails to saveES 5.0 Alpha 3 error on starting up engine – Elasticsearch – Discuss the Elastic Stack with this content:

I have installed ES 5.0.0 Alpha 3 and try to start it up. However, it gives me the following result.

Error: missing `server' JVM at `C:\Program Files (x86)\Java\jre1.8.0_91\bin\server\jvm.dll'.
Please install or use the JRE or JDK that contains these missing components.

It didn’t happen to my another version of ES. Is there any errors for it?

12 DAYS LATER

Hi,

does this work now? This seems to be a problem with Oracle JRE on Windows. The respective page6says:

    jre\bin\server\
        On Microsoft Windows platforms, the JDK includes both
        the Java HotSpot(TM) Server VM and Java HotSpot Client VM.
        However, the Java SE Runtime Environment for Microsoft Windows
        platforms includes only the Java HotSpot Client VM. Those wishing
        to use the Java HotSpot Server VM with the Java SE Runtime
        Environment may copy the JDKs jre\bin\server folder to a 
        bin\server directory in the Java SE Runtime Environment. Software
        vendors may redistribute the Java HotSpot Server VM with their
        redistributions of the Java SE Runtime Environment.

I suggest you just install a JDK. Then you should be fine (or you use the workaround they suggest).

Daniel

Or directly from the [WayBackJRE 8 README:

      bin\server\       On Microsoft Windows platforms, the JDK includes both
                        the Java HotSpot™ Server VM and Java HotSpot 
                        Client VM. However, the Java SE Runtime Environment 
                        for Microsoft Windows platforms includes only the 
                        Java HotSpot Client VM. Those wishing to use the 
                        Java HotSpot Server VM with the Java SE Runtime
                        Environment may copy the JDK's jre\bin\server folder 
                        to a bin\server directory in the Java SE Runtime 
                        Environment. Software vendors may redistribute the 
                        Java HotSpot Server VM with their redistributions of 
                        the Java SE Runtime Environment.

–jeroen

Posted in Development, Java, Java Platform, Power User, Software Development | Leave a Comment »

fixing a Mac home `brew update` that has permission errors (after that I could install plantuml)

Posted by jpluimers on 2017/01/26

I had this occurring on my system:

RetinaMBPro1TB:~ jeroenp$ brew update
error: unable to unlink old 'Library/ENV/pkgconfig/10.11/libcurl.pc' (Permission denied)
error: unable to unlink old 'Library/ENV/pkgconfig/10.11/libxml-2.0.pc' (Permission denied)
error: unable to unlink old 'Library/ENV/pkgconfig/10.11/sqlite3.pc' (Permission denied)
To restore the stashed changes to /usr/local run:
  'cd /usr/local && git stash pop'
Already up-to-date.

This is how I solved it:

RetinaMBPro1TB:~ jeroenp$ ls -al /usr/local | grep -w Library
drwxr-xr-x+ 11 jeroenp  admin   374 Mar  9 19:33 Library
RetinaMBPro1TB:~ jeroenp$ sudo chown -R $USER /usr/local/Library/
Password:
RetinaMBPro1TB:~ jeroenp$ brew update
To restore the stashed changes to /usr/local run:
  'cd /usr/local && git stash pop'
Updated Homebrew from d32996d to 638d755.
==> New Formulae
...
==> Updated Formulae
...
==> Renamed Formulae
...
==> Deleted Formulae
...
RetinaMBPro1TB:~ jeroenp$ 

The above solution is based on major python problems · Issue #48301 · Homebrew/homebrew

After that, I could install plantuml (which requires java, just so you know) so now I can create SVGs from it locally:

plantuml -tsvg PSO.network-diagram.PlantUML.txt

Note I had to edit the formula so it installs plantuml-8037 or higher (the git version back then installed plantuml-8031) as it fixed a namespace bug. Since plantuml releases often, be prepared to do some version fiddling.

–jeroen

Posted in *nix, *nix-tools, Apple, Development, Diagram, Home brew / homebrew, Java, Java Platform, Mac, Mac OS X / OS X / MacOS, Mac OS X 10.5 Leopard, Mac OS X 10.6 Snow Leopard, MacBook, MacBook Retina, MacBook-Air, MacBook-Pro, MacMini, OS X 10.10 Yosemite, OS X 10.8 Mountain Lion, OS X 10.9 Mavericks, PlantUML, Power User, Software Development, UML | Leave a Comment »

Java is not slow – Programmer’s Life : Programmer’s Life

Posted by jpluimers on 2017/01/05

(:

string sender;
sender = "Duda Nogueira";
Programmer: Come on, stop that crap that Java is slow...
Programmer: Wait, I’ll show you my code to prove that Java is not slow. You’ll see it...
Programmer: Wait, the IDE is starting...
Programmer: Just a moment... It’s almost done...
Programmer: Just a little bit... You’ll see how fast it is...
Alex: zzzzzzzz—
T-shirt: Just wait and get a coffee

Source: Java is not slow – Programmer’s Life : Programmer’s Life

Posted in Development, Fun, Java, Java Platform, Software Development | Leave a Comment »

Unbundling Pokémon Go — Applidium

Posted by jpluimers on 2016/11/30

On the reverse engineering of an early Pokemon Go apk, the protocol it uses and some more interesting findings: Unbundling Pokémon Go — Applidium

–jeroen

Posted in Android, Development, Java, Java Platform, Mobile Development, Software Development | Leave a Comment »

JavaScript is not Java – A humorous comparison of JavaScript and Java.

Posted by jpluimers on 2016/06/23

Yesterday I told:

Recently I did my very first JavaScript in HTML development. Since it was a one page experiment, I didn’t want to put it in an official repository of it’s own…

which reminded me of JavaScript is not Java – A humorous comparison of JavaScript and Java.

And still lots of uneducated people think they are the same, for instance the NBC Chicago publishes this at the start of the year:

Java Developer; What they do: Program websites using JavaScript.

Java Developer; What they do: Program websites using JavaScript.

They fixed it later but then the harm was already done (besides making a lot of fun of themselves and others making fun out of them too):

Java Developer; What they do: Write programs used by mobile devices, websites and mainframes.

Source: Report Reveals 10 Most In-Demand Jobs in Chicago for 2016 | NBC Chicago

–jeroen

Posted in Development, Java, Java Platform, JavaScript/ECMAScript, Scripting, Software Development | Leave a Comment »

Registry trick now fails to work for the Yahoo Search Engine update in Java 8 – was: Registry keys to prevent Java installs from adding sponsors (Ask/Google/Yahoo Toolbar, McAfee virus, etc) via: Super User

Posted by jpluimers on 2016/01/20

Anyone who knows a trick to prevent Java 8 from installing the Yahoo search/toolbar in Chrome and Internet Explorer?

This trick used to work in the past, but fails as of Java 8:


Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft]
"SPONSORS"="DISABLE"
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\JavaSoft]
"SPONSORS"="DISABLE"
; http://windowsitpro.com/windows-server/how-do-i-place-comments-reg-file
; a semi-colon starts a comment line
; http://superuser.com/questions/549028/how-can-i-prevent-ask-com-toolbar-from-being-installed-every-time-java-is-update/562869#562869
; this switch not only disables the Ask.com toolbar installation and prompt, but disables all of the sponsors potentially bundled with the Auto-update setup/Online setup (Google toolbar, Yahoo toolbar, McAfee something, etc…)

–jeroen

The old trick from Registry keys to prevent Java installs from adding sponsors (Ask/Google/Yahoo Toolbar, McAfee virus, etc) via: Super User « The Wiert Corner – irregular stream of stuff

Posted in Development, Java, Java Platform, Power User, Software Development, Windows, Windows XP | Leave a Comment »

Jon Skeet’s speech “Back to basics” is really a good watch – via Jørn Einar Angeltveit G+

Posted by jpluimers on 2015/07/15

Thanks [Wayback] Jørn Einar Angeltveit for sharing this a while ago:

A session by Jon Skeet and Tony the Pony (which has strong teeth) presented during the Polish DevDay 2013 in Kraków, Poland.

[Wayback] +Jon Skeet’s speech [Wayback] “Back to basics” is really a good watch.

In a funny way, he explains why the simplest fundamentals of computer software text, dates and numbers can cause some real headache for the programmer…

In case you didn’t know: Jon Skeet is “Chuck Norris” on [Wayback] stackoverflow.com:

The subtitle is “the mess we’ve made of our fundamental data types”.

Some of the topics covered:

Read the rest of this entry »

Posted in .NET, C#, Conference Topics, Conferences, Delphi, Development, Encoding, Event, internatiolanization (i18n) and localization (l10), Java, Java Platform, Jon Skeet, Pascal, Scripting, Software Development, Unicode | 2 Comments »

Scala programming language and Venkat Subramaniam videos

Posted by jpluimers on 2015/06/30

A long while ago, someone (it was too long ago, so I sincerely forgot who, it probably was in the JBuilder era) told me that I should try out Ruby and Scala.

I did take a short look at Ruby back then, but since Ruby was so focussed on Web Development, and my heart really wasn’t there, postponed it to the times that the Web would be hot for me.

Then I should have taken a look at Scala (which compiles to Java bytecode), but since I abandoned Java (JBuilder wasn’t nice, Java programming was slow and modern IDEs like IntelliJ IDEA and Eclipse weren’t there yet).

Now that I’ve done truckloads of work in the .NET and Delphi world (including domain specific languages and Pascal based products), I bumped into these Scala videos by Venkat Subramaniam:

Boy, I should have taken a look earlier: like Delphi and C# it is a statically typed compiled language, but it is on steroids.

Yes, I know it leans on the Java bytecode as a run-time platform, but so does the Android SDK as one of the Java Platforms. Contrary Ruby, which with IronRuby runs on .NET and RubyMotion runs Mac and iOS, Scala does not run on the .NET platform any more.

Given the witty way of presenting I’m surely going to follow Venkat Subramaniam and watch some of his other videos too.

Shortly after watching the above I bumped into this video by Steve Yegge (Google): Dynamic Languages Strike Back – YouTube.

–jeroen

Posted in .NET, C#, Delphi, Development, Java, Java Platform, Ruby, Scala, Software Development | 3 Comments »

Coding Kata videos: Bowling game

Posted by jpluimers on 2015/04/22

A long and shorter while ago, I wrote about practicing your coding and test driven development skills:

Here are some Coding Kata videos of the Bowling Game Kata in various languages and environments. Some of them are dumb (no audio) just like good practice usually is. Note: it helps to know a bit about 10 Pin Bowling Scoring rules.

And since I want to learn Haskell and have done a lot of Tic-Tac-Toe demos inthe past:

For more background information:

–jeroen

Posted in .NET, C#, C# 1.0, C# 2.0, C# 3.0, C# 4.0, C# 5.0, C# 6 (Roslyn), Development, Java, Python, RemObjects C#, Ruby, Software Development | Leave a Comment »

CodeInspect says “Hello World”: A new Reverse-Engineering Tool for Android and Java Bytecode – via: Secure Software Engineering

Posted by jpluimers on 2015/01/29

Thanks  for mentioning this, so it got on my research list:

a new reverse-engineering framework that works on the intermediate representation Jimple and supports all the features above and a lot more.

CodeInspect supports as input format a complete Android Application Package (apk), just the Android bytecode (dex-file) or a jar-file.

In the following we will describe the different features based on a malicious Android apk.

The figure above is a screenshot of CodeInspect. As one can see, CodeInspect is based on the Eclipse RCP framework

–jeroen

via: CodeInspect says “Hello World”: A new Reverse-Engineering Tool for Android and Java Bytecode | Secure Software Engineering.

Read the rest of this entry »

Posted in Android, Development, Java, Java Platform, Mobile Development, Software Development | Leave a Comment »