Error! How to install GlassFish in Ubuntu 9.04? - java

I try to install GlassFish on Ubuntu, and I get the error:
Could not locate a suitable jar
utility. Please ensure that you have
Java 6 or newer installed on your
system and accessible in your PATH or
by setting JAVA_HOME
when I type
echo $PATH
it prints out:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/opt/jdk1.6.0_20:/opt/jdk1.6.0_20/bin
Where is the problem and how to solve it?
I have also read "Problems installing Java EE SDK on Linux", but it doesn't work.
N.B. Before reinstalling Ubuntu it works fine. This problem comes after reinstallation.

if you follow this tutorial you should be fine and all you problems will be gone:
http://www.nabisoft.com/tutorials/glassfish/installing-glassfish-301-on-ubuntu

The problem is that you have /opt/jdk1.6.0_20 in your PATH and the java executables are located in /opt/jdk1.6.0_20/bin. The best way is to define JAVA_HOME environment variable that contains /opt/jdk1.6.0_20 string and add $JAVA_HOME/bin to PATH variable.

The problem was related to user permissions. I think I tried to install GlassFish without enough rights.

Related

Configuring Java Extension Pack in Remote WSL on VSCode

My question is similar to this. I am trying to work with Java in Remote-WSL using VSCode. According to VSCode guidelines, I should install the Java Extension Pack on WSL. However, when I try to install it I get the following error:
The java.home variable defined in Visual Studio Code settings points to a missing or inaccessible folder (C:\Program Files\Java\jdk-9.0.1)
This is what the Java Extension pack shows when I install it on WSL.
I have been able to resolve this issue if I change the path in java.home to be same as JAVA_HOME in settings.json. However, I need to toggle the path back to C:\Program Files\Java\jdk-9.0.1 manually when working on my local machine and not on Remote-WSL.
Is there a better way to make it work?
PS: I've no clue why it says that JDK_HOME is empty. If I echo $JDK_HOME inside WSL, it shows the path same as JAVA_HOME.
If you want to develop Java in WSL, you need to install JDK in WSL. Now from the way you frame your questions I would assume you have done that (it needs to be installed as a Linux program, so if your JAVA_HOME starts with anything like /mnt/c then you don't actually have it on WSL).
I have been able to resolve this issue if I change the path in java.home to be same as JAVA_HOME in settings.json. However, I need to toggle the path back to C:\Program Files\Java\jdk-9.0.1 manually when working on my local machine and not on Remote-WSL.
The problem you mentioned here is relatively simple to solve. All you need to do is to have a WSL specific settings for java.home, and have the normal setting (i.e. C:\Program Files\Java\jdk-9.0.1) remain in your normal VS Code settings. To access WSL specific settings, use CTRL+SHIFT+P then type "Open Remote Settings".
Copied answer to one possible problem/solution from the Q above for visibility here:
I have been able to resolve this issue if I change the path in java.home to be same as JAVA_HOME in settings.json. However, I need to toggle the path back to C:\Program Files\Java\jdk-9.0.1 manually when working on my local machine and not on Remote-WSL.
Before installing the Java Extension Pack on the WSL side of things you should have something similar to this (so, yeah --> Click that button!):
i solved my problem running this comand on WSL
sudo apt install default-jdk
I think you should install JDK in WSL.

When installing Apache Tomcat error shows while choosing path for Java

While installing the Apache Tomcat, when I'm choosing the path for Java, it shows error like "No Java Virtual Machine found in folder". How can I solve this issue and where can I download essential file to install tomcat. Any Solution ??
i know this is late but maybe it could be useful for someone ,
apache tomcat requires the JRE installed in your machine , here is the link from oracle for jre 8:
https://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html
You need to use the root of your java folder in the Tomcat installation wizard.
So use C:\Program Files\java\jdk-11.0.15.10-hotspot or equivalent. Do not point to inner directories like \bin or \bin\server & \bin\client.
Probably your problem related to wrong JAVA_HOME setting.
In Windows, from Command Line you can just type set ja and ensure that JAVA_HOME points to correct Java installation

Installing tizen in windows 7

I am trying to install tizen wearable sdk in windows 7 64bit. I have donwload the .exe however when I am trying to isntall it I am getting the following error:
error - Cannot execute Java even if it was installed. Check environment variable or Java version(over 1.6) please.
I have installed in my computer java 1.7.0_80. I have put to the path of the system C:\Program Files\Java\jre7\bin and in JAVA_HOME C:\Program Files\Java\jdk1.7.0_80
I have tried to follow the instructions from here here however I didn't mange to solve my issues.
EDIT: I followed the instructions from that link I went to cd\Users\AppData\Local\Temp and I run from there the command in console java -jar installmanager.jar. THe installation began normally. However, during the installation I got several errors.
I've had a few problems with the Tizen Wearable install too.
You can either make sure that you have Java in your path by going to a command prompt and typing java -version for example. If it works then Java is in your path. If it doesn't you have to fix it:
Win+Pause/SysRq then click on Advanced System Settings
Click on environment variables
Look for PATH and edit it
Add the path to your Java install (eg: C:\Program Files (x86)\Java\jre1.8.0_31)
Or run from the command line:
Go to a command line
cd to %TEMP%
Run Java by first entering the path to your java version (eg C:\Program Files (x86)\Java\jre1.8.0_31) then bin\java, so C:\Program Files (x86)\Java\jre1.8.0_31\bin\java.exe
If you are still having problems then edit the question to add more specific information so any other issues can be fixed.
Try to check if this directory is in the path too:
C:\ProgramData\Oracle\Java\javapath
and if there is links to missing java executables.
If this is the case, you can remove that folder to the path, replacing with the current java version you want, or fix the link from there.
It seems like the VBS script tried to delete a file that doesn't exist, you can go to the VBS file and go to the problem line, and check out which file was missing. Then decide what to do.
Maybe you should install the latest JDK, try the latest JDK and see if the problem can be solved.

eclipse open error failed to find main class in eclipse\\plugins/org...jar

at the beginning it says that failed to find java jdk or jre so i installed it. then i run it again it came up this.
It says that "Failed to find a Main Class in ... eclipse\\plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar"
java file are under
C:\Program Files (x86)\Java\jre1.8.0_31 && jre7
C:\Program Files\Java\jdk1.8.0_31 && jre1.8.0_31
my eclipse file are under
D:\迅雷下载\操作系统\eclipse
can someone tell me how to fix this ??
I was facing the similar issue where on launching eclipse photon it was giving error like:
Failed to find a Main Class in ...
eclipse\\plugins/org.eclipse.equinox.launcher*.jar
One of the reasons in my case was that I had two JDK versions on my system (JDK 6 & JDK 8).
It was running fine but stopped when I updated JAVA_HOME as JDK 6.
To rectify it, I added the below lines in the eclipse.ini file before -vmargs:
-vm
C:/Program Files/Java/jdk1.8.0_111/bin/javaw.exe
-vmargs
Basically, I passed the JDK 8 path to the eclipse as required version for eclipse photon was Java 8. And this got me working.
Try to move eclipse to some simpler path, like D:\development\eclipse
This error is due to because you might have downgraded the version of java in your environmental variables.Try changing the java version in environmental variables and then run the sts or eclipse..for better practice restart the system.hope it helps.!!
I do not mean to steal the first answer - it did help me solve my very similar issue.
I am running Windows 8 x64 bit and installed a modded version of Eclipse in a custom path (rather the default install location that was suggested) - and I got that error.
So, I deleted that Eclipse install. Then installed both x86 and x64 versions of JDK (to their default install locations), and repeated the Eclipse install to the default install location - that solved the problem for me!!!
The reason I installed both JDK versions was because I initially installed only the x64 bit version and a different error came. So I removed that Eclipse again, and repeated the JDK with both versions, etc...
I was on this problem for like an hour and a half not getting that if you save the eclipse file in a non-English named folder it doesn't open.
Hope it helps :)
Check if there are 2 Java paths mentioned in the system Variable "Path"
If yes, Move up the Java path which is mentioned in JAVA_HOME.
For example:
If JAVA_HOME=C:\Program Files\Java\jdk1.8.0_211
then the Path should have same Java version's path
Path=C:\Program Files\Java\jdk1.8.0_211
In my case I just changed the Path from
Path=C:\Program Files\Java\jdk1.6.0_45\bin
To
Path=C:\Program Files\Java\jdk1.8.0_211
Remove Eclipse from Non English folder if any.
This is issue might be because of the folder location or the JDK version,
I installed the latest version JDK and with eclipse-inst-win64 provided by eclipse i was able to install and run successfully
Same thing happens when you change eclipse.exe to a different name, seems like org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar starts the ide and looks for eclipse.exe
In my case, the Eclipse installer downloaded the wrong VM vertion. I download it separately. Choose it in clause "Java 11+ VM" and it works. Also check you do not have Russian letters in eclipse.ini. If you do, then change the encoding to UTF-8 and write the right letters in Russian.

how can I fixed Oracle Client Setup problems?

I want to setup oracle client in my server . But I see this error. How can I fixed?
The Java RunTİme Enviroment was not found at bin\javaw.exe. Hence, the Oracle Universal Installer cannot be run. Please visit this link and install JRE version 1.3.1 or higher and try again.
I believe that the problem is that setup of JRE does not create environment variable JAVA_HOME required by many tools probably including Oracle client. So, just add this variable manually. It should point to path where your JRE is installed, i.e. in your case C:\Program Files\Java\jre7\
from: http://paulsoftech.blogspot.de/2012/09/binjavawexe-not-found-when-trying-to.html
install JRE-1.7.0
add these 2 lines at the file oraparam.ini
JRE_VERSION=1.7.0
JRE_LOCATION=C:\Program Files\Java\jre7
comments the line :
JRE_VERSION=1.4.2
For me this was caused by some issue with the unzipped installer. I copied the zip to my local machine, unzipped and installed without issue.

Categories