Could not find or load main class weblogic.WLST
Hi,
I am trying to run a python script to create JMS components for use with iHub and i got the following error message when i try to run the script:
C:\ihub\bin>java weblogic.WLST omipmihubwlscript.py weblogicjms Welcome1 http://<servername>:7111 OMIPMIHUBServer
Error: Could not find or load main class weblogic.WLST
I have run the setWLSEnv.cmd file and got the following output
C:\oracle\Middleware2\wlserver_10.3\server\bin>setWLSEnv.cmd
CLASSPATH="C:\oracle\MIDDLE~2\patch_wls1036\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\oracle\MIDDLE~2\patch_ocp371\profiles\default\sys_manifest_classpath\weblogic_p
atch.jar;C:\PROGRA~1\Java\JDK17~1.0_1\lib\tools.jar;C:\oracle\MIDDLE~2\WLSERV~1.3\server\lib\weblogic_sp.jar;C:\oracle\MIDDLE~2\WLSERV~1.3\server\lib\weblogic.jar;C:\oracle\MIDDLE~2\mod
ules\features\weblogic.server.modules_10.3.6.0.jar;C:\oracle\MIDDLE~2\WLSERV~1.3\server\lib\webservices.jar;C:\oracle\MIDDLE~2\modules\ORGAPA~1.1/lib/ant-all.jar;C:\oracle\MIDDLE~2\modu
les\NETSFA~1.0_1/lib/ant-contrib.jar;C:\oracle\MIDDLE~2\patch_wls1036\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\oracle\MIDDLE~2\patch_ocp371\profiles\default\sys_man
ifest_classpath\weblogic_patch.jar;C:\PROGRA~1\Java\JDK17~1.0_1\lib\tools.jar;C:\oracle\MIDDLE~2\WLSERV~1.3\server\lib\weblogic_sp.jar;C:\oracle\MIDDLE~2\WLSERV~1.3\server\lib\weblogic.
jar;C:\oracle\MIDDLE~2\modules\features\weblogic.server.modules_10.3.6.0.jar;C:\oracle\MIDDLE~2\WLSERV~1.3\server\lib\webservices.jar;C:\oracle\MIDDLE~2\modules\ORGAPA~1.1/lib/ant-all.j
ar;C:\oracle\MIDDLE~2\modules\NETSFA~1.0_1/lib/ant-contrib.jar;C:\oracle\MIDDLE~2\patch_wls1036\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\oracle\MIDDLE~2\patch_ocp37
1\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\PROGRA~1\Java\JDK17~1.0_1\lib\tools.jar;C:\oracle\MIDDLE~2\WLSERV~1.3\server\lib\weblogic_sp.jar;C:\oracle\MIDDLE~2\WLSER
V~1.3\server\lib\weblogic.jar;C:\oracle\MIDDLE~2\modules\features\weblogic.server.modules_10.3.6.0.jar;C:\oracle\MIDDLE~2\WLSERV~1.3\server\lib\webservices.jar;C:\oracle\MIDDLE~2\module
s\ORGAPA~1.1/lib/ant-all.jar;C:\oracle\MIDDLE~2\modules\NETSFA~1.0_1/lib/ant-contrib.jar;"
PATH="C:\oracle\MIDDLE~2\patch_wls1036\profiles\default\native;C:\oracle\MIDDLE~2\patch_ocp371\profiles\default\native;C:\oracle\MIDDLE~2\WLSERV~1.3\server\native\win\x64;C:\oracle\MIDD
LE~2\WLSERV~1.3\server\bin;C:\oracle\MIDDLE~2\modules\ORGAPA~1.1\bin;C:\PROGRA~1\Java\JDK17~1.0_1\jre\bin;C:\PROGRA~1\Java\JDK17~1.0_1\bin;C:\oracle\MIDDLE~2\patch_wls1036\profiles\defa
ult\native;C:\oracle\MIDDLE~2\patch_ocp371\profiles\default\native;C:\oracle\MIDDLE~2\WLSERV~1.3\server\native\win\x64;C:\oracle\MIDDLE~2\WLSERV~1.3\server\bin;C:\oracle\MIDDLE~2\module
s\ORGAPA~1.1\bin;C:\PROGRA~1\Java\JDK17~1.0_1\jre\bin;C:\PROGRA~1\Java\JDK17~1.0_1\bin;C:\oracle\MIDDLE~2\patch_wls1036\profiles\default\native;C:\oracle\MIDDLE~2\patch_ocp371\profiles\
default\native;C:\oracle\MIDDLE~2\WLSERV~1.3\server\native\win\x64;C:\oracle\MIDDLE~2\WLSERV~1.3\server\bin;C:\oracle\MIDDLE~2\modules\ORGAPA~1.1\bin;C:\PROGRA~1\Java\JDK17~1.0_1\jre\bi
n;C:\PROGRA~1\Java\JDK17~1.0_1\bin;C:\app\paul.currie\product\11.2.0\client_2\bin;C:\app\paul.currie\product\11.2.0\dbhome_3\bin;C:\Program Files (x86)\PC Connectivity Solution\;C:\Wind
ows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Java\jdk1.7.0_13\jre\bin;;C:\oracle\MIDDLE~2\WLSERV~1.3\server\native\win\x
64\oci920_8;C:\oracle\MIDDLE~2\WLSERV~1.3\server\native\win\x64\oci920_8;C:\oracle\MIDDLE~2\WLSERV~1.3\server\native\win\x64\oci920_8"
Your environment has been set.
I am totally stuck at this point so any help would be much appreciated.
Cheers
Paul
I have just tested both on a Windows and a Linux server and it works fine.
D:\oracle\product\Middleware\wlserver_10.3\server\bin>setWLSEnv.cmd
CLASSPATH=D:\oracle\product\MIDDLE~1\patch_wls1035\profiles\default\sys_manifest_classpath\weblogic_patch.jar;D:\oracle\
product\MIDDLE~1\patch_jdev1111\profiles\default\sys_manifest_classpath\weblogic_patch.jar;D:\oracle\product\JAVA_C~1\li
b\tools.jar;D:\oracle\product\MIDDLE~1\WLSERV~1.3\server\lib\weblogic_sp.jar;D:\oracle\product\MIDDLE~1\WLSERV~1.3\serve
r\lib\weblogic.jar;D:\oracle\product\MIDDLE~1\modules\features\weblogic.server.modules_10.3.5.0.jar;D:\oracle\product\MI
DDLE~1\WLSERV~1.3\server\lib\webservices.jar;D:\oracle\product\MIDDLE~1\modules\ORGAPA~1.1/lib/ant-all.jar;D:\oracle\pro
duct\MIDDLE~1\modules\NETSFA~2.0_1/lib/ant-contrib.jar;D:\oracle\product\MIDDLE~1\patch_wls1035\profiles\default\sys_man
ifest_classpath\weblogic_patch.jar;D:\oracle\product\MIDDLE~1\patch_jdev1111\profiles\default\sys_manifest_classpath\web
logic_patch.jar;D:\oracle\product\JAVA_C~1\lib\tools.jar;D:\oracle\product\MIDDLE~1\WLSERV~1.3\server\lib\weblogic_sp.ja
r;D:\oracle\product\MIDDLE~1\WLSERV~1.3\server\lib\weblogic.jar;D:\oracle\product\MIDDLE~1\modules\features\weblogic.ser
ver.modules_10.3.5.0.jar;D:\oracle\product\MIDDLE~1\WLSERV~1.3\server\lib\webservices.jar;D:\oracle\product\MIDDLE~1\mod
ules\ORGAPA~1.1/lib/ant-all.jar;D:\oracle\product\MIDDLE~1\modules\NETSFA~2.0_1/lib/ant-contrib.jar;
PATH=D:\oracle\product\MIDDLE~1\patch_wls1035\profiles\default\native;D:\oracle\product\MIDDLE~1\patch_jdev1111\profiles
\default\native;D:\oracle\product\MIDDLE~1\WLSERV~1.3\server\native\win\x64;D:\oracle\product\MIDDLE~1\WLSERV~1.3\server
\bin;D:\oracle\product\MIDDLE~1\modules\ORGAPA~1.1\bin;D:\oracle\product\JAVA_C~1\jre\bin;D:\oracle\product\JAVA_C~1\bin
;D:\oracle\product\MIDDLE~1\patch_wls1035\profiles\default\native;D:\oracle\product\MIDDLE~1\patch_jdev1111\profiles\def
ault\native;D:\oracle\product\MIDDLE~1\WLSERV~1.3\server\native\win\x64;D:\oracle\product\MIDDLE~1\WLSERV~1.3\server\bin
;D:\oracle\product\MIDDLE~1\modules\ORGAPA~1.1\bin;D:\oracle\product\JAVA_C~1\jre\bin;D:\oracle\product\JAVA_C~1\bin;C:\
Program Files\Legato\nsr\bin;C:\PROGRA~2\CA\SHARED~1\ETPKI\lib;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C
:\Windows\System32\WindowsPowerShell\v1.0\;D:\oracle\Java\current\jre\bin;C:\PROGRA~2\CA\IDENTI~1\PROVIS~1\BIN;C:\Progra
m Files (x86)\CA\SharedComponents\CAM\bin;D:\oracle\product\MIDDLE~1\WLSERV~1.3\server\native\win\x64\oci920_8;D:\oracle
\product\MIDDLE~1\WLSERV~1.3\server\native\win\x64\oci920_8
Your environment has been set.
D:\oracle\product\Middleware\wlserver_10.3\server\bin>java weblogic.WLST
Initializing WebLogic Scripting Tool (WLST) ...
Welcome to WebLogic Server Administration Scripting Shell
Type help() for help on available commands
wls:/offline>
Similar Messages
-
[SOLVED] Java could not find or load main class
I just tried to run a Java program using Swing components from the terminal, but I always get this error message:
$ java VisualTest
Error: Could not find or load main class VisualTest
The strange thing is that it runs flawlessly from within Eclipse.
I created VisualTest.java using the (old) Visual Editor, it's contents are:
package visual1;
import javax.swing.SwingUtilities;
//import java.awt.BorderLayout;
import javax.swing.JPanel;
import javax.swing.JFrame;
public class VisualTest extends JFrame {
private static final long serialVersionUID = 1L;
private JPanel jContentPane = null;
* @param args
public static void main(String[] args) {
// TODO Auto-generated method stub
SwingUtilities.invokeLater(new Runnable() {
public void run() {
VisualTest thisClass = new VisualTest();
thisClass.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
thisClass.setVisible(true);
* This is the default constructor
public VisualTest() {
super();
initialize();
* This method initializes this
* @return void
private void initialize() {
this.setSize(300, 200);
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.setContentPane(getJContentPane());
this.setTitle("JFrame");
* This method initializes jContentPane
* @return javax.swing.JPanel
private JPanel getJContentPane() {
if (jContentPane == null) {
jContentPane = new JPanel();
jContentPane.setLayout(null);
return jContentPane;
As you can see, there is a class named VisualTest and it contains a main function.
My CLASSPATH variable contains a dot, like
.:/home/mk/.java/deployment/ext/*
I just updated my Java from JDK 7u67 to JDK 8u20 (the Oracle one, in AUR), but I can't imagine this is related (however, I haven't run Java programs from the terminal for a long time).
Strangely enough, a simple HelloWorld.java
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello World!");
runs flawlessly from within the terminal.
Last edited by Marcel- (2014-09-26 12:44:35)As intended by my institution, I said to Eclipse that it should store sources and class files in the same directory. Let's do ls and test:
[~/workspace]$ ls
total 12K
drwxr-xr-x 4 mk mk 4.0K Sep 23 18:23 visualtest/
-rw-r--r-- 1 mk mk 426 Sep 24 15:45 HelloWorld.class
-rw-rw-r-- 1 mk mk 111 Sep 24 15:44 HelloWorld.java
[~/workspace]$ java HelloWorld
Hello World!
vs.
[~/workspace/visualtest/visual1]$ ls
total 12K
-rw-r--r-- 1 mk mk 528 Sep 24 15:38 VisualTest$1.class
-rw-r--r-- 1 mk mk 1.1K Sep 24 15:38 VisualTest.class
-rw-r--r-- 1 mk mk 1.2K Sep 24 00:32 VisualTest.java
[~/workspace/visualtest/visual1]$ java VisualTest
Error: Could not find or load main class VisualTest
I also tested this with another project that runs fine in Eclipse, but it gives the same error message when trying to issue `java StemOpPartijFrame`.
EDIT:
One difference between the two OSs though is that Linux progresses. The other decays..
Two? I count many! And I don't think something like OpenBSD decays. ;-)
Last edited by Marcel- (2014-09-24 16:54:12) -
Error: Could not find or load main class
Hello everyone!
I have decided to finally start learning Java and am currently, and slowly, making my way through the tutorials. I am only on chapter 2 in the class section. While reading I came uponJava Tutorials Sample Code and wanted to try and compile it in netbeans. This is the code that it contained:
class BicycleDemo {
public static void main(String[] args) {
// Create two different
// Bicycle objects
Bicycle bike1 = new Bicycle();
Bicycle bike2 = new Bicycle();
// Invoke methods on
// those objects
bike1.changeCadence(50);
bike1.speedUp(10);
bike1.changeGear(2);
bike1.printStates();
bike2.changeCadence(50);
bike2.speedUp(10);
bike2.changeGear(2);
bike2.changeCadence(40);
bike2.speedUp(10);
bike2.changeGear(3);
bike2.printStates();
I did the following in order:
1) New project
2) Select Java under Categories and Java Application under Projects
3) I type BicycleDemo in the Project Name Field and click finish
4) I delete all the template code and paste the above code into the field
5) I click run and get the following error:
run:
Error: Could not find or load main class bicycledemo.BicycleDemo
Java Result: 1
BUILD SUCCESSFUL (total time: 0 seconds)
Any help would be greatly appreciated! Thanks!I have decided to finally start learning Java and am currently, and slowly, making my way through the tutorials. I am only on chapter 2 in the class section. While reading I came uponJava Tutorials Sample Codeand wanted to try and compile it in netbeans. This is the code that it contained:
class BicycleDemo {
1) New project
2) Select Java under Categories and Java Application under Projects
3) I type BicycleDemo in the Project Name Field and click finish
4) I delete all the template code and paste the above code into the field
5) I click run and get the following error:
run:
Error: Could not find or load main class bicycledemo.BicycleDemo
Java Result: 1
BUILD SUCCESSFUL (total time: 0 seconds)
Thanks for posting ALL of the info - most posters don't do that and it makes it hard to help them.
Your exception shows it is looking for 'bicycledemo.BicycleDemo' so the 'BicycleDemo' class is expected to be in a package named 'bicycledemo'. The code you posted and the code at the link does NOT use a package statement.
When you create a new project in NetBeans it will AUTOMATICALLY add a package name to the start of a new class file. So, unknown to you, it created a package named 'bicycledemo' and put the class file in it.
In step #4 you deleted the template code (which had a 'package bicycledemo' statement in it) and replaced it with the tutorial code.
Likely you didn't notice the package statement in the template before you deleted the template code.
package bicycledemo
.Add that package statement as the first line of the class source code.
You should generally ALWAYS put your code in a package. For some reasons many of the tutorials do NOT do that. -
Hi,
Am getting below error while performing ESRI shapefile into oracle database table.,
C:\>java -cp G:\app\product\11.2.0\dbhome_1\jdbc\lib\ojdbc14.jar;G:\app\product\
11.2.0\dbhome_1\md\jlib\sdoutl-1.0.jar;\G:\app\product\11.2.0\dbhome_1\md\jlib\s
doapi-1.0.jar oracle.spatial.util.SampleShapefileToJGeomFeature -h localhost -p
1521 -sn orcl -u MDSYS -d selva -t shapes -f F:\saptial\Africa.shp -r 8307 -g ge
ometry
Error: Could not find or load main class oracle.spatial.util.SampleShapefileToJGeomFeature
Am using java version as ,
C:\>java -version
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) Client VM (build 24.51-b03, mixed mode, sharing)
And also tried in MapBuilder its working fine.,but i need to import using java utility can any help me too this.,i had tried below this way and problem got solved .,
Before i have downloaded
sdoutl-11.2.0.jar and sdoapi-11.2.0.jar used it for import shp file ..
C:\>set ORACLE_HOME=G:\app\product\11.2.0\dbhome_1
C:\Users\SELVA>cd downloads
C:\Users\SELVA\Downloads>cd statplanet_zambia
C:\Users\SELVA\Downloads\StatPlanet_Zambia>cd map
located into particular path and set my oracle home
C:\Users\SELVA\Downloads\StatPlanet_Zambia\map>set ORACLE_HOME=G:\app\product\11.2.0\dbhome_1
C:\Users\SELVA\Downloads\StatPlanet_Zambia\map>java -classpath %ORACLE_HOME%\jdb
c\lib\ojdbc5.jar;%ORACLE_HOME%\md\jlib\sdoutl-11.2.0.jar;%ORACLE_HOME%\md\jlib\sdoapi-11.2.0.jar oracle.spatial.util.SampleShapefileToJGeomFeature -h localhost -p 1521 -s orcl -u MDSYS -d selva -t zambia -f map -r 8307 -g geometry
host: localhost
port: 1521
sid: orcl
db_username: MDSYS
db_password: selva
db_tablename: zambia
shapefile_name: map
SRID: 8307
db_geometry_column: geometry
Connecting to Oracle10g using...
localhost, 1521, orcl, MDSYS, selva, zambia, map, null, 8307
Dropping old table...
java.sql.SQLException: ORA-00942: table or view does not exist
Creating new table...
9 record(s) converted.
Done.
Thanks
Selva -
RSPC Variant does not exist - Could not find or load print parameters
We are on BI 7.0 (support pack SAPKW70017). We recently freshed test system from production. After the refresh, we have problems opening all the process chains.
1. When I go to RSPC to open a process chain, I get many messages like this:
Variant &0000000067180 does not exist (there are different variant numbers)
Message no. DB612
Diagnosis
You selected variant &0000000067180 for program RSPROCESS.
This variant does not exist.
2. When I go to SM21 to check the system log, it displays many entries like below:
EJ F Could not find or load print parameters for step 1, job BI_PROCESS_TRIGGER/09134500
Documentation for system log message EJ F :
An error occurred during loading of the print parameters for a
background job step.
The print parameter record may have been deleted even though there was
a still a step that needed that data. This is an error as the
reorganization of the print parameters should prevent this from
happening.
To fix the problem, edit the step and save it, copy the job, or
schedule a new job. The print parameters will be regenerated in all
these cases.
3. I applied the OSS note 1169659 - Correction: Process variants not entered by BDLS. The Basis rerun BDLS. But it did not fix the problem.
Would appreciate if someone could provide any help.
Thank you.Hi Rebecca.
1) Please verify if exist process types called 'unknown job'. If exist: delete process types called 'unknown job' in your process chain. To do that please remove the chain from scheduling (menu bar > process chain > remove from schedule), afterwards switch the detail view on (menu bar > view) > right mouse click on the process type "unknown job" > displaying scheduled jobs > delete that job. After deletion of the 'unknown jobs' activate and schedule your process chain again.
2) After the removal of the 'unknown jobs' please check if the error messages with the missing variants pop up when calling your process chain disappears. If not, please implement and execute the attached report Z_FIND_JOBS_WITHOUT_VARIANT which deletes the jobs without variants.
I have already attached report as Report Z_FIND_JOBS_WITHOUT_VARIANT, you can download and create the report accordingly.
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
REPORT Z_FIND_JOBS_WITHOUT_VARIANT.
data: l_t_job type table of tbtcp with header line,
l_s_varsel TYPE rsvar,
l_t_variant TYPE TABLE OF rsparams.
parameters: delete type rs_bool.
select * from tbtcp as job into table l_t_job
where progname = 'RSPROCESS'
and exists ( select * from tbtco
where jobname = job~jobname
and jobcount = job~jobcount
and status = 'S' ).
loop at l_t_job.
l_s_varsel-report = l_t_job-progname.
l_s_varsel-variant = l_t_job-variant.
CALL FUNCTION 'RS_VARIANT_CONTENTS'
EXPORTING
report = l_s_varsel-report
variant = l_s_varsel-variant
execute_direct = 'X'
TABLES
valutab = l_t_variant
EXCEPTIONS
variant_non_existent = 1
variant_obsolete = 2
OTHERS = 3.
if sy-subrc <> 0.
write: / l_t_job-jobname, l_t_job-jobcount.
if delete = 'X'.
CALL FUNCTION 'BP_JOB_DELETE'
EXPORTING
JOBCOUNT = l_t_job-jobcount
JOBNAME = l_t_job-jobname
EXCEPTIONS
OTHERS = 1.
IF SY-SUBRC <> 0.
write 'not deleted'.
else.
write 'successfully deleted'.
ENDIF.
endif.
endif.
endloop.
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
I hope I can be helpful.
Thanks,
Walter Oliveira. -
ADF Mobile : Could not find property inputvalue in class java.math.BigDecimal
I tried to add an input text item to the list view like below and received an error message while navigating out of the input text field.
"Could not find property inputvalue in class java.math.BigDecimal".
Can someone show me some pointers about what is wrong with the below code.
JDEV Version : 11.1.2.4
<amx:listView var="row" value="#{bindings.Empdtls.collectionModel}"
fetchSize="#{bindings.Empdtls.rangeSize}" styleClass="adfmf-listView-insetList"
id="lv1" editMode="true">
<amx:listItem id="li1">
<amx:tableLayout width="100%" id="tl1">
<amx:rowLayout id="rl1">
<amx:cellFormat width="10px" id="cf3"/>
<amx:cellFormat width="60%" height="43px" id="cf2">
<amx:outputText value="#{row.ClassCode}" id="ot3"/>
</amx:cellFormat>
<amx:cellFormat width="10px" id="cf4"/>
<amx:cellFormat width="40%" halign="end" id="cf1">
<amx:inputText value="#{row.bindings.Salary.inputValue}" simple="true" id="it41"/>
</amx:cellFormat>
</amx:rowLayout>
</amx:tableLayout>
</amx:listItem>
</amx:listView>Hi,
#{row.bindings.Salary.inputValue) doesn't access a binding in ADF Mobile. Use #{row.Salary} instead.
Frank -
Could not find Patch CR112484_81sp1.jar for WEBLOGIC 8.1
Due problem with ACTUATE Server 7 WE have to install this patch but we could not
find it ?
Where is it on WL8.1 reference site ?
ThanksHello,
As these patch is not publically avialble through BEA Advisories....so you need to open a support case to get this patch. Or otherwise you can upgrade to WLS 8.1 sp2 ,as this issue is fixed in this service pack.
Regards,
Kuldeep. -
URGENT: Could not find the custom class
Hi,
I'm moving from 3.1->3.2
I loaded the AppModule developed with 3.1 under which it is working ok. Now I get the following error from Appmodule tester:
JBO-26022: Could not find and load the custom classs Ingreso.EntityImpl
Any help regarding to subject matter is appreciated.
nullHi again,
I'm not sure if there's a missunderstanding here.
When yawmark told you to type the command exactly as I had posted it (period included), he did not mean that you should type ".class" after the name of your class, but a period after the "-cp" (separated by a space). So, again:
In your command window, go to the directory where your Javax class is located, and type:
java -cp . Javax(NOTICE THE PERIOD after -cp, that's the important thing). To make sure, you can copy-paste the line above, but make sure you're executing it from the directory where Javax is located. -
Can not start WebLogic in Eclipse. Error: "Could not find the main class."
I have installed Eclipse 2.0 and WebLogic Server 6.1. and the WebLogc plug in from GENUITEC (and jdk1.3.1_04, on Win2K Server). After I have done the configuration, the WebLogic start/stop buttons are integried into the Eclipse Toolbar, but when I click on the start button to start Weblogic, it pops up a dialog box "Java Virtual Machine Launcher" with message: "Could not find the main class. Program will exit!"
Starting WebLogc Server from the Start panel works fine.
Does any one have seen this before or have a suggestion what I should do?
Many many thanks in advance.
HuanWeblogic must be started with a full JDK; otherwise
JSPs and dynamic EJB stubs could not be deployed. The
error message
indicates you are attempting to use a JRE. Configure
Eclipse JRE to point to a JDK. The product
documentation will help you with this process. It does not work for me. :-(
I have tried JDK 1.3.1 and 1.4.1: same result: I get a "Could not find the main class: Program will exit"
For free expert support please consider contacting
Genuitec at [email protected] If just want any
answer ask a newsgroup.
WayneI'll try the support at '[email protected]' :)
Michel
Michel Szybist
[email protected]
Fax: +33 (0)173729897
SMS: http://www.szybist.net/ -
At first I thought it was just my own programs that I created with netbeans that had this problem; however, even the demo programs under the sdk folder give me this problem when i try to run them. Virtual Machine Loader will just come up with pop up saying "Could not find the main class. Program will not exit"
I am a fairly competent programmer, not new to java. But I am new to guis in java, and using netbeans to create them. The program I am creating gives me this error with javaw and with java it will tell me NoClassDef for grouplayout. I checked the manifest file it looks alright:
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.7.0
Created-By: 10.0-b19 (Sun Microsystems Inc.)
Main-Class: desktopapplication2.DesktopApplication2
Class-Path: lib/appframework-1.0.3.jar lib/swing-worker-1.1.jar lib/swing-layout-1.0.1.jar lib/ant-swing.jar lib/SwingSet2.jar lib/swing-layout-1.0.3.jar
X-COMMENT: Main-Class will be added automatically by build
}(brackets not included)
I am sort of lost.... Do I need to install ant separately?
I feel like there may be some classpath issues?
I have java 1.6 update 4 and netbeans 6.0
I am completely lost I have been working on fixing this for the past 2 or 3 days now, and reading up all the information.
Note: This is just a standard desktop application.
Also I just thought of something. If I have install the development kit do I also need to install the framework or whatever for 6.0 separately? Meaning installing the latest version of jvm. Sorry if this isn't clear i forgot what it is called.
Sorry if this sounds like a beginner question or something, but I am going crazy. If i am having this much trouble running my own program i really hope distributing files won't be this much of a nightmare....Please become familar with resources at the NetBeans site. There are tutorials and FAQs that cover usage of NB, and how to do things like you're asking.
See my reply in this thread for more information
http://forum.java.sun.com/thread.jspa?threadID=5270931&tstart=0 -
Jar file could not find main class.. I cant see why?
I have read loads of tutorials on this and it should be very straight forward but i STILL cant make a working jar file of my program.. please see if you can see anything wrong with what im doing..
my program is one .java file that compiles perfectly, and is runnable both through eclipse and by using the command prompt.. i made a jar file using both eclipse and the command prompt, and neither worked.. every time i run it by double clicking it i get the error "could not find main class, program will exit". here is the contents of my jar:
CorePackage\IPEmailer.class
CorePackage\IPEmailer$1.class
CorePackage\IPEmailer$SMTPAuthenticator.class
META-INF\MANIFEST.MF
the MANIFEST.MF file contains:
Manifest-Version: 1.0
Class-path: .
Created-By: 1.6.0_02 (Sun Microsystems Inc.)
Main-Class: CorePackage.IPEmailer
(yes there is a blank line at the end)
the class mentioned in 'Main-Class' has a main method that looks like this:
public static void main(String[] args) {
// TODO Auto-generated method stub
new IPEmailer();
}the program uses 2 external jar files:
activation.jar
mail.jar
and reads a file called:
ipemailer.ini
and writes a file called:
ip.txt
the program has no GUI and is intended to run 'silently' in the background
please help me understand what is wrong with thispackage CorePackage;
import javax.mail.*;
import javax.mail.Authenticator;
import javax.mail.PasswordAuthentication;
import javax.mail.internet.*;
import java.util.*;
import java.io.*;
import java.net.*;
public class IPEmailer implements Runnable{
* @param args
String recipientsinput[]={""};
String subject;
String body;
String server;
String user;
String pass;
String from;
String urlString = "http://www.whatismyip.org";
String currentIP;
String ipFromFile;
boolean webFailed;
long interval = 900000; //15 mins
long oldInterval;
Thread t = new Thread(this);
public static void main(String[] args) {
// TODO Auto-generated method stub
new IPEmailer();
public IPEmailer(){
..........etccould the problem be that the class is a thread? i cant see why it would be, but ive never made a jar where the main class also 'implements runnable' -
JAR: - Could not find main class
I'm sorry, I know this issue has been posted before but I am a bit confused with my situation.
After making a jar on my computer, I run it, and the program loads and runs perfectly.
However, when I try the jar on someone else's computer, it doesn't work, and gives the "could not find main class" message. The other computer has JRE but not JDK, so I don't know if that makes a difference.
Anyways, my main class file is located in a package called hw2, and the whole project is located in a folder called HW2. So my class file is located in something like C:\School\HW2\hw2\Main.class.
My Manifest.txt file is located in the \School\HW2 directory and has the following with a new line at the end:
Main-Class: hw2.Main
At the command prompt, I go to my C:\School\HW2 directory and I type the following to create the jar:
jar cvmf Manifest.txt test.jar hw2\*.class
My jar file has the following contents:
META-INF/
META-INF/MANIFEST.MF
hw2/Bank.class
hw2/GUIInterface.class
hw2/Main.class
Did I write the manifest.txt file correctly? Am I in the right directory when creating the jar file? Am I executing the jar command wrong? How come it works on my computer but not on someone else's?Are you certain you're executing the jar in the same way on both machines?
For example, are you sure you're not executing the unjarred class files when you run on your local machine? -
Java Access Bridge 1.1 Could not find the main class
When I try to load Java Access Bridge 1.1 I receive the following error:
Could not find the main class. Program will exit.
Does anyone know why?you must check with the classpath
please see that you have not repeated %classpath%
at the end of the class path like you do in win98.
similiarly with %path%
in win2000 it is automatically taken care off. -
Could not find Main Class while executing JAR
Hello all,
I am having a simple Jar file that contains one java class that merely displays a window. I am using NetBeans IDE to create the JAR file. When i execute this JAR file by double clicking on the file, it works fine on the machine. However, if i try to execute this same file on any other windows computer, it gives an error "Could not find the main class. Program will exit."
In other words, the JAR file is only working on the computer that has NetBeans and JDK installed on. Not on any other machine. Although the other machines have the JAVA Virtual Machine installed.
I would appreciated any help on this topic.I had the same problem (i.e. Message-Box with "Could not find the main class. Program will exit.")
After insuring that the manifest contained a Main-Class: argument and that the argument pointed to the right class, I started the jar via java -jar myjar.jar and read the stacktrace, which is much better than the popup-window.
In my case the error was, that the Main-Class could not be loaded due to another referenced class, which was not on the classpath. (i.e. it was not in the same jar-File and the manifest didn't include a Class-Path: argument.)
After adding the correct Class-Path: argument in the manifest, the problem went away.
I now have the following setup:
myjar.jar and somethirdparty.jar in the same directory.
myjar.jar contains a manifest which includes the lines
Class-Path: somethirdparty.jar
Main-Class: my.package.and.MainClassafter the normal Manifest-header. -
Hi,
I have installed Oracle11g_win64_11gR1, Database and Client.
The issue is unable to invoke "sqldeveloper", getting the following error message. Could you please help ?
FYI. I have already downloaded and installed installed JRE and JDK.
ie. C:\Program Files (x86)\Java\jre6\ and C:\Program Files\Java\jdk1.6.0_24, still did not work.
C:\Users\oracle>java -version
java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02, mixed mode)
Let me know, if you need more information. Here is the error message.
Error Message
=========
(1) if I invoke sqldeveloper, directly from the location " C:\app\oracle\product\11.1.0\db_1\sqldeveloper\sqldeveloper\bin " using explorer, I do get error message
"Unable to find a java Virtual Machine.
To point to a location of java Virtual machine please refer to the Oracle9i JDeveloper Install Guide ( jdev/install.html)"
(2) if I invoke sqldeveloper, directly from the locationC:\app\oracle\product\11.1.0\client_1\sqldeveloper, it prompts me to enter "full path for java.exe".
When I enter full path and continue, still it continue to prompt and ask the same input.
(3) if I invoke sqldeveloper from from command prompt using the batch file "sqldeveloper.bat"
C:\Users\oracle>C:\app\oracle\product\11.1.0\client_1\sqldeveloper\sqldeveloper\
bin\sqldeveloper.bat
C:\Users\oracle>java -Xmx512M -Xverify:none -XX:JavaPriority10_To_OSPriority=10
-XX:JavaPriority9_To_OSPriority=9 -Doracle.ide.util.AddinPolicyUtils.OVERRIDE_F
LAG=true -Dsun.java2d.ddoffscreen=false -Dwindows.shell.font.languages= -Dide.co
nf="sqldeveloper.conf" -Dide.home.dir.name=.sqldeveloper -classpath ..\..\ide\l
ib\ide-boot.jar;..\..\jdev\lib\xmleditor.jar;..\..\ide\lib\oicons.jar;..\..\..\j
dbc\lib\ojdbc5.jar;..\..\jlib\jewt4.jar;..\..\jlib\share.jar;..\..\sqldeveloper\
lib\jle2.jar oracle.ide.boot.Launcher
Exception in thread "main" java.lang.NoClassDefFoundError: oracle/ide/boot/Launc
her
Caused by: java.lang.ClassNotFoundException: oracle.ide.boot.Launcher
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: oracle.ide.boot.Launcher. Program will exit.
OS
==============
MS Windows 7 Home Premium
sqldeveloper.conf
===================
SetSkipJ2SDKCheck true
IncludeConfFile ../../jdev/bin/ide.conf
AddVMOption -Dapple.laf.useScreenMenuBar=true
AddVMOption -Dcom.apple.mrj.application.apple.menu.about.name="SQL_Developer"
AddVMOption -Dcom.apple.mrj.application.growbox.intrudes=false
AddVMOption -Dcom.apple.macos.smallTabs=true
AddVMOption -Doracle.ide.util.AddinPolicyUtils.OVERRIDE_FLAG=true
AddJavaLibFile ../../jdev/lib/xmleditor.jar
AddJavaLibFile ../../ide/lib/oicons.jar
AddJavaLibFile ../../jlib/jewt4.jar
AddJavaLibFile ../../jlib/share.jar
AddJavaLibFile ../ide/jlib/xmlef.jar
AddJavaLibFile ../../sqldeveloper/lib/jle2.jar
AddJavaLibFile ../../sqldeveloper/lib/oracle.dbtools.logging.jar
AddVMOption -Dsun.java2d.ddoffscreen=false
AddVMOption -Dwindows.shell.font.languages=
IncludeConfFile sqldeveloper-nondebug.conf
SetJavaHome C:\Program Files\Java\jdk1.6.0_24
Edited by: sivapara on Feb 16, 2011 1:08 PMI was able to resolve this issue by performing following.
1. Go to the location where sqldeveloperW.exe is being executed from.
2. You will find a file sqldeveloper.conf in that location. Edit this file and change the value of IncludeConfFile to point to actual place. For me following were old and new values.
OLD (Wrong) : IncludeConfFile ../../jdev/bin/ide.conf
NEW (Correct) : IncludeConfFile ../../ide/bin/ide.conf
After making above change in the sqldeveloper.conf file. Save and close it. Restart SQLDeveloper. You will not get the error anymore.
Thanks
Ravi
Maybe you are looking for
-
Firefox crashes as soon as Flash video tries to load and Safari shows the error "Plug-in Failure"
I am unable to use Youtube or view Flash video on any sites. Firefox crashes/quits as soon as a video tries to load and Safari shows the error "Plug-in Failure". I have uninstalled Flash, downloaded a fresh version and installed, but no joy. I am usi
-
Iphone 5, iOS 7.0.4 Ok, this seems obvious but how do I get rid of this welcome back popup? Every time I open a game this redundant "welcome back!" message pops up taking up a good quarter of the screen and frequently causing me to die. I can't tell
-
T440s Win 8.1 Remote Desktop two finger scrolling
Two finger touchpad scrolling in Chrome desktop mode has been pretty bad on my T440s until the recent driver update. But after the update, I've noticed now that in the tiles version of remote desktop, two finger scrolling no longer works. It acts a
-
Display byte array of jpeg in jsp
I have a byte array of jpeg image in my jsp. Now I want to display it in my image. I tried but i could not see the image but a red mark image is comming on the screeen Please help me out. I deadly help need ASAP. Thanks in advance. this is how i trie
-
New and Persistent MobileMe Error Message
A new and persistent MobileMe Error Message keeps hounding me. No troubles since the demise of MobileMe until lately. Please see the attached photo. So far, I've deleted all references to MobileMe within my Keychain, re-checked my information in Appl