ENIGMA Forums

Outsourcing saves money => Issues Help Desk => Topic started by: Hoohee on August 11, 2017, 01:27:19 am

Title: Are old versions of Java even SAFE?
Post by: Hoohee on August 11, 2017, 01:27:19 am
I know I sound pretty chicken, here, so let's just get this over with.

I am having compile errors when starting up Enigma; the Help page on this site says that could be because it will only work with Java 7.  Thus I followed the links to the the page that hosts the Java 7 download (http://www.oracle.com/technetwork/java/javase/archive-139210.html).  It warns:
Quote
WARNING: These older versions of the JRE and JDK are provided to help developers debug issues in older systems. They are not updated with the latest security patches and are not recommended for use in production.

For production use Oracle recommends downloading the latest JDK and JRE versions and allowing auto-update.

Only developers and Enterprise administrators should download these releases.

Which...kind of scares me.  I'm new to this, so to people who actually are up to speed on that, what's the risk from using older Java versions (mine is normally 8)?  What constitutes "use in production", and what bad things can happen from lack of the latest security patches?
Title: Re: Are old versions of Java even SAFE?
Post by: hpg678 on August 11, 2017, 04:53:43 am
Hi and welcome! Could you please give more details on your issue? What OS are you running,  is it 32bit or 64bit? Do you have all the dependecies installed? Are you in a virtual environment?

Your issue may not be a Java related matter but other elements resulting in a Java/Jre error, so the more information you provide, the better one can answer.

It is best to install Java/JRE  from the terminal/console on Linux platforms. Depending on the type Linux you have, you can type

sudo apt-get install default-jre

if it is UBUNTU, GNU/LINUX or one of its derivatives.

You can even follow this link   (https://www.digitalocean.com/community/tutorials/how-to-install-java-on-ubuntu-with-apt-get)for a more detailed method.




Title: Re: Are old versions of Java even SAFE?
Post by: Hoohee on August 12, 2017, 12:22:24 am
I'm using a PC with Windows 7 64-bit.  As to dependencies, I'm not sure.  My Java is 8.
Title: Re: Are old versions of Java even SAFE?
Post by: hpg678 on August 13, 2017, 02:36:05 pm
not sure if this is the type error you've been getting, but I got this:

http://imgur.com/ILSQL1O (http://imgur.com/ILSQL1O)


After intensive research it would appear you need to install a 32bit version of Java. you can refer to here (http://enigma-dev.org/docs/Wiki/Install:Parallel_Java)

for a detailed explanation.

Also check these two links

Link one (https://github.com/enigma-dev/enigma-dev/issues/782)

Link two (https://github.com/enigma-dev/lgmplugin/issues/17)

If you're successful, holler back.
Title: Re: Are old versions of Java even SAFE?
Post by: Hoohee on August 14, 2017, 07:16:06 pm
Holler!

Well; it's looking like I'm successful, since I haven't gotten the error this time, but I still need to make something to see if it runs.  Looking into that now.
Title: Re: Are old versions of Java even SAFE?
Post by: Hoohee on August 16, 2017, 12:48:41 am
Update: Sometimes it freezes when trying to run or debug its Java component, so I might need to update that after all.
Title: Re: Are old versions of Java even SAFE?
Post by: hpg678 on August 16, 2017, 01:20:09 pm
I've also ran into some problems on the Windows 7 platform. Mine involved first installation setup and first run. Strangely enough every Distro I tried to install on ended in errors. I'm wondering if this is some fault of late with the files or my machine. I'm not sure! it's something I'm still investigating.


Title: Re: Are old versions of Java even SAFE?
Post by: Hoohee on August 17, 2017, 01:05:51 am
Can someone here tell me which of these many, many Java 7 downloads I should download to run with Enigma? (http://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase7-521261.html)
Title: Re: Are old versions of Java even SAFE?
Post by: hpg678 on August 17, 2017, 06:35:25 pm

Although you are using Windows 7 64bit, you should use the 32bit version of Java so you must download this one:

Java SE Runtime Environment 7u80
Windows x86 Offline
28.14 MB 
Title: Re: Are old versions of Java even SAFE?
Post by: Hoohee on August 17, 2017, 11:08:19 pm
Thanks, but must I really go through that excessive process of providing personal information to sign up and download this thing?  Or is there another way?
Title: Re: Are old versions of Java even SAFE?
Post by: hpg678 on August 18, 2017, 07:30:23 am
Here is a link for you

https://www.dropbox.com/s/obe0syw6w6cgil0/Java%20Runtime%20Environment%201.7.0.1%20%2832-bit%29%20.exe?dl=0 (https://www.dropbox.com/s/obe0syw6w6cgil0/Java%20Runtime%20Environment%201.7.0.1%20%2832-bit%29%20.exe?dl=0)

Download and install.

Hope it works for you.
Title: Re: Are old versions of Java even SAFE?
Post by: Hoohee on August 18, 2017, 06:46:47 pm
So far it doesn't, but let's keep at it.  I get a "Stopped Working" error when I try to run the Java itself.  Maybe it's only supposed to run with Enigma, however, the instructions given (http://enigma-dev.org/docs/Wiki/Install:Parallel_Java) are rather cryptic to me.  It says,
Quote
If you decided to keep an alternative Java installation that is 64bit then you may need to explicitly state the 32bit version when launching ENIGMA. This can be easily done on Windows by changing the settings.ini value for the key IDECOMMAND to something like the following:
Code: [Select]
idecommand="C:\Program Files (x86)\Java\jre1.8.0_25\bin\java.exe -jar"

Well, I tried turning that into "Libraries\Documents\Enigma\ENIGMA\Java Runtime Environment 1.7.0.1 (32-bit)", because I didn't know what else to call it, and now Enigma won't even open.  What could be wrong here, in both cases?
Title: Re: Are old versions of Java even SAFE?
Post by: Hoohee on August 20, 2017, 01:45:27 pm
I reinstalled the settings file, so Enigma loads again.  I want to give you some insight into the problems I'm having, so maybe that will help you deduce what may be wrong.

The error I get when debugging a file:
Quote
In file included from SHELLmain.cpp:96:0:
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_resourcenames.h:461:9: error: expected '}' before numeric constant
   Level 1 = 2,
         ^
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_resourcenames.h:461:9: error: expected unqualified-id before numeric constant
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_resourcenames.h:469:3: error: expected declaration before '}' token
 };}
   ^
mingw32-make.exe[1]: Leaving directory `C:/Users/Tom/Documents/Enigma/ENIGMA/enigma-dev/ENIGMAsystem/SHELL'
mingw32-make.exe: *** [Game] Error 2

I'm going to assume it's still using my normal Java version, which might not work with LateralGM, although I was able to run a more simple game.  Either way, here's the details of the error I get when trying to run the Java file you told me to download (even in Administrator mode):
Quote
Problem signature:
  Problem Event Name:   APPCRASH
  Application Name:   Java Runtime Environment 1.7.0.1 (32-bit) .exe
  Application Version:   7.0.10.8
  Application Timestamp:   4e8990f6
  Fault Module Name:   ntdll.dll
  Fault Module Version:   6.1.7601.23864
  Fault Module Timestamp:   595fa490
  Exception Code:   c0000005
  Exception Offset:   0005205d
  OS Version:   6.1.7601.2.1.0.256.48
  Locale ID:   1033
  Additional Information 1:   0a9e
  Additional Information 2:   0a9e372d3b4ad19135b953a78882e789
  Additional Information 3:   0a9e
  Additional Information 4:   0a9e372d3b4ad19135b953a78882e789

Read our privacy statement online:
  http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409

If the online privacy statement is not available, please read our privacy statement offline:
  C:\Windows\system32\en-US\erofflps.txt

I hope that helps.
Title: Re: Are old versions of Java even SAFE?
Post by: hpg678 on August 21, 2017, 09:09:56 am
Having read your concerns, I built a machine from scratch to try and re-create the same problems you've been having. The machine I am working with is a Lenovo Thinkcentre M98 desktop system as it is the only computer I have with a 64bit CPU.

These are the procedures I took.
When I ran it and it went through its first installation process,then I got the error about the missing .dll file you mentioned about. Suffice to say after much trials and errors, what I did to get it finally working was thisWhen I tried to import a GM6 or one of my ENIGMA projects, I got that same APPCRASH error. However when I created a new project from scratch, it ran perfectly.  I should probably mention that I disabled and enabled some extensions.Usually in LINUX these are off by default. In Windows version, all except 'Directshow' is OFF. In other words, you may now have to play around with the configuration tool a bit.
Well that's all for now. I'm going to play around with it for a couple of weeks, so if any more problems, just let me know.
Title: Re: Are old versions of Java even SAFE?
Post by: hpg678 on August 21, 2017, 11:14:03 am

your problem seems to be a typo mistake ............[Level 1 = 2]

you probably meant to type

Level1 = 2 to signify the variable Level1, a variable has some constant value of 2
Title: Re: Are old versions of Java even SAFE?
Post by: Hoohee on August 21, 2017, 04:02:31 pm
Thank you for all these details, but in fact, I don't remember ever typing Level1 = 2.  Perhaps that is something that set on its own, but I'm not sure where to look for and fix that error, or why that would be in Preprocessor Environment as opposed to my game.

I, too, have been trying to transfer over a Game Maker file, albeit from 8 Pro.  I don't expect it to go seamlessly, but I'm hoping I can at least change the file enough that it can then be run and continued on Enigma; I'm just not sure what from GM needs to be cut out or corrected so it does, yet.

Also, upon inspection, Jave 8 is actually located in a folder of files from an older computer.  Does the bit about uninstalling it and installing the new one still apply?
Title: Re: Are old versions of Java even SAFE?
Post by: hpg678 on August 21, 2017, 06:59:01 pm
I suggest you do, to be on the safe side. I'll explain why.


After I had installed JRE7, I created 2 small projects, a Breakout game and video player to test the functions. I found out that my video project worked with Jre7 installed but didn't with Jre8 installed. With both installations, I had activated the 'DirectShow' extension in the configuration icon as it is need for video playback.


Another thing I also noticed is for the first time using ENIGMA for Windows, I was able to have dialog boxes. commands like show_info(); displaying message boxes and such actually worked. In the Linux version I have to circumvent and be a little creative to produce the same kind of effect.


But let's not stray away from the issue.


Uninstall all Java versions and start fresh. Download from the site I suggested, install Java 7 and edit the 'idecommand=......' line. then start up ENIGMA and move on from there.


As always if you have any more problems, I'll help you out as best as I can.

Title: Re: Are old versions of Java even SAFE?
Post by: Hoohee on August 21, 2017, 09:37:11 pm
I don't see an uninstall option anywhere on Java's controls.  Would simple deletion of files and folders be enough to uninstall it?
Title: Re: Are old versions of Java even SAFE?
Post by: hpg678 on August 22, 2017, 05:01:21 am
Go to 'Programs and Features' and uninstall from there. Uninstall all traces whether there be 7 or 8, then re-install JRE7.
Title: Re: Are old versions of Java even SAFE?
Post by: Hoohee on August 23, 2017, 01:03:45 am
That seems to have worked; thank you.  While we're here, though, how would you recommend solving that "Level 1" issue?
Title: Re: Are old versions of Java even SAFE?
Post by: hpg678 on August 23, 2017, 04:24:45 am

The error I get when debugging a file:
Quote
In file included from SHELLmain.cpp:96:0:
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_resourcenames.h:461:9: error: expected '}' before numeric constant
   Level 1 = 2,
         ^
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_resourcenames.h:461:9: error: expected unqualified-id before numeric constant
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_resourcenames.h:469:3: error: expected declaration before '}' token
 };}
   ^





i'm just speculating here, but that error seems centered around your named resources. These could be your Sprites names, Objects names or in  your Script code. You could try typing 'Level' or 'Level 1' in the 'SEARCH FOR RESOURCES' box in the top right corner and see what comes up. Then inspect all the places.mentioned.

Make sure to check all your variables are intact and the beginning and ending of your sub-routines ( the { and } all match up. Also look out for the '(' and ')'. Sometimes not closing them properly end up in errors too.

there's not much more I can suggest. if after doing all these you still get errors, send me a copy of your code and I'll try and figure it out for you.
Title: Re: Are old versions of Java even SAFE?
Post by: Hoohee on August 23, 2017, 03:42:51 pm
I ended up fixing it by replacing spaces with underscores.

Thanks for all the help; from here I will use new threads.
Title: Re: Are old versions of Java even SAFE?
Post by: hpg678 on August 23, 2017, 03:43:44 pm
Glad to of service!
Title: Re: Are old versions of Java even SAFE?
Post by: Hoohee on August 23, 2017, 04:11:29 pm
Actually, the Java still stops working on occasion.  I downloaded jre-7u51-windows-i586, if that helps.  There were a lot of 7 versions on FileHippo.
Title: Re: Are old versions of Java even SAFE?
Post by: hpg678 on August 23, 2017, 06:41:07 pm
sorry about that. I should've mention which one I used.

Download it from here (https://www.dropbox.com/s/obe0syw6w6cgil0/Java%20Runtime%20Environment%201.7.0.1%20%2832-bit%29%20.exe?dl=0)


Title: Re: Are old versions of Java even SAFE?
Post by: Hoohee on August 23, 2017, 09:25:00 pm
That is the version I dowloaded initially, and was unable to run.  It is still in my recycle bin, so I could give it another go, but please give me the exact text I should put in my settings file to call it to use.

Also remember, Java for this program sometimes works, sometimes stops working.  It's weird.
Title: Re: Are old versions of Java even SAFE?
Post by: hpg678 on August 24, 2017, 05:20:44 am
Don't use the one in the recycle bin. Apparently it is corrupted. Download the one from the new link.


I also did a little video on modifying the settings file. Download it from here (https://www.dropbox.com/s/eb1ftk8l2th10wu/Modifying%20Java%20path%20in%20settings%20file..mp4?dl=0)
Title: Re: Are old versions of Java even SAFE?
Post by: Hoohee on August 24, 2017, 10:31:52 pm
Not working, sadly.  Here are some questions:
1) Is the path in your video
Quote
"C:\Program Files (x86)\Java\jre7\bin\java.exe - jar -xm256m -xmxx1000m"
?  I'm checking because the text is kind of small, so I could have typed it wrong.
2) Are simple Java and Java Runtime Environment different things, and can they both be in one folder?  I seemed to still have some sort of Java program in that folder when I moved the new one in.
3) Are Admin locks on Java possibly the problem here?
Title: Re: Are old versions of Java even SAFE?
Post by: hpg678 on August 24, 2017, 11:28:57 pm
Java and JRE (Java Runtime Environment) are separate entities in that JDK is a complete suite of compilers, debuggers etc which include the JRE.


The Wiki says that one does not need to install the JDK but as you keep having problems with  the JRE, try installing the JDK and see if it  works.


 Download JDK from here (https://www.dropbox.com/s/iyhrkfndcbx88qc/jdk-8u144-windows-i586.exe?dl=0)


You can also install as an Administrator by right clicking on your mouse button and select 'Run as ADMINISTRATOR' when the dialog box appears. Take special note where the files will be installed. That will be you need to type when editing the 'idecommand'

Title: Re: Are old versions of Java even SAFE?
Post by: Hoohee on August 25, 2017, 12:40:38 am
OK, but is a Java 8 SDK compatible with a Java 7 runtime environment?
Title: Re: Are old versions of Java even SAFE?
Post by: hpg678 on August 25, 2017, 05:33:04 am
What we are trying to achieve is to make a JAVA environment work with ENIGMA. The JRE 7 cause problems so uninstall JRE 7 and install the JDK i recommended, which is 32bit version.


ENIGMA uses 32bit libraries so it makes sense to use a 32bit version of JAVA whether it be version 7 or 8. HOWEVER, because you state you are having problems with the one re-commended to use, (JRE 7),  then let's try an updated 32bit version.


On another note, when you run the video , double-click to put it in full screen so you can see it in full view.



Title: Re: Are old versions of Java even SAFE?
Post by: Hoohee on August 25, 2017, 10:59:10 pm
Okay; I installed it, but the settings text
Code: [Select]
idecommand="C:\Program Files (x86)\Java\jre1.8.0_144\bin\java.exe - jar -xms256m -xmxx1000m" doesn't work, for some reason.  Did I type something wrong?  Also, what is the purpose of the additional, more garbled text after the "java.exe" part?
Title: Re: Are old versions of Java even SAFE?
Post by: hpg678 on August 28, 2017, 03:26:06 pm
to answer your question about the extra text at the end, I can't say for certain, but I believe it represents a minimum and a maximum range of memory assigned to run the software. I don't think you actually need those extra parameters, so you can delete that part. Note that having installed JRE7, your modifications should be something like

idecommand="c:\Program Files (x86)\Java\JRE7\bin\java.exe -jar "


Now to the matter at hand. After reviewing everything we did, I built another machine, installed Windows 7 32bit version, installed all the updates, ENIGMA, etc.

Basically, I did everything done on the 64bit machine, compiled and ran an empty project.  Everything worked good at this point. However some source files/projects that worked before on my LINUX machine would not run on both machines. They loaded fine but when I went to run  them, they crashed.

All that were in [.gm6] format, I had no problems with. Others with the extensions [.gmk] and [.gmx] caused some problems.  I even had to go as far as re-write them, for them to work.

So what then does all of this mean? Well, you may not want to hear what I have to say, but your Windows OS may be corrupted. Run an Antivirus program to check for viruses and malware.

you could also try deleting your ENIGMA folder and re-installing it to the DESKTOP or your DOCUMENTS folder. the reason being that that they have ADMINISTRATIVE privileges, so you don't need to always 'Run as Administrator' any program you have there.

There's not much anything else I can recommend.  i was hoping that the other more experienced users would've joined in and offer suggestions but I guess they are busy with other things.

If you still encounter problems, still let me know. I'm still trying to figure this one out.

Title: Re: Are old versions of Java even SAFE?
Post by: Hoohee on August 28, 2017, 10:15:43 pm
Ultimately, it's Java 7 that flat-out doesn't work on my PC, for whatever reason, and it hasn't with any of the files I've downloaded since starting this. (Also, I did virus scan; nothing.) When I double-click the file itself, I get a "stopped working" error, and when I direct to it with the settings file, Enigma doesn't start.

When using Java 8, it works...sometimes.  Sometimes it crashes, though, and it doesn't run GM8 files correctly.  Whether it's supposed to run GM8 files when Jave is set up correctly, I'm not sure, as I haven't really read much documentation on how to port from GM to to Enigma.

It is my hope that as Enigma develops, more effort is put into helping it work with versions of Java that aren't outdated, since 7, which is supposed to be the opportune one, doesn't work for me.

Edit: Worth noting: Java 7 on my PZC has always been marked as rewarding admin permission, in a way 8 isn't.  I'm not sure why this is, but right-clicking Java 7 to run in Admin mode starts an installer, which then crashes with an error saying to contact the vendor.  Java 7 truly is the weakest link.
Title: Re: Are old versions of Java even SAFE?
Post by: hpg678 on August 29, 2017, 07:42:31 pm
it is unfortunate that Java 7 doesn't work for you........yet if Java 8 does, then by all means download a 32bit version and work on from there.

I usually work with the LINUX version as i am aspired to create LINUX games rather than WINDOWS or MAC. However for your sake, I wish you success in developing with ENIGMA.

I do realize than ENIGMA works far better in WINDOWS as far as GUI functions go as opposed to the LINUX version. It works more stable without any major problems depending on the type LINUX you have. Once you get it working, it's perfect.

It works good on UBUNTU 14 and most derivatives of UBUNTU 14. With the newer ones, not so much, mostly its touch and go. Also you can use Java 8 without any hitches.

You can save your projects in either GameMaker 6 up to Game Maker Studio 1.2 format.  Problems can occur from the DRAG & DROP coding. Which is why it is best to know GML/EDL.