I am getting this error if I add new component to my frame if I remove it then it works.
I done this troubleshooting
(1)deleting index folder and restart computer and netbeans
(2)increased heap size in conf file
(3)set environment variable in windows system as
:-User variable name = CLASSPATH
:-variable value = C:\Program Files (x86)\Java\jdk1.8.0_40\bin;C:\Program Files (x86)\Java\jre1.8.0_40\bin;.
:-System variable name :-Path
:-System Variable value:-C:\ProgramData\Oracle\Java\javapath;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\Java\jdk1.8.0_40\bin;C:\Program Files (x86)\Java\jre1.8.0_40\bin
but the problem persists
if i add new component(radiobutton,label,scrollpane) it gives me this error:
you can try Clean and build your project, if it doesn't work, you can check the posts from
Netbeans - Error: Could not find or load main class ,
Error: Could not find or load main class (netbeans and java)
or
What does "Could not find or load main class" mean?
With Java 11 you can start a class from the terminal with
java classname.java
Related
I am new to Axis , I am trying to start Axis2 as a Standalone Server using the Standard Binary Distribution package in Linux. I went through this guide: https://axis.apache.org/axis2/java/core/docs/installationguide.html
I have downloaded and unpacked the distribution in it's own directory and i have also set environment variables AXIS2_HOME and JAVA_HOME as follows :
export AXIS2_HOME=/opt/axis2-1.8.2
echo $AXIS2_HOME returns
/opt/axis2-1.8.2
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64/bin
echo $JAVA_HOME returns
/usr/lib/jvm/java-1.8.0-openjdk-amd64/bin
When trying to run axis2server.sh which is essentially the script to start the server I get the following prompts :
user#serverFoo/opt/axis2-1.8.2/bin$ ./axis2server.sh
Using AXIS2_HOME: /opt/axis2-1.8.2
Using JAVA_HOME: /usr/lib/jvm/java-1.8.0-openjdk-amd64/bin
Error: Could not find or load main class org.apache.axis2.transport.SimpleAxis2Server
Coming from a JAVA background I understand that it can't find or load the server class, although I can't find any resources in the web pointing to the specific error .
EDIT : I have also added CLASSPATH variable pointing to the AXIS2_HOME/lib directory i.e
export CLASSPATH=/opt/axis2-1.8.2/lib/*.jar but still the same .
Any ideas would be welcome.
Thanks
I installed jdk1.8.0_202 and set the path for jdk1.8.0_202/bin, jre1.8.0_202/bin and JAVA_HOME in both 'user variables' and 'system variables'.
I created a test java file on Desktop and opened cmd(non admin) and tried to compile which resulted in the following error.
C:\Users\andey\Desktop>javac Main.java
Main.java:2: error: error while writing Main: Main.class (The system cannot find the file specified)
public class Main {
^
1 error
Same happened with Documents folder and sub folders. I also tried using cmd(elevated) but I got same error.
I could compile successfully on any other folder except those 2 folders(Desktop and Documents) even using non-elevated cmd.
I want my programs to be either on desktop or in documents.
Any help is appreciated.
I am continuing to have trouble with the import.bat file for the Neo4j batch importer. I started a new thread as the original problem was resolved.
from the command prompt I run
import.bat test.db sample\nodes.csv sample\rels.csv
With some variations on the path listing for the files, including absolute paths. I continue to get the following error message
The system cannot find the path specified.
Error: Could not find or load main class org.neo4j.batchimport.Importer
I also tried running import.sh from Cygwin and in my Debian VM but keep getting the error
Error: Could not find or load main class org.neo4j.batchimport.Importer
What am I doing wrong?
Please download the zip-file, not the github clone.
This is a pre-build binary as outlined in the readme, that doesn't require that you have to have maven installed to build it.
I'm trying to run a complied class with the command:java SocketTest in current directory.
But something wrong:
Exception in thread "main"
java.lang.NoClassDefFoundError:SocketTest(wrong
name:socket/SocketTest)...
here is my classpath AND path configration in windows XP:
JAVA_HOME:
C:\Program Files\Java\jdk1.7.0_25\
classpath:
.;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar
path:
%JAVA_HOME%\jre\bin;C:\Program Files\Java\jdk1.7.0_25\bin;C:\Ruby187\bin;H:\Program Files\ARM\ADSv1_2\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%JAVA_HOME%\bin;C:\Program Files\Microsoft SQL Server\80\Tools\BINN
I think the .; has been carefully written,so I'm not sure what's wrong with the java command. Someone help,please!
The error message has pointed out you need to put the your class to the corrected package socket. So you need to create folder with name socket and then put your SocketTest.class to this folder and run the following command (under the parent folder of socket):
java socket.SocketTest
I included Ghost4J 0.45 into my project using Maven and installed Ghostscript into C:\Program Files\gs\gs9.06.
But I still get an error java.lang.UnsatisfiedLinkError: Unable to load library 'gsdll64'.
I added into PATH env variable directory where located 'gsdll64.dll' (i.e. C:\Program Files\gs\gs9.06). Also tried launch application using -Djava.library.path=/path/to/dir.
But I alwways get UnsatisfiedLinkError (but when I launch using JVM argument -Djava.library.path I get ClassNotFound exception (Eclipse can't find Main class, but I manually point Eclipse to Main class when I laucnh my app))/
Does it work if you copy gsdll64 to your working directory? :-)
if u want to use a system property
-Djna.library.path=/path/to/dir should be used instead of -Djava.library.path=/path/to/dir