-1

I want to run Siemens LOGO Soft Comfort.

dell@dell-Precision-M6400:~/Hämtningar/Logo 6.1/Linux/tools/Application$ ./LOGOComfort 
Unrecognized option: -Xincgc
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
dell@dell-Precision-M6400:~/Hämtningar/Logo 6.1/Linux/tools/Application$ 

This is Siemens LOGO soft comfort 6.1 and I have a license for that. But I have an issue.

Unrecognized option: -Xincgc

So how can I do so latest Java LTS 11 can work with Java from 2008? I assume that is Java SE 6 or J2SE 5.0.

With LOGO software, it comes with two folders bin and lib

enter image description here

enter image description here

Update:

I removed the -Xincgc in LOGOComfort.lax file and now I got this

dell@dell-Precision-M6400:~/Hämtningar/Logo 6.1/Linux/tools/Application$ ./LOGOComfort 
Invocation of this Java Application has caused an InvocationTargetException. This application will now exit. (LAX)

Stack Trace:
java.lang.NoClassDefFoundError: com/sun/java/swing/plaf/windows/WindowsLookAndFeel
    at java.base/java.lang.ClassLoader.defineClass1(Native Method)
    at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
    at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
    at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:800)
    at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:698)
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:621)
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:579)
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
    at DE.siemens.ad.logo.app.Application.<clinit>(Application.java:141)
    at Start.startApplication(Start.java:570)
    at Start.main(Start.java:553)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at com.zerog.lax.LAX.launch(DashoA8113)
    at com.zerog.lax.LAX.main(DashoA8113)
Caused by: java.lang.ClassNotFoundException: com.sun.java.swing.plaf.windows.WindowsLookAndFeel
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
    ... 18 more
This Application has Unexpectedly Quit: Invocation of this Java Application has caused an InvocationTargetException. This application will now exit. (LAX)
dell@dell-Precision-M6400:~/Hämtningar/Logo 6.1/Linux/tools/Application$ 

Update:

Solution:

  1. Remove -Xincgc
  2. Use Java 8 instead. It requries Swing. Java 11 does not use Swing
euraad
  • 2,467
  • 5
  • 30
  • 51
  • Why you don't install an old java version? You can easily have many java versions on the same physical machine. – Davide Lorenzo MARINO Sep 04 '20 at 11:38
  • `LOGOComfort` is likely a shell script, so edit the script and remove the offending option. – Andreas Sep 04 '20 at 11:39
  • As there is a folder named "Applet" - if you want to run applets, you will need an ancient browser version or a dedicated applet-viewer (such as the one that came with old versions of the JDK) – Hulk Sep 04 '20 at 11:42
  • @Andreas "Xincgc" did not exist in `LOGOComfort` – euraad Sep 04 '20 at 11:43
  • Is there a way to search for `-Xincgc` in linux shell terminal? – euraad Sep 04 '20 at 11:43
  • Yes, and you'd know that if you did a web search: [`search for text in files in linux shell terminal`](https://www.google.com/search?q=search+for+text+in+files+in+linux+shell+terminal) – Andreas Sep 04 '20 at 11:44
  • @Andreas I found `-Xincgc` now in `LOGOComfort.lax` file. I removed it and got this as above. – euraad Sep 04 '20 at 11:46
  • Wonder why code running on Linux is trying to use a Windows-only class like `WindowsLookAndFeel`. Seems you need to install an older version of Java, i.e. a version that the Logo is compatible with. Or upgrade to a newer Logo version. – Andreas Sep 04 '20 at 11:51
  • @Andreas You're rigth. I will think that I will install Java 6. But do I need to remove Java 11 then? – euraad Sep 04 '20 at 11:54
  • @DanielMårtensson no need to remove the newer version - Java versions can coexist just fine. You'll have to specify the path to the one you want to use explicitly, however. – Hulk Sep 04 '20 at 13:03
  • Thank you the incredible @Hulk – euraad Sep 04 '20 at 13:08

3 Answers3

3

open the file 'LOGOComfort', as it is likely a shell script. Find the -Xincgc option and remove it.

If it's gobbledygook, install a java6, which does have the now removed -Xincgc option.

If that's not an option, make a fake java: Make a script that rests at the 'real' java location, and all it does is scan for all command line args, strip -Xincgc from it, and pass the rest through unmolested to the real java. This is a crazy hack and is likely to break other things, but it will probably 'fix' this. I strongly recommend you go with one of the first 2 options first.

There is no way to tell java 11+: Can you 'support' the -Xincgc option.

rzwitserloot
  • 85,357
  • 5
  • 51
  • 72
2

The error message is saying that it can't find the look and feel profile associated with Windows.

java.lang.NoClassDefFoundError: com/sun/java/swing/plaf/windows/WindowsLookAndFeel

Clearly, this app was intended for Windows in the past. Maybe the script changes the look and feel profile, but I couldn't tell you without looking at it.

Best bet is try this on a Windows machine and see if it goes any further. If not then you'll have to try it with an older JRE that supports that, such as JRE 6.

Setherith
  • 329
  • 2
  • 10
1

I know this is a old question, but I still have a solution that may work (it worked for me). You need to make the application java executable by

chmod a+x $PATH_TO_LOGO/Application_64/jre/bin/java
mixikaabin
  • 11
  • 1