SQLDeveloper not starting - sql

When i try to start SQLDeveloper, it is giving me the following error in command prompt:
Error: This product requires a Java(TM) Platform 5.0 runtime.
You are using 1.4.2-b28 from C:\j2sdk1.4.2\jre
But my JAVA_HOME is set to java 6
JAVA_HOME=C:\Program Files\Java\jdk1.6.0_32
Can anyone explain what exactly to do to resolve this?

Oracle SQL Developer uses a configuration file named products.conf which is situated at your roaming directory.
If you are using Windows 7 then the directory path will be:
C:\Users\\AppData\Roaming\sqldeveloper\1.0.0.0.0
Delete whole sqldeveloper directory from C:\Users\\AppData\Roaming\
Re run sqldeveloper executable, this will prompt for jdk home
Select jdk home. i.e C:\Program Files\Java\jdk1.7.0_55
Enjoy!

In my case i had 2 folders under C:\Users\username\AppData\Roaming\
sqldeveloper
SQL developer
after removing both of them and launching installation dir\sqldeveloper\sqldeveloper\bin\sqldeveloper64.exe it worked.

True acknowledgement / attribution belongs to Vishal at the following URL:
http://vishalorcl.blogspot.com/2012/12/sql-developer-from-11201-client-software.html. It describes in detail how to resolve this problem. From the page:
I am running Oracle 11g version of SQLDeveloper. I have same problem
noted above, after fresh install of Oracle. The summary is that
SQLDeveloper seems to require the Java 32-bit JDK.
Install 32-bit jdk V7 from Oracle:
http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
There is a sqldeveloper.conf file located in
C:\app\UserName\product\11.2.0\dbhome_1\sqldeveloper\sqldeveloper\bin
In the file change pathname within the line at end of file:
SetJavaHome C:\app\admin\product\11.2.0\client_1\jdk
To point to pathname of the jdk install directory; also sometimes
known as JAVA_HOME.

I had this problem too!
you should go to: C:\Users-your user name-\AppData\Roaming\sqldeveloper-version of your sql developer-
there is a file named product.conf there. Right click on it and edit it with notepad in the document change the address of java home and save it.
Done!

In my case, none of the other suggestions worked. Instead, I moved the installation directory from
c:\sqldeveloper
to
anything else
And things worked again. Perhaps, some Windows registry value got broken in an unfixable way...

I don't think SQLDeveloper uses the environment variable. There should be a .conf file that contains a reference to the JDK directory.

I solved this by deleting the folder /home/USERNAME/.sqldeveloper
After that, I started SQLDeveloper and without typing anything, it found the right java-version and started without complaining :-)
So, if you don't want to delete the whole folder, maybe search there for the file which defines the java-version :-)
edit: just found that:
"Type the full pathname of a J2SE installation (or Ctrl-C to quit), the path
will be stored in ~/.sqldeveloper/jdk"

check the version of java that you are installing to you Pc the error show that you are using 4 so uninstall the java that you have then install a new one that is version higher than 5

Removing the instances from the registry worked for me.

Related

Installation of Pentaho-Data integration

After extracting the Pentaho zip file I downloaded. I set my class path to JDK 1.7.0. But, upon running the Spoon.bat file I keep getting the statement: "Unable to launch your Java Virtual Machine (JVM)." How do I resolve this problem ?
NB: I have configured JAVA_HOME, JRE_HOME as stated by similar previously answered questions.
Note that Pentaho7 requires java 8.
In any case, Set the PENTAHO_JAVA_HOME=dir, where dir is the directory that contains the /bin/java.exe executable.
Alternative:
The spoon.bat [resp spoon.sh] runs first the set-pentaho-env.bat to find a suitable java. Edit this file to know in which order it searches for it. So do like me, when nobody looks at you, edit this file manually, and set _PENTAHO_JAVA_HOME and _PENTAHO_JAVA manually.
To check: In a command line shell, cd to your PDI install directory and type spoon.bat. It writes something like start "Spoon" "**some\directory**\javaw.exe" more stuff. Check that you can type **some\directory**\javaw.exe -version in your shell.
If not: in the same directory, type set-pentaho-env.bat. It writes down the PENTAHO_JAVA and PENATHO_JAVA_HOME thAt spoon will use. Edit that file until %PENTAHO_JAVA%\java.exe -version and %PENTAHO_JAVA_HOME%\java.exe -version answers the appropriate version.
In my case (for PDI 9.2.x), installing an Oracle JDK 8 solved the issue (no need to set the Java home folder explicitly)

I am trying to open Jmeter by the batch file but it gives me a Windows error

Here is the related error its showing:
java.exe is not a recognized file as an internal or external command,
operable or external command
errorlevel=9009
i was getting the same error on WIndows 8.1(64 bit) and checked java path but it was ok
so i just run my jmeter.bat with Run as Administrator and it worked for me
Many operating systems have an environment variable such as PATH that contains a list of directories (or folders) to be searched when looking for a command to execute. Commands that can be found via the PATH are commonly called external commands. The program that reads the command line or the batch file and invoked the commands may have a number of built in commands, these are commonly called internal commands.
I suggest you examine the PATH (or equivalent) set when your java command executes from the command line and also when execution is attempted from the batch file. Compare the two and make sure the directory containing your java.exe is in the PATH.
Does not work with Java 9 beta:
Running:
C:\java -version
Gives:
java version "9-ea"
Just go into command line and run:
java -jar ApacheJMeter.jar
Set the correct Java Path (installed in your system) in Computer -> Advanced System settings -> Environment Variables -> Ok -> System Variables -> Path
I got the same issue and resolved by following the above steps.
I tried everything, this eventually worked.
Within System Variables:
PATH = "C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\Java\jdk1.8.0_101\bin"
May help someone.
This error occurs due to the path has not been set properly.
Either you can set it in environmental varialables or right click jmeter .bat file,choose edit set the path their,for reference see the jmeter.apache.org user manuals.
For me, my Java path has a space in it and jmeter said it can't find Java
/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home
.. I looked at the jmeter.sh script and saw it got the path from "Plugin-Ins" .. onward. I tried just commenting out the exit command after that check in the script .. and then I was able to run jmeter.
So apparently the validation logic has a bug, where the error message about can't find java is in fact not true (if Java is indeed set up correctly), so it can be ignored.
For windows 8.1 Users:
Error when trying to run jmeter.bat
Error message:
Not able to find Java executable or version. Please check your Java installation. errorlevel=2
Press any Key to continue
Resolution:
Right Click jmeter.bat and Run as Administrator.
This worked for me, hope this helps. Good luck
Set the correct JM_LAUNCH variable to java.exe
For Windows XP users set Java environment by following the steps here:
http://www.tutorialspoint.com/jmeter/jmeter_environment.htm
Note the path depends on your installed JDK.
And download the file from:
https://svn.apache.org/repos/asf/jmeter/trunk/bin/jmeter.bat
Then replace your jmeter.bat with the downloaded file.
If you have installed Java and still you get this error, please set the java_home path to below using typing below command in terminal:
export JAVA_HOME="/Library/InternetPlugIns/JavaAppletPlugin.plugin/Contents/Home"
Since I run many versions of Java.. I modified jmeter.bat.
rem JM_START - set this to "start" to launch JMeter in a separate window
rem this is used by the jmeterw.cmd script.
rem
rem =====================================================
setlocal
rem Minimal version to run JMeter
set MINIMAL_VERSION=1.8.0
set PATH=%PATH%;C:\Program Files (x86)\IBM\Java80\jre\bin <<< add This line to jmeter.bat
Copied the JAVA executable from Installed version of Java from C:\Program FilesJava\jdk1.8.0_191\bin and pasted in the folder where the jmeter bat resides and it worked for me.
Not exactly the same issue but somebody might find it helpful
Do not double click jmeter.bat but instead ApacheJMeter.jar in the same directory
For me jmeter.bat run but for a brief moment closing almost immediately and not prompting any error. Above workaround allowed me to start working
if JAVA -version shows as blank or empty in the command prompt (CMD) then you need to clear the all java paths in environment variable and again add JAVA_HOME=C:\Program Files\Java\jdk-11.0.15.1
path= C:\Program Files\Java\jdk-11.0.15.1\bin;
if you see C:\Program Files\Common Files\Oracle\Java\javapath; like this remove this
and try in new CMD prompt then Java -version will work.

The local psql command could not be located

I'm following the instructions found here.
When I try to run $ heroku pg:psql or $ heroku pg:psql HEROKU POSTGRESQL_BROWN I recieve the following error message:
! The local psql command could not be located ! For help
installing psql, see local-postgresql
I can't find anything useful on the link it gives me (it just links to the instructions I was already using, but further down the page) nor can I find this error anywhere else.
If I've missed anything you need to know to answer this, just let me know. I'm rather new to all this and teaching myself as I go.
I had same error even after installing Postgres locally.
But after seeing this
I saw that "pqsl" was not in the PATH so I then did
PATH=%PATH%;C:\Program Files\PostgreSQL\9.2\bin
which worked for me
I have since solved this myself. When I ran heroku pg:info it says the version number is 9.1.8, I was locally running 9.2
installing 9.1.8 and ensuring Path pointed to the appropriate folder solved the problem.
After you change the path, make sure to restart the terminal!
Set the PATH. To find out the PATH of your psql script (on mac) open the sql shell script from your finder in Applications/Postgres installation. This will give you a hint as to where it is installed. That opened a window which told me it is located here: /Library/PostgreSQL/8.4/scripts/runpsql.sh
Then, I set the PATH variable from the terminal window by typing:
$ PATH="/Library/PostgreSQL/8.4/bin:$PATH"
(depends on the location of your PostgreSQL installation, find your bin path first, another exp: /usr/local/Cellar/postgresql#9.6/9.6.8/bin)
OR.....
You can also connect to the shell by opening the shell directly from your postgres installation folder. Then enter the credentials. If you don't know the credentials, here is how to find them out:
$ heroku pg:info
=== HEROKU_POSTGRESQL_RED_URL (DATABASE_URL)
$ heroku pg:credentials HEROKU_POSTGRESQL_RED_URL
Top answer wouldn't work for me oddly, my system would not add the Path via cmd with administrator access (Not sure why).
So check this > Windows key > environment variables > system variables
And add the last line (your version may differ in the path)
Make sure you've installed the toolbelt as psql is installed by default.
However you also need to ensure you've installed a local copy of PostgreSQL; if you don't the toolbelt will be unable to find the native psql client.
Assuming you have installed a local copy of PostgreSQL, make sure you can execute psql from the command line directly (i.e make sure you PATH is set correctly ). If the command does not execute, check your PATH, if it does execute see if you can connect via the PSQL connection string provided in the Heroku control panel. If you can connect reinstall the toolbelt, if you are unable to connect provision another dev database and try again.
If there are still issues, I would suggest contacting Heroku support for assistance after verifying no API issues are listed on the status page located here.
I got rid if this annoying message on Windows by adding a path element without the spaces, i.e.
C:\Progra~1\PostgreSQL\9.4\data
instead of
“C:\Program Files\PostgreSQL\9.4\data”
I followed the instructions here: http://www.computerhope.com/issues/ch000549.htm, which worked for me if you prefer to go the point-and-click configuration of the PATH variable.
This type of error usually appears in the Windows environment, because if you do not update the PATH after installing Postgresql, heroku pg:psql command does not work.
So you need to update your PATH environment variable to add the bin directory of your Postgres installation. The directory will look like this:
C:\Program Files\PostgreSQL\<VERSION>\bin.
For more information, go to the Heroku in Local setup website:
heroku-postgresql: Local setup
I had the same problem and discovered that Heroku doesn't seem to provision the latest version of PostgreSQL by default. Where the Heroku Getting Started instructions said
heroku addons:create heroku-postgresql:hobby-dev
That provisioned a v10 database for some reason (which you can check by clicking on Heroku Postgres in the Add-ons tab of your dashboard). I deleted that database and provisioned a new database using the --version flag:
heroku addons:create heroku-postgresql:hobby-dev --version 11
As of now, at least, you can find the latest version of Postgres supported by Heroku at this link: https://devcenter.heroku.com/articles/heroku-postgresql#version-support-and-legacy-infrastructure
I'm writing this in early 2019, but according to the PostgreSQL website the next version (12) is "tentatively scheduled" for third quarter of 2019 so if you're reading this in late 2019 potentially the same problem will come up for v12 instead
On Mac you can use the following:
export PATH="/Library/PostgreSQL/12/bin/:$PATH"
The only solution that I found on Windows:
go to advanced system settings
go to environment variables
select Path variable and click Edit
add a new line and enter your bin directory path (C:\Program Files\PostgreSQL<version>\bin) and click ok
restart your terminal
enter your psql command (heroku pg:psql)

Jdeveloper - Unrecognized option: -jrockit

Every time I try to run a weblogic webcenter application on Jdev I get the following error and I cant find any reference on how to fix this anywhere on the web.
starting weblogic with Java version: Could not create the Java virtual
machine. Unrecognized option: -jrockit
Try modifying the startWebLogic.cmd file (WIN7)
c:\users\{user}\AppData\Roaming\JDeveloper\system{version}\DefaultDomain\bin\startWebLogic.cmd
to contain
set JAVA_VM=-server
set MEM_ARGS=-Xms512m -Xmx1024m -XX:MaxPermSize=512m
Jdeveloper 11g do not support jdk 1.7
https://forums.oracle.com/thread/2482850
I fixed it by add to top of c:\users{user}\AppData\Roaming\JDeveloper\system{version}\DefaultDomain\bin\setDomainEnv.cmd:
set SUN_JAVA_HOME=E:\Oracle\Java\jdk1.6.0_37
set JAVA_VENDOR=Sun
In OSX, look for the this folder /Users/{USERNAME}/.jdeveloper/system{VERSION}/DefaultDomain/bin
Edit the file setDomainEnv.sh and look for SUN_JAVA_HOME and make sure the value is the same value as your JAVA_HOME, i.e. /Library/Java/JavaVirtualMachines/jdk${JDK_VERSION}.jdk/Contents/Home, by default it seems it is set to an empty string "".
Edit the file startWebLogic.sh and add the following before setDomainEnv.sh is called.
JAVA_VENDOR=Sun
You can test it out by running sh ./startWebLogic.sh, if it runs with -jrockit error, then all is good :)
I've also tested with Java JDK 1.7 and it seems to work.
The reason is, that older Weblogic Versions use the Java VM "JRockit"
http://www.oracle.com/technetwork/middleware/jrockit/overview/index.html
The JRockit VM is no longer supported in Java 7 or higher.
All of the other solutions here seem to be hacks and none of them helped me.
I had the same Problem with a Weblogic 10.3.5 and I found out, the installation was incorrect.
The Problem is, that there is no java version check in the installer, so if you don't know that you can't use Java 7 or higher you are screwed.
These steps fixed it for me:
You need to make sure you have Java 6 or lower installed.
Reinstall the Weblogic and make sure to specify the correct JDK

Tomcat - The system cannot find the file specified

I downloaded Tomcat 6 from Tomcat Website and try to install. I found the .exe file in C:\apache-tomcat-6.0.35\bin but when i run the exe file the command prompt disappeared after show "The system cannot find the file specified". I already installed JDK 6 update 29 in my system. Please advice
I had a simmilar problem after installing a java update, but JAVA_HOME was set correctly. If you run tomcat as a service, you might have to right click on the tomcat icon and open java tab and change java virtual machine path or just set "use default".
If I were to "guess" I would say that the JAVA_HOME is not set. But to confirm :
Can you go the command line, make sure that JAVA_HOME is set correctly, startup tomcat (from command line) ? If you run into errors, please send the text output.
Try to run "startup.bat" to start a tomcat instance.
Go to your/path/tomcat and execute script catalina_start.bat .I had the same issue and this worked for me (though I installed Tomcat as a part of XAMPP package)