JSmooth Java 1.4 or above not found error - java

I have installed JSmooth. My computer has JDK 1.7 & JRE 1.7. but it says need java 1.4 or above to open & try to download. Why is that ??

You need to set the JAVA_HOME environment variable to your JDK or JRE base path, e.g. C:\Program Files\Java\jdk1.8.0_91. For this, go to Control Panel -> Advanced System Settings -> Advanced -> Environment Variables -> System Variables -> New.
I was initially confused by the same problem because java and javac were working on the command line so I thought all variables were set up but JAVA_HOME does not seem to be set by default when installing a JDK.

From the JSmooth documentation
Something goes wrong at launch-time, and the wrapper won't start my java application. How can I investigate?
The first thing to do, is to run the wrapper with the additional argument -JskelDebug=1 (the option is case-sensitive). This will start the wrapper in debug mode, displaying a console (or using the current one, for the console wrapper), and output many useful information.

I was also in the same problem for a whole night. I installed JVM again, JSmooth again, didn't happened any thing... Then I downloaded and installed this and suddenly it recognized JVM. I guess, to access JVM, this app need Microsoft VM... a rough guess though!

Related

Unable to change Java Version in windows

Previously I am using Java 1.8 in my machine. But now i need to use Java 1.6. So I changed the below values in system environment variables.
JAVA_HOME
U:\POC\jdk1.6.0_31
PATH
U:\POC\jdk1.6.0_31\bin\ or %JAVA_HOME%/bin
Also I restarted my system
Even after that it is displaying java version as 1.8 in my command prompt.
Can anyone advice on how to resolve this issue?
when latest version is installed in system it automatically set javapath in environment variable like "C:\ProgramData\Oracle\java\javapath".
Remove this from environment variables.
This suggestion may seem obvious, but I urge you to carefully consider this advice.
I have encountered this issue before, and frequently, it has been due to an overlooked entry within the long list of items making up the Windows Path. It is often an path entry where it is not immediately obvious that any of the java executables (javaw.exe, javaw.exe or javaws.exe) may reside. A common culprit is C:\ProgramData\Oracle\Java\javapath
You will therefore need to push upwards, your desired java/bin path above these. If in doubt, push it right to the top!
In the unlikely event that this does not work, then try making changes from within the java admin console (Control Panel --> Java --> Java tab --> View Button).
I've not used Windows in a long time but I remember that there are 2 sections of environment variables. One system scope, and the other user scope.
Check that nothing in the system scope is defining a JAVA_HOME.
Like #Stephen C said, post the output of echo %PATH% and echo %JAVA_HOME%.
Check that nothing comes before %JAVA_HOME%/bin in the path that may contain the java executable. Things like Oracle client come with Java. You can always put %JAVA_HOME%/bin in front of the path instead of at the end.
#David Santiago's answer is a bad idea. If you let the IDE do your job, you won't be able to troubleshoot when there is a problem.
I recently ran into this as I have added in JAVA 9, 11, and 17 along with my previous JAVA 6, and 8 versions.
I incorrectly assumed that env variables hadn't changed with the newer releases, but I was obviously wrong.
When I ran java -version it returned JAVA 9 and javac -version returned JAVA 17.
So, I incorrectly tried to add a %JAVA_HOME% variable, as I had always done in pre-JAVA 8 versions under the Windows Environment Settings. However, despite moving that addition to the front of the PATH, it didn't change anything!
This article explains the issue: Java SE 8 Update 171 Uses Different Windows Path (Doc ID 2412304.1), however it doesn't give any solutions.
The path to this Windows folder is:
C:\ProgramData\Oracle\Java\javapath
Notice it is under a ProgramData folder, not Program Files. Moreover, it has been prepended to PATH under the Windows env settings. This folder is where java has 3 symbolic links set that will override the PATH changes you make and sure enough it was pointing to the JAVA versions I returned from -version on java and javac. Even if I tried to set a JAVA_HOME as the first entry in path, it still didn't work!
I found two solutions here at: JDK 8 and C:\ProgramData\Oracle\Java\javapath
How to switch JDK version in cmd more flexibly You can either prepend
your own directory to the PATH to overwrite the Oracle one, or follow
the convention to append to the end of PATH variable like always did.
I prefer the second one, here is how to do it.
The second solution uses two batch files with a env variable JAVA_HOME setting similar to what I had always used.
The system displays the latest version installed on the system.
That's informative only, that should not worry you.
If you are going to use version 6.0_31 of the Java JDK you only have to configure that in your IDE (Eclipse, Netbeans, IntelliJ IDEA, whatever) to compile using that version.
Example
On command prompt use these commands to set envirnment variables
JAVA_HOME=C:\Program Files\Java\jdk-11.0.17
set PATH=%JAVA_HOME%\bin;%PATH%

I downloaded Eclipse IDE for my developments and throws back this [duplicate]

I recently decided to start trying Android app development, so I downloaded the Java SE Development Kit 8 (x86) for Windows (I got Windows 8 64bit, but my guide recommends getting the 32bit one), the Android SDK, and the Eclipse IDE for Java Developers (x86).
However, my Eclipse won't launch when I double click eclipse.exe! Instead, I get the following error message:
I tried adding Java to my Path variable in my Environment variables as suggested in some of the solutions I looked up, but it still doesn't launch properly.
Anyone know what else I can try? Also, if possible, please do not use super-technical vocabulary as I'm new to these kinds of stuff and will not understand you...thank you haha :D
I had the same issue and was trying to install different versions of JDK: 1.6, 1.7, 1.8.
It didn't help much.
The problem was resolved when I changed PATH variable by removing
C:\ProgramData\Oracle\Java\javapath;
In command prompt I also ran following commands:
set JAVA_HOME=C:\Program Files\Java\jdk1.8.0_25
set PATH=C:\Program Files\Java\jdk1.8.0_25\bin;%PATH%
But I think the most important was to remove C:\ProgramData\Oracle\Java\javapath; from the PATH.
I know exactly how to solve your problem. Go to search and put in environment, a prompt will come up and ask you to "Edit environmental variables for your account" click that and a window will pop up. There will be the current paths which are running on the top (you should have your JDK version running, mine is 1.8) and on the bottom part there will be paths to choose from. Select (on the bottom part) the java path and delete it, then click okay. This should work.
If it didn't work, You may also add a new path to the java bin folder which worked for me.
Here is an alternative:
As described here, make sure that you have the -vm option set in your eclipse.ini file.
It must be an absolute path and on 2 separate lines:
-vm
<Absolute Path>\javaw.exe
Save your .ini and relaunch Eclipse
One line answer, remove 'C:\ProgramData\Oracle\Java\javapath;' from your path variable. It will start to work.
Most errors with starting eclipse happen due to multiple JRE or JDK version which makes the installer go nuts.
Solution: Go to Control Panel -> Uninstall Programs
If you're running 64-bit java, then uninstall all Java without the 64bit indicator. If 32-bit, then uninstall all that have 64-bit
It works like magic!
What worked for me was having installed adoptopenjdk11 using Chocolatey package manager:
choco install adoptopenjdk11

Unsupported Java Version: Cannot start under Java 1.7: Java 1.8 or later is required

I just updated to IntelliJ IDEA 16 which comes with Java JDK 1.8. Fyi, I had downloaded Java JDK 1.8 a long time ago.
I tried to run my plugin that I am developing, and I cannot even do that, I get the following error message (slightly condensed)
"C:\Program Files\Java\jdk1.7.0_45\bin\java" -Xmx512m -Xms256m -XX:MaxPermSize=250m -ea "-Xbootclasspath/a:C:/Program Files (x86)/JetBrains/IntelliJ IDEA Community Edition 144.3143.6\lib\boot.jar" -Didea.config.path=C:\Users\Christopher.IdeaIC14\system\plugins-sandbox\config - ... -Dfile.encoding=windows-1252 -classpath "C:\Program Files\Java\jdk1.7.0_45\lib\tools.jar; ... ;C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 144.3143.6\lib\idea_rt.jar" com.intellij.rt.execution.application.AppMain com.intellij.idea.Main
Unsupported Java Version: Cannot start under Java 1.7.0_45-b18: Java 1.8 or later is required.
So, I clearly know what the problem is; however, I cannot seem to figure out where the location to fix this is.
I have tried a lot of things so far; most involve using the search box in Settings and switching whatever I could to version 1.8. Also, I had updated my Environment Variable for Java from 1.6 to 1.8
With all of these changes, nothing is working! So how do I go about fixing this seemingly simple issue?
Set IDEA_JDK (or IDEA_JDK_64) environment variable.
Check Selecting the JDK version the IDE will run under
TL;DR --> Set JAVA_HOME to C:\Program Files\Java\jdk1.8.0_51
Java 8 is required to run IntelliJ IDEA starting from version 16 on all the supported platforms.
The actual JDK version used by the IDE can be verified in Help | About dialog (open any project to access the menu).
idea64.exe uses this JDK search in the following sequence:
IDEA_JDK_64 environment variable
..\jre64 directory
system Registry
JDK_HOME environment variable
JAVA_HOME environment variable
Under Arch Linux you can simply set java 8 as default (you must have it installed):
$ sudo archlinux-java set java-8-openjdk
In case anyone arrives here and hasn't had any luck with the other solutions, try this. I'm using PhpStorm under OSX, but the steps are probably applicable to JetBrains' other IDEs too:
Navigate to your IDE's config folder (see this article to learn how to find this folder's location).
Open the idea.propeties file.
If a JVMVersion attribute exists, delete that entire entry. If it doesn't exist, then this probably won't be of much help!
Save the file.
Launch your IDE.
Just set JAVA_HOME system variable to your JDK 8:
Run in cmd
setx JAVA_HOME "C:\Program Files\Java\jdk1.8.0_111"
don't foget to change to your java path
In my case, Ubuntu 14 (32-bit), I opened the file:
/home/<user>/Programs/PhpStorm/bin/phpstorm.sh
and after
if [ "$JDK" = "" ] && [ "$OS_TYPE" = "Linux" ] && ........... fi
I added:
if [ "$JDK" = "" ]; then
JDK="/usr/lib/jvm/java-8-oracle"
fi
And then it works!
Double check that your JAVA_HOME points to the correct 1.8 Installation and make sure that in the PATH env there is no reference to "C:\Program Files\Java\jdk1.7.0_45\bin".
Try to print your JAVA_HOME/PATH from the Console and see what the output is. If your changes are not reflected logout and then login again.
IntelliJ 16 REQUIRES Java 8 to run, it won't run under Java 7. It's compiled to Java 8 classes so it can't ever be run on an older JVM.
This is well and clearly mentioned in the documentation.
So if you have your system JVM be an older one, it will fail to start unless you coerce it into using a non-default JVM.
Possibly you have some java related executables left over in your Windows/System32 directory, where some older Java installers would drop them. Delete these by hand from the file system and see what happens.
Just in case this page needs one more recommendation, I fixed the problem in my case by going to the IDE's config folder (as #Nate puts it, see here for how to locate it), and deleting the idea.jdk file (which held a reference to a 1.6 VM).
Apart from setting the correct Java version for the global, per project and per module SDK, for the Java Compiler, and for the language level, you also must set the Target bytecode version both for the project and (if you use maven) for each maven module.
Often the project bytecode version is correct but the module bytecode version is lower, i.e. 1.5.
The per-module bytecode version is not displayed when opening the default preferences via File > Other Settings > Default Settings. You must edit the current preferences either via a shortcut (i.e. ⌘+,) or from the main menu as shown below (for mac):
I had the same problem. All paths pointing to java jdk 8, but still throwing the error. I was able to run Android Studio by running the "studio64.exe" instead "studio.exe" in the bin folder

Change default java installation

I have many Java versions installed on a Windows 7 machine. Some of them are 32 bits, some are 64 bits. Now as default it starts one of those last versions (1.7 64 bits). How do I tell my Windows 7 machine to use another version of Java? One of the reasons is that I'm developing a JNI project from Microsoft Visual Studio C++ - it uses also java 1.7 64 bits.
Best regards,
Andrej
I have set:
User variable:
JAVA_HOME=C:\j2sdk1.4.2_04
PATH=%JAVA_HOME%\bin;%PATH%
and system variable:
JAVA_HOME=C:\j2sdk1.4.2_04
PATH=...a_lot_of_paths...;%JAVA_HOME%\bin;%PATH%
I had no idea which is better to set - for user or system settings. Done both.
System restart.
And...it didn't helped :(
When I run "java -version" from cmd i have java 1.7, but not java 1.4 like defined in PATH.
after run C:>where java
I got two results:
C:\Windows\System32\java.exe
C:\j2sdk1.4.2_04\bin\java.exe
Who let Java go to my windows directory ???!!!
How to deal with that?
Set JAVA_HOME:
JAVA_HOME="c:\path\to\jdk"
Set PATH:
PATH=%JAVA_HOME%\bin;%PATH%
Also, you might want to have a look at the Control Panel where there is a Java Settings/Java Control Panel and you can also set the default from there, but this will only be valid for use from your browsers, if I recall correctly.
You will also most-likely need to restart.
Try setting the JAVA_HOME environment variable. It might help but I'm not sure if Microsoft Visual studio respects it.
JAVA_HOME should be set to the directory where the JRE/JDK you want to use is located.
You can find path to java tools (javac, java, javaw etc.) in your PATHvariable. So you can edit your PATH variable to use different java versions. If you use something additional (like application servers) you should check documentation and set appropriate system variables (JAVA_HOME etc.)
maybe try:
set JAVA_HOME=C:\jdk1.6.0u24
set PATH=%JAVA_HOME%\bin;%PATH%
and see those topics:
JRE installation directory in Windows
unix "which java" equivalent command on windows?
The answer from #carlspring is correct if you want to set your default Java configuration that will affect all applications that are running on your Windows 7 box, but I don't belive this is what you are asking for.
If you require Visual Studio to use a different JDK from the one used by default, then you will have to configure this separately for Visual Studio.
Set this by editing VCVARS32.BAT (usually found in C:\Program Files\Microsoft Visual Studio\VC98\Bin) and adding a line like this...
set PATH=C:\\Java\\jdk1.6.0_03\\bin;%PATH%
...then you're telling VS to use this older JDK than it would by default.
Further reading : MSDN Setting the Path and Environment Variables for Command-Line Builds
Go to your control Panel, and open classic view, Click Java to bring up the Java Control Panel, Click the Java Tab and Click the view button. it will show you every java Runtime environment that is visible on your Computer, you can then enable and disable the other ones leaving only the one that you want.

How do I make the JDK the default JRE?

I use Eclipse with ant scripts, and Eclipse works well with the default JRE installation on Windows XP.
The annoyance comes when I want to run ant scripts compiling with the javac-tag, where it fails because there is no tools.jar in the classpath.
I've gotten the idea that if I could make the JDK become the default Java on Windows, then I would have what I have today, plus ant working out of the box.
Can this be done? What have I missed in the installation process?
Edit: I know of JAVA_HOME, but that is tedious and error prone (manually updating environment variables when a fresher JDK is available is not always something I remember).
Edit: I ended up figuring out how to make the javac task use the Eclipse compiler (ecj.jar), which works very nicely.
Edit: Maven also supports using the Eclipse compiler, but this appears to be very rarely used and with an old version of ecj.jar. I intend to look in to this at a later time.
Edit: Using ecj with maven-compiler-plugin 3.0 works very well, and allows for building with a JRE.
Edit: I had problems with the javadoc tool crashing when parsing bytecode generated by ecj.
The answer is "no," there is no way to get the JDK to be the default JVM upon install.
As the other answers point out, you can adjust your path and your JAVA_HOME to point to the JDK, or a different JVM entirely. This is in fact what the Java installation does in the first place.
However, your problem is that you want tools.jar to be found. To do this you can copy it to the ext directory under your default JVM. Check the JDK file structure here. This will probably work.
On the other hand, if modifying the JAVA_HOME and PATH variables for Java seems annoying, remember that it's just one of a series of things we do to keep us sharp
Download JDK from the website
Once everything is finished, go to Control Panel
Open JAVA
Click on the Java tab and select View
There will be one item present in the list. Change the Java Path from JRE to the JDK you downloaded, like so:
C:\Program Files\Java\<your_jdk_version>\bin\java.exe.
For example, mine looks like this:
C:\Program Files\Java\jdk1.7.0_07\bin\java.exe
Copying the tools.jar file to a location where Eclipse is looking for it may work, but is messy and fragile since that's a step you may not remember the next time you upgrade your JDK. Better is to convince Eclipse to look for it in the proper location.
Setting JAVA_HOME to the correct location works for some tools, but Eclipse does not honor it.
A couple of things to try:
Make sure your JDK is identified and
selected under
Preferences->Java->Installed JREs.
Make sure Ant is being invoked by the
JDK. One clue is that at the top of
the Console output you should see the
path of the javaw.exe which is being
used. If that path is in the JRE,
more convincing is needed. Check
Run->External Tools->External Tools
Configurations->[your Ant build]->JRE
and make sure the settings there
point to the JDK.
Try changing the JAVA_HOME environment variable to point to the JDK instead of the JRE.
Alternatively or possibly additionally, add a PATH entry to the JDK bin directory before any of the Windows system directories.
I suspect JAVA_HOME is enough to get Ant working, but it's sometimes nice to get the JDK version of java etc on the path too, so that when you just run java from the command line, you'll get exactly the same version as when you run javac.
You could probably write a WSH script to reconfigure your path automatically.
This JScript script just prints some info:
//file: jdk.js usage: cscript /Nologo jdk.js
var objShell = WScript.CreateObject("WScript.Shell");
function setJdk(version) {
try {
var jdk = objShell.RegRead("HKEY_LOCAL_MACHINE\\SOFTWARE\\" +
"JavaSoft\\Java Development Kit\\" + version + "\\JavaHome");
if(jdk != null && jdk != "") {
jdk += "\\bin";
var path = objShell.RegRead("HKEY_CURRENT_USER\\Environment\\Path");
path = jdk + ";" + path;
WScript.Echo("Could set PATH to " + path + "\n");
}
} catch(err) { /*probably key does not exist*/ }
}
setJdk("1.7");
setJdk("1.6");
setJdk("1.5");
There is a RegWrite method that can be used to write to the registry. There is a bit of work involved determining the latest version and rejigging the path, removing obsolete entries and sorting out system versus user paths. No doubt it could be used to set JAVA_HOME too. The JDK entry would need to appear before the system32 directory, as the JRE installer puts a java.exe in there.
(I'm not 100% sure if the shell would pick up on such changes or whether a reboot/env variable reload of some kind would be required.)
This is normally done by setting your JAVA_HOME environment variable to the root JDK directory that you want to use.
For example from a command line or batch file you simply do something like:
set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_14
However to set JAVA_HOME permanently add it to the environment variables on the Advanced tab in the property sheet for My Computer.
Apparently Eclipse can compile without the tools.jar. My guess it that they have a specific javac command that can work with a JRE (and not a JDK); this could be the reason why they can list their warnings.
Anyway, I would go the standard way (as suggested above) and install a JDK on your system. You can even start Eclipse with that specific JDK (without any JAVA_HOME change) by tweaking the eclipse.ini file (see these instructions).
Of cause this is doable. Not understand why people said No to this question.
Copy over the tools.jar is not a wise way, I had the issue when using eclipese,
Just add the jdk instead of jre to my build path and it works.
Here is the details:
http://www.gamefromscratch.com/post/2011/11/15/Telling-Eclipse-to-use-the-JDK-instead-of-JRE.aspx

Categories

Resources