Classes in JAR not accessible
Hi,
I have one problem. I have put one JAR to WEB-INF/lib and importing the package bundled in that JAR in a servlet but I am getting CLASSDEFNOTFOUND error for classes bundled in JAR.
But if I extract JAR to WEB-INF/classes folder then there in no problem while loading servlet.
Could anyone put some light on that why classes are not available from JAR in WEB-INF/lib folder.
Regards,
Jashan
Hi,
it is possible that one class in your jar file use some other classes which are not in your classpath?
The NoClassDefFoundError shows you the name of the missing class is this class in your jar or a class you refer.
Otherwise post the important part from the error message.
Regards
Torsten
Similar Messages
-
Why are protected fields not-accessible from sub-classed inner class?
I ran across a situation at work where we have to sub-class an inner class from a third-party package. So, it looks something like this...
package SomePackage;
public class Outer {
protected int x;
public class Inner {
package OtherPackage;
public class NewOuter extends Outer {
public class NewInner extends Outer.Inner {
}Now the NewInner class needs to access protected variables in the Outer class, just like the Inner class does. But because NewOut/NewInner are in a different package I get the following error message.
Variable x in class SomePackage.Outer not accessible from inner class NewOuter. NewInner.You can still access those protected variables from the NewOuter class though. So, I can write accessor methods in NewOuter for NewInner to use, but I am wondering why this is. I know that if NewOuter/NewInner are in the same package as Outer/Inner then everything works fine, but does not when they are in different packages.
I have to use JDK1.1.8 for the project so I don't know if there would be a difference in JDK1.2+, but I would think that nothing has changed. Anyway, if you know why Java disallows access as I have detailed please let me know.Although I don't have the 1.1.8 JDK installed on my system, I was able to compile the following code with the 1.3.1_01 JDK and run it within a Java 1.1.4 environment (the JVM in the MSIE 5.5 browser). As long as you don't access any of the APIs that were introduced with 1.2+ or later, the classes generated by the JDK 1.2+ javac are compatible with the 1.1.4+ JVM.
//// D:\testing\SomePackage\Outer.java ////package SomePackage ;
public class Outer {
protected int x ;
public Outer(int xx) {
x = xx ;
public class Inner {
}//// D:\testing\OtherPackage\NewOuter.java ////package OtherPackage;
import SomePackage.* ;
public class NewOuter extends Outer {
public NewOuter(int xx) {
super(xx) ;
public class NewInner extends Outer.Inner {
public int getIt() {
return x ;
}//// D:\testings\Test.java ////import OtherPackage.* ;
import java.awt.* ;
import java.applet.* ;
public class Test extends Applet {
public void init () {
initComponents ();
private void initComponents() {
add(new Label("x = ")) ;
int myx = new NewOuter(3288).new NewInner().getIt() ;
TextField xfld = new TextField() ;
xfld.setEditable(false) ;
xfld.setText(Integer.toString(myx)) ;
add(xfld) ;
}//// d:\testing\build.cmd ////set classpath=.;D:\testing
cd \testing\SomePackage
javac Outer.java
cd ..\OtherPackage
javac NewOuter.java
cd ..
javac Test.java//// d:\testing\Test.html ////<HTML><HEAD></HEAD><BODY>
<APPLET CODE="Test.class" CODEBASE="." WIDTH=200 HEIGHT=100></APPLET>
</BODY></HTML> -
Disk Utility does not repair Permissions (shows repaired but just come back up again). See problems:
Verify permissions for “Macintosh HD”
Permissions differ on "System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/dt.jar", should be lrwxr-xr-x , they are lrw-r--r-- .
Permissions differ on "System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/jce.jar", should be lrwxr-xr-x , they are lrw-r--r-- .
Permissions differ on "System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/jconsole.ja r", should be lrwxr-xr-x , they are lrw-r--r-- .
Permissions differ on "System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/management- agent.jar", should be lrwxr-xr-x , they are lrw-r--r-- .
User differs on "System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib", should be 0, user is 95.
Permissions differ on "System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/dt.jar", should be -rw-r--r-- , they are -rwxr-xr-x .
Permissions differ on "System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/jce.jar", should be -rw-r--r-- , they are -rwxr-xr-x .
Permissions differ on "System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/management -agent.jar", should be -rw-r--r-- , they are -rwxr-xr-x .
Permissions differ on "System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/security/b lacklist", should be lrwxr-xr-x , they are lrw-r--r-- .
User differs on "System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Libraries", should be 0, user is 95.
Permissions differ on "System/Library/Java/Support/Deploy.bundle/Contents/Home/lib/security/cacerts", should be lrwxr-xr-x , they are lrw-r--r-- .
Permissions differ on "System/Library/Java/Support/Deploy.bundle/Contents/Resources/Java/deploy.jar", should be lrwxr-xr-x , they are lrw-r--r-- .
Permissions differ on "System/Library/Java/Support/Deploy.bundle/Contents/Resources/JavaPluginCocoa.b undle/Contents/Resources/Java/deploy.jar", should be lrwxr-xr-x , they are lrw-r--r-- .
Permissions differ on "System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Support/Rem ote Desktop Message.app/Contents/Resources/zh_TW.lproj/UIAgent.nib", should be drwxr-xr-x , they are -rwxr-xr-x .
Permissions differ on "System/Library/CoreServices/RemoteManagement/AppleVNCServer.bundle/Contents/Su pport/LockScreen.app/Contents/Resources/zh_TW.lproj/MainMenu.nib", should be drwxr-xr-x , they are -rwxr-xr-x .
Permissions differ on "System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Support/Rem ote Desktop Message.app/Contents/Resources/zh_CN.lproj/UIAgent.nib", should be drwxr-xr-x , they are -rwxr-xr-x .
Permissions differ on "System/Library/CoreServices/RemoteManagement/AppleVNCServer.bundle/Contents/Su pport/LockScreen.app/Contents/Resources/zh_CN.lproj/MainMenu.nib", should be drwxr-xr-x , they are -rwxr-xr-x .
Permissions differ on "System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Support/Rem ote Desktop Message.app/Contents/Resources/ko.lproj/UIAgent.nib", should be drwxr-xr-x , they are -rwxr-xr-x .
Permissions differ on "System/Library/CoreServices/RemoteManagement/AppleVNCServer.bundle/Contents/Su pport/LockScreen.app/Contents/Resources/ko.lproj/MainMenu.nib", should be drwxr-xr-x , they are -rwxr-xr-x .
Permissions differ on "System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Support/Rem ote Desktop Message.app/Contents/Resources/Dutch.lproj/UIAgent.nib", should be drwxr-xr-x , they are -rwxr-xr-x .
Permissions differ on "System/Library/CoreServices/RemoteManagement/AppleVNCServer.bundle/Contents/Su pport/LockScreen.app/Contents/Resources/Dutch.lproj/MainMenu.nib", should be drwxr-xr-x , they are -rwxr-xr-x .
Permissions differ on "System/Library/CoreServices/RemoteManagement/AppleVNCServer.bundle/Contents/Su pport/LockScreen.app/Contents/Resources/Italian.lproj/MainMenu.nib", should be drwxr-xr-x , they are -rwxr-xr-x .
Permissions differ on "System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Support/Rem ote Desktop Message.app/Contents/Resources/Spanish.lproj/UIAgent.nib", should be drwxr-xr-x , they are -rwxr-xr-x .
Permissions differ on "System/Library/CoreServices/RemoteManagement/AppleVNCServer.bundle/Contents/Su pport/LockScreen.app/Contents/Resources/Spanish.lproj/MainMenu.nib", should be drwxr-xr-x , they are -rwxr-xr-x .
Permissions differ on "System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Support/Rem ote Desktop Message.app/Contents/Resources/French.lproj/UIAgent.nib", should be drwxr-xr-x , they are -rwxr-xr-x .
Permissions differ on "System/Library/CoreServices/RemoteManagement/AppleVNCServer.bundle/Contents/Su pport/LockScreen.app/Contents/Resources/French.lproj/MainMenu.nib", should be drwxr-xr-x , they are -rwxr-xr-x .
Permissions differ on "System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Support/Rem ote Desktop Message.app/Contents/Resources/German.lproj/UIAgent.nib", should be drwxr-xr-x , they are -rwxr-xr-x .
Permissions differ on "System/Library/CoreServices/RemoteManagement/AppleVNCServer.bundle/Contents/Su pport/LockScreen.app/Contents/Resources/German.lproj/MainMenu.nib", should be drwxr-xr-x , they are -rwxr-xr-x .
Permissions differ on "System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Support/Rem ote Desktop Message.app/Contents/Resources/Japanese.lproj/UIAgent.nib", should be drwxr-xr-x , they are -rwxr-xr-x .
Permissions differ on "System/Library/CoreServices/RemoteManagement/AppleVNCServer.bundle/Contents/Su pport/LockScreen.app/Contents/Resources/Japanese.lproj/MainMenu.nib", should be drwxr-xr-x , they are -rwxr-xr-x .
Permissions differ on "System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/dt.jar", should be -rw-r--r-- , they are lrw-r--r-- .
Permissions differ on "System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/jce.jar", should be -rw-r--r-- , they are lrw-r--r-- .
Permissions differ on "System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/jconsole.jar ", should be -rw-r--r-- , they are lrw-r--r-- .
Permissions differ on "System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/management-a gent.jar", should be -rw-r--r-- , they are lrw-r--r-- .
Permissions differ on "System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/dt.jar", should be lrwxr-xr-x , they are -rwxr-xr-x .
Permissions differ on "System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/jce.jar", should be lrwxr-xr-x , they are -rwxr-xr-x .
Permissions differ on "System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/management- agent.jar", should be lrwxr-xr-x , they are -rwxr-xr-x .
Permissions differ on "System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/security/bl acklist", should be -rw-r--r-- , they are lrw-r--r-- .
Permissions differ on "System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Resources/JavaPlugin Cocoa.bundle", should be drwxr-xr-x , they are lrwxr-xr-x .
Permissions differ on "System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Resources/JavaPlugin Cocoa.bundle/Contents/Resources/Java/deploy.jar", should be -rw-r--r-- , they are lrw-r--r-- .
Permissions differ on "System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Resources/JavaPlugin Cocoa.bundle/Contents/Resources/Java/libdeploy.jnilib", should be -rwxr-xr-x , they are lrwxr-xr-x .
Permissions differ on "System/Library/Frameworks/JavaVM.framework/Versions/A/Resources/Deploy.bundle/ Contents/Home/lib/security/cacerts", should be -rw-r--r-- , they are lrw-r--r-- .
Permissions differ on "System/Library/Frameworks/JavaVM.framework/Versions/A/Resources/Deploy.bundle/ Contents/Resources/Java/deploy.jar", should be -rw-r--r-- , they are lrw-r--r-- .
Permissions differ on "System/Library/Frameworks/JavaVM.framework/Versions/A/Resources/Deploy.bundle/ Contents/Resources/Java/libdeploy.jnilib", should be -rwxr-xr-x , they are lrwxr-xr-x .
Warning: SUID file "System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/MacOS/ARDAg ent" has been modified and will not be repaired.
Permissions differ on "System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Support/Rem ote Desktop Message.app/Contents/Resources/English.lproj/UIAgent.nib", should be drwxr-xr-x , they are -rwxr-xr-x .
Permissions differ on "System/Library/CoreServices/RemoteManagement/AppleVNCServer.bundle/Contents/Su pport/LockScreen.app/Contents/Resources/English.lproj/MainMenu.nib", should be drwxr-xr-x , they are -rwxr-xr-x .Ignore all these.
http://support.apple.com/kb/TS1448?viewlocale=en_US -
Ojvmtc reports xy.jar is not a class or jar file
Hi
I am a little bit confuced because ojvmtc reports an error I can not imagine about:
oracle@cikic-desktop:~/Downloads/dom4j-1.6.1$ ojvmtc /u01/app/oracle/product/11.1.0/mds/jdk/jre/lib/jce.jar
/u01/app/oracle/product/11.1.0/mds/jdk/jre/lib/jce.jar is not a class or jar file
The set is closed
But jce.jar is a jar file and I can inflate it:
oracle@cikic-desktop:/tmp/fo$ jar -xf /u01/app/oracle/product/11.1.0/mds/jdk/jre/lib/jce.jar
oracle@cikic-desktop:/tmp/fo$ ls -l
total 8
drwxr-xr-x 3 oracle oinstall 4096 2010-05-03 19:40 javax
drwxr-xr-x 2 oracle oinstall 4096 2010-05-03 19:40 META-INF
And if I do a ojvm on a class file everything is working like expected:
oracle@cikic-desktop:/tmp/fo$ ojvmtc javax/crypto/Mac.class
The set is not closed
96 classes are missing
So It must be a configuration mistake somewhere ...
Can you please help me out.
Thanks
Christian MaierCoole thanks, this works pretty well!
Chris
oracle@cikic-desktop:~$ cp /u01/app/oracle/product/11.1.0/mds/jdk/jre/lib/jce.jar /tmp/
oracle@cikic-desktop:~$ ojvmtc /tmp/jce.jar
The set is not closed
131 classes are missing -
Tomcat 4.2 is not loading a class in jar file
Hi All,
I have a java class B in a jar file which is in tomcat's lib directory. I am trying to instantiate class B from class A which is in the same jar file. But I am unable to create an instance of class B and the control in the program simply advance to the next line and there is no error printed in tomcat log files.
Can anyone please tell me what am I missing here ... why class A is getting loaded correctly whereas class B is not loaded by tomcat ?
Thanks & Regards,
Kumar.Can you sure that there is only a A class in the classpath of Tomcat, I advise you to add
some statements into the A class so that you can be sure which classloader is used
to load the A class. -
Method not accessible from other classes
Hi,
I ve defined a class and would like to create an instance of it from another class. That works fine, I am also able to access class variables. However the class method "calcul" which is defined as following, is not accessible from other classes:
class Server {
static String name;
public static void calcul (String inputS) {
int length = inputS.length();
for (int i = 0 ; i < length; i++) {
System.out.println(newServer.name.charAt(i)); }
If I create an instant of the class in the same class, the method is then available for the object.
I am using JBuilder, so I can see, which methods and variables are available for an object. Thanks for your helpcalcul is a static method, that means you do not need an instance of server to run this method. This method is also public, but your class Server is not, your Server class is package protected. So only classes within the same package has Server can use its method. How to use the calcul method?// somewhere in the same package as the Server class
Server.calcul( "toto" ); -
How to modify a specific class in jar file ?
I've downloaded a jar file for applet, the jar file works fine... but when I extract a specific class file from the jar file and just recompie it from my IDE (Eclipse) without even making any change and then compress again jar class files including the new modified class file instead of the old one (without any modifications to other classes)... then I get
(NoSuchMethodError ) exception whenever methods of other classes are invoked from within the modified class !!
...The manifist file of the jar file reads the following line
Created-By: 1.4.0_01 (Sun Microsystems Inc.)
I thought it means that jar class files were built using JDK 1.4.0_01 ...I used JDK 1.5.0_01 in my IDE...
I thought JRE incompatiblity was the reason of the problem so I downloaded JRE 1.4.0_01 and used it to build this class file... but i got the same exception..
so what is the main reason of the problem ? ...should I make changes to IDX files accompanying applet jar files ??
If no, then how can I overcome this problem and be able to change and rebuild a specific class from this jar file ?
(I cannot rebuild all classes in jar because there are errors I cannot resolve !!)Could you please clarify: do you want to run your project or a project from an independent jar?
In the first case just select Run Project from the project context menu or select a class with main method and click Run File in the class context menu.
Regarding the second case:
- I don't think there is such a feature in the IDE (running third party jars is not an IDE function). Could you explain why you need this? -
How to pack .class or .jar with jvm into an exe file?
In fact, .class or .jar files are middle layer files who need JVM to explain and run them. Sometimes it's unconvenient. Why not provide some tools to pack .class or .jar with jvm into exe file?
because java should be able to run on any OS. That is why SUN doesn't provide such tool. There are other company's who does provide such tool. Like JBuilder enterprise
-
How to convert .class into .jar file
Hi,
How to convert .class into .jar filejsf_VWP5.5.1 wrote:
Hi,
How to convert .class into .jar fileFrom a command prompt, cd to the location of your .class file(s).
If you want to create a simple jar, use: jar -cf Whatever.jar Whatever.class
If you want to compile all .class files in a directory into a jar, use *.class instead.
Now, I'm going to assume you want to create an executable jar... here's how to do that:
1) Create a blank text file; for this example, lets call it main.txt.
2) In the first line of main.txt, type: Main-class: Whatever ('Whatever' should be the name of the class in your program where the main() method is located)
3) Press enter to go to the next line (someone please correct me if I'm wrong, but if you don't insert the line break/CR after the Main-class: statement, this will not work... in my experience, this is true)
4) Make sure you save this file in the same directory as your .class file(s).
5) Type: jar -cmf Whatever.jar main.txt Whatever.class
...and that's about it. For more information on the usage of the jar command and to understand the switches (such as -cmf), try jar --help.
Hope that helps. -
ClassNotFound in case of class from jar in lib folder
Hello,
I get an application that I have to deploy on Weblogic AS. It is big ear with couple of wars inside. Let's say it is bigApp.ear.
It is deployed and state is Active. When go to browser and try to run an application I get an error. In logs I found ClassNotFoundException. The error is related to a class, let's say: com.some.package.Abc - I have this class in a jar file, let's say someFile.jar and it is in a folder WLS_FOLDER\samples\domains\wl_server\lib where:
- WLS_FOLDER is my WLS installation folder
- wl_server - name of my domain where I deploy an application.
I wrote a small application (simple form), let's say simpleApp.war. The application uses the class com.some.package.Abc, but the class is not put into the war (WEB-INF/lib) of my small aplication (I use Maven and dependency to someFile.jar has scope provided, so simpleApp.war does not contain it). The result is that simpleApp works fine and there is no error in logs. It creates an instance of com.some.package.Abc and correctly display toString() of the instance of the class in a browser. So this means that application simpleApp is able to see and use classes that are inside jars in WLS_FOLDER\samples\domains\wl_server\lib folder.
So my guess is that there is something in bigApp.ear but I don't know where to search. I read about class loaders hierarchy in Weblogic and Class Loader Filtering. But I have looked inside every weblogic.xml in bigApp.ear and wars that are inside and there is no filter on "com.some.package" or "com.some" or "com" only different packages.
Is there any other mechanism in Weblogic that could block the visibility of classes from jars from lib folder of domain to the applications that are deployed in that domain??
RegardsHi,
Place that something.jar file under Domain_Home / lib folder and restart the server it will included with in the classpath and your app will able to pick the class without any issue.
Regards,
Kal -
Class to jar communication at run time
Hi,
I am developing a application using jdk 1.4 and have following query:
I have an application that displays some information in various languages (according to the language selected), i.e english, french, german etc. Say I select english, the application will display "Hello World" in English language and so on for other languages..
So my app is divided into three parts:
1) Core application : displaying information
2) XML file: Containing list of languages in XML format. This XML File can be updated for adding new languages. The format of XML file is somewhat as
<LANGUAGE_NAME>___</LANGUAGE_NAME>
<CLASS_LANG>____</CLASS_LANG>
3) A seprate JAR file :Having set of classes corresponding to each language. The JAR file should be such that we can add classes for new languages added.
The Workflow of app is as follows:
When ever we run the application, the application reads the list of languages from the XML file and populats the list in a drop-down list box. Now, upon clicking a "GO" button, the application checks the language selected and calls the JAR will. It sends the class name corresponding to the language selected. And the class should return the information back to the application.
Now, this process should be dynamic, i.e user can update XML with new language and update the JAR file with new class name.
And upon just re-running the application, the application should be able to use features of new language.
Consider that we have already shipped the application. All we have to do is to send updated JAR file to the user. and ask him to update the XML file for new language. i.e no changes to be done at application. And application should communicate with update JAR files at the end user.
Now I have following queries:
1) Is the above process possible? If yes, then
2) How to communicate my application with the new class files in JAR file. i.e how to communicate my class with the UPDATED class in JAR file. Any prototype code to achieve this functionality would be of great help. Remember all this need to happen at run time.
I hope my question is clear. Feel free to ask any queries.
Thanks,
rdhJava has a mechanism to cope with this - though it is not XML-based:
java.util.ResourceBundle
I would store the required resource (a property file or the XML or a jar) separately. -
Classes without packages not accepted by ejbc compilation ?
Hey guys ...
I noticed something which I found unusual...I mite be missing something out here
When ejbc generates the Bean IMPL class , it does not put any import statements
in the generated java file but references all the classes in the Bean with their
absolute path ...
Now ..I have a 3rd-party jar which does not have certain classes in packages...and
I reference these classes within my Session Bean...the session bean compiles properly
..but when ejbc happens and the Impl class gets generated with the absolute path
and no imports...the compiler expects to find all these 3rd-party classes without
packages within the current session bean package itself which it will not..and
hence throws all sorts of "cannot resolve symbol" errors...
Does this mean that within my EJB beans I can never reference classes without
packages or is there something I am missing..?
Thanx,
KrishRob ,
I agree with u that giving classes without package is not a good practise..but
Itz got a history which believe it or not stems from another weblogic problem(related
to webservices..)
anywayz..that is another issue alltogether...
I don't think this bug is fixed...coz I checked a WLS70 Impl and it is still generating
the IMPL without the imports...
But can u clarify..what u wud mean by "fixing the bug" ..does it mean that the
Impl would start putting the imports..?
Thanx,
Krish
Rob Woollen <[email protected]> wrote:
I recall this bug being reported before. You might try the latest
service pack and see if it's been fixed already. Otherwise, you'll have
to contact [email protected]
FWIW, it's quite disturbing that a 3rd party would give you a jar
without a package.
-- Rob
Krishnan Venkataraman wrote:
Hey guys ...
I noticed something which I found unusual...I mite be missing
something out here
When ejbc generates the Bean IMPL class , it does not put any import
statements
in the generated java file but references all the classes in the Bean
with their
absolute path ...
Now ..I have a 3rd-party jar which does not have certain classes in
packages...and
I reference these classes within my Session Bean...the session bean
compiles properly
..but when ejbc happens and the Impl class gets generated with the
absolute path
and no imports...the compiler expects to find all these 3rd-party
classes without
packages within the current session bean package itself which it will
not..and
hence throws all sorts of "cannot resolve symbol" errors...
Does this mean that within my EJB beans I can never reference classes
without
packages or is there something I am missing..?
Thanx,
Krish -
Can I increase heap memory without specify any class or jar file??
Hi,
I tried to increase my heap memory in this way :
java -Xms256m -Xmx256m
but I got an error ... it's seem that I must specify a class java or a .jar file ...
This is the error :
Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)
where options include:
-client to select the "client" VM
-server to select the "server" VM
-hotspot is a synonym for the "client" VM [deprecated]
The default VM is client.
-cp <class search path of directories and zip/jar files>
-classpath <class search path of directories and zip/jar files>
A ; separated list of directories, JAR archives,
and ZIP archives to search for class files.
-D<name>=<value>
set a system property
-verbose[:class|gc|jni]
enable verbose output
-version print product version and exit
-version:<value>
require the specified version to run
-showversion print product version and continue
-jre-restrict-search | -jre-no-restrict-search
include/exclude user private JREs in the version search
-? -help print this help message
-X print help on non-standard options
-ea[:<packagename>...|:<classname>]
-enableassertions[:<packagename>...|:<classname>]
enable assertions
-da[:<packagename>...|:<classname>]
-disableassertions[:<packagename>...|:<classname>]
disable assertions
-esa | -enablesystemassertions
enable system assertions
-dsa | -disablesystemassertions
disable system assertions
-agentlib:<libname>[=<options>]
load native agent library <libname>, e.g. -agentlib:hprof
see also, -agentlib:jdwp=help and -agentlib:hprof=help
-agentpath:<pathname>[=<options>]
load native agent library by full pathname
-javaagent:<jarpath>[=<options>]
load Java programming language agent, see java.lang.instrument
-splash:<imagepath>
show splash screen with specified image
can I increase heap memory without specify any class or jar file??
thxchiara wrote:
Hi,
I tried to increase my heap memory in this way :
java -Xms256m -Xmx256m
but I got an error ... it's seem that I must specify a class java or a .jar file ...
This is the error :
Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)
can I increase heap memory without specify any class or jar file??The job of java.exe is to execute java bytecode.
What is it supposed to do with your request to use 256m of memory for heap
when you are not giving it a class or a jar to run? -
Warning: -jar not understood. Ignoring.
Hi, I'm an end user and am trying to find help with the below error. The Tripplite support said it's a java problem.
Can anyone please give me any suggestion on this problem?
Best regards
Starting PowerAlert Console...
Warning: -jar not understood. Ignoring.
Exception in thread "main" java.lang.NoClassDefFoundError: paconsole.jar
at gnu.gcj.runtime.FirstThread.run() (/usr/lib/libgcj.so.5.0.0)
at JvThreadRun(java.lang.Thread) (/usr/lib/libgcj.so.5.0.0)
at JvRunMain(java.lang.Class, byte const, int, byte const, boolean) (/usr/l
ib/libgcj.so.5.0.0)
at __gcj_personality_v0 (/opt/TrippLite/PowerAlert/console/java.version=1.4.2
at __libc_start_main (/lib/tls/libc-2.3.4.so)
at JvRegisterClasses (/opt/TrippLite/PowerAlert/console/java.version=1.4.2)Looks like you are using gcj, not Sun Java.
I don't know if gcj supports the '-jar' syntax. -
"Create Object " statement gives error: statement is not accessible
Hi All
U must b doing good.
I am new in ABAP Objects.
I have writeen a simple Class definition n Implimentasion code.
but whenever i write statement "Create object", it gives error.
'm working on SAP Dev 4.7.
the code was like this:-
class counter definition.
public section.
METHODS: set IMPORTING VALUE(set_value) TYPE i,
increment,
get EXPORTING VALUE(get_value) TYPE i.
private section.
DATA count TYPE i.
ENDCLASS.
CLASS counter IMPLEMENTATION.
METHOD set.
count = set_value.
ENDMETHOD.
METHOD increment.
count = count + 1.
ENDMETHOD.
METHOD get.
get_value = count.
ENDMETHOD.
ENDCLASS.
DATA: cnt_1 TYPE REF TO counter.
DATA number TYPE I VALUE 5.
CREATE OBJECT cnt_1 .
CALL METHOD cnt_1->set
EXPORTING set_value = number.
DO 3 TIMES.
CALL METHOD cnt_1->increment.
ENDDO.
CALL METHOD cnt_1->get
IMPORTING get_value = number.
write: number.
its giving error like:-"Statement is not accessible."
plz tell me the way to resolve this error.
thanx n regards
Prashant tiwarihi prashant....
this is the link to post your therads for abap objects:
[ABAP Objects;.
if you want to reward, on the left of every reply ther would be some radio buttons like answere, helpful answer,... so on. click the radio button which suits you. answered closes the thread and other points are displayed there itself.
---regards,
alex b justin
Maybe you are looking for
-
Plant Stock details for a given date
At present we are using MB52 for latest stock position of a plant. Is there any code for getting stock details for earlier date. As we are facing lot of problems while audits....
-
The Facebook app on my iPhone 4s no longer works
Two days ago my Facebook app on my iPhone 4s stop working. I deleted it and downloaded it but it still is not working. Is there a fix for this?
-
My udating Firefox failed and not I cannot access it
I tried updating Firefox on Tuesday and somehow it overloaded my Mac and now all I have is the Firefox symbol with a circle/slash through it and it does not function. I tried downloading SeaMonkey and have the same result. I know the two are related
-
Standard Fucntion module error
Hi, I need to calculate the standard deviation. For this there is a function module RRT_MATH_STDDEV exist. But this standard function module is not working. It is giving error as 'Error generating the test frame' when executing. I tried by calling t
-
Mobile number and telephone numbers not displying in lync contacts for other SIP domains.
Hi everyone, we recently migrated Lync 2010 to 2013, we have 2 SIP boc.bh and scys.gov.bh and local domain boc.local. lync users for boc.bh not getting telephone numbers & mobile number on lync contact list, same happening for scys.gov.bh lync users