[J2ME] How to launch a .jar or .class with IM profile

Hi all,
I have tried and succeded to launch a .jar file with J2SE but with J2ME IM profile, I couldn't manage do the same because the URLClassLoader is missing.
Does someone knows how to do that ?
Thanks,

I confirm your findings when using shortcuts to try specific versions of JavaWS with 7u25 or later installed:
JRE 5u14 launched and the classloader was as pre 7u25
JRE 6u43 would not launch
JRE 7u21 launched but the classloader was not as pre 7u25
You can launch the shortcut with the JavaWS -verbose option to display a messagebox with valuable information.
I am keeping a close watch on this thread.

Similar Messages

  • How do you compile Flex-dependent classes with ASC?

    Hi,
    I've been trying unsuccessfully for most of the evening to compile a .as file that relies on mx.collections.ListCollectionView using asc. I figured I could just import the Flex framework SWCs from the command line with asc, but asc doesn't seem to respect SWCs - it only seems to respect .abc files.
    So, I've spent most of my time trying to compile the Flex framework into a single .abc file that I can import whenever I want to compile a class that relies on Flex. I figured I could make a base .as file with include statements for all of the Flex .as files (copying the approach I saw for files like builtin.as) and compile that, but all I seem to get are compiler errors - mostly "[Compiler] Error #1181: Forward reference to base class (base class name)."
    I have a feeling I'm doing this completely the wrong way. I'd very much appreciate any assistance that anybody can offer me.
    Thanks,
    - max

    <div class=Section1><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>I use MXMLC to compile my .as file projects.<o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'><o:p> </o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>Alex Harui<o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>Flex SDK Developer<o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'><a href="http://www.adobe.com/"><span style='color:blue'>Adobe<br />Systems Inc.</span></a><o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>Blog: <a href="http://blogs.adobe.com/aharui"><span<br />style='color:blue'>http://blogs.adobe.com/aharui</span></a><o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'><o:p> </o:p></span></p><br /><br /><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><br /><br /><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span<br />style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Maxim Porges<br />[mailto:[email protected]] <br><br /><b>Sent:</b> Monday, February 09, 2009 9:22 PM<br><br /><b>To:</b> [email protected]<br><br /><b>Subject:</b> How do you compile Flex-dependent classes with ASC?<o:p></o:p></span></p><br /><br /></div><br /><br /><p class=MsoNormal><o:p> </o:p></p><br /><br /><p class=MsoNormal style='margin-bottom:12.0pt'>A new discussion was started by<br />Maxim Porges in <br><br /><br><br /><b>Developers</b> --<br><br />  How do you compile Flex-dependent classes with ASC?<br><br /><br><br />Hi, <br><br /><br><br />I've been trying unsuccessfully for most of the evening to compile a .as file<br />that relies on mx.collections.ListCollectionView using asc. I figured I could<br />just import the Flex framework SWCs from the command line with asc, but asc<br />doesn't seem to respect SWCs - it only seems to respect .abc files. <br><br /><br><br />So, I've spent most of my time trying to compile the Flex framework into a<br />single .abc file that I can import whenever I want to compile a class that<br />relies on Flex. I figured I could make a base .as file with include statements<br />for all of the Flex .as files (copying the approach I saw for files like<br />builtin.as) and compile that, but all I seem to get are compiler errors -<br />mostly &quot;[Compiler] Error #1181: Forward reference to base class (base<br />class name).&quot; <br><br /><br><br />I have a feeling I'm doing this completely the wrong way. I'd very much<br />appreciate any assistance that anybody can offer me. <br><br /><br><br />Thanks, <br><br /><br><br />- max <o:p></o:p></p><br /><br /><div class=MsoNormal><br /><br /><hr size=2 width=200 style='width:150.0pt' align=left><br /><br /></div><br /><br /><p class=MsoNormal style='margin-bottom:12.0pt'>View/reply at <a<br />href="http://www.adobeforums.com/webx?13@@.59b7d5d2">How do you compile<br />Flex-dependent classes with ASC?</a><br><br />Replies by email are OK.<br><br />Use the <a<br />href="http://www.adobeforums.com/webx?280@@.59b7d5d2!folder=.3c060fa3">unsubscribe</a>< br />form to cancel your email subscription.<o:p></o:p></p><br /><br /></div>

  • How to make a jar file downloadable with IE

    hello,
    I just bought a website:
    http://www.frozenfountain.net/
    and I put a jar file on it called Logo.jar
    Using Mozilla, the jar file downloads as expected, but with Internet Explorer, it tries to download it as .zip file.
    How do I get it to download as a .jar file with IE?
    thanks

    Just post a link to the Jar. Mozilla will download
    it as a jar. Windows will download it as a zip.
    Only one link. No problem, really. ;-)There is a problem. People who arent as good with computers as you are won't know how to run the jar file after downloading with IE.
    At school, I told someone to download the file, which they did with IE. It downloaded to desktop as a zip. They extracted and were left with a bunch of .class files.
    On a sidenote, how do you draw text with a gradient?

  • How do I write an external class with global constants?

    Hi you all !
    First I want to explain what exactly I want to do:
    I have an application that should run in different resolutions. The app runs fullscreen, and I don't use Layouts or something, just a single Frame with a Graphics Object.
    Now to handle the different resolutions, I want to write an external class with some constants to use. The usage in my main Class should be something like this:
    public
    class blah
    private Constants myConstants;
    public blah()
    if (highResolution)
    myConstants = new hiResConstants();
    else
    myConstants = new loResConstants();
    System.println(String.valueOf(myConstants.SCREEN_WIDTH);
    }or somthing like that. The important fact is that I can choose the constants at runtime and that I am NOT forced to use methods to get the values, cause something like
    System.println(String.valueOf(myConstants.getScreenWidth());sux if you have methods using 5 or more parameters.
    Anybody out there who understood my problem and can help me??? PLEASE?
    best regards,
    Skippy

    First, what's so much worse about
    System.println(myConstants.getScreenWidth());
    than
    System.println(myConstants.ScreenWidth);
    Is the extra five characters really that bad? (Note
    you don't need the String.valueOf method call.)Well actually it was a wrong example I gave here, but it's not the call that makes me shake but the implementation:
    public int screenWidth = 1024;vs.
    public
    int getScreenWidth()
    return 1024;
    }Here it makes a bigger difference, even when you think of managing about 100 or even more constants.
    Second, why do you have methods that take five or more
    parameters!?Well, maybe this example show up what I mean:
    if (cursorIsInArea(100,100,200,200,areaId))
    doSomeStuff();Ok, I could use Rectangles here, but if you think of the timing here (I draw 30 frames / sec and this check comes about every frame or the animation would be choppy) I refuse to create an Object everytime I make this call.
    Btw: Is it worth thinking about the time of execution like I did in this example? OO is a neat thing, but is it that fast?
    I don't think isCursorInArea(new Rectangle(100,100,200,200),areaId) is such a great idea, but I might be wrong.
    It sounds like you're trying to compound a bad design
    with an even worse design for no good reason!Well, I'm not that experienced Java programmer to judge about that, but I (and my profs at university too) found my codes well structured and designed so far.
    Skippy
    PS: the string.valueOf(123) call came from cut&paste:
    system.out.println(string.valueOf(number1)+string.valueOf(number2));Try this without the function.... ;-)

  • How to display value from java class with output generated with toplink

    i hava a requirement of displaying (distance ie calculated in java class) with output generated by query.
    ie if output is like
    school name (distance)
    physical address
    here the school name and physical address are retrived from database.

    Hi,
    ValueHolders are used by the JSF internal framework. To work with an object (attributes) in a managed bean you don't need to make it returning a value holder.
    Create a POJO, provide accessor methods and register it as a managed bean. Access it from JSF with EL
    Frank

  • How can I execute a java class with arguments from an air application built from mxml?

    I have an mxml application. It has a button, and when that button select event occurs, I want my mxml air app to pass arguments to a java class I have built, which resides in a package path on my system. I need to be able to pass several arguments to my java method from my mxml call. How do I do this, and what config files are necessary? For the simple task I want to engineer, can you show me an example of a properly configured config file? My java class has been executed at the command line in the past as follows:
    java -cp %CP% com.abc.prism.queue.EmitMessage XYZ "my message text" 192.12.13.14 5672
    where %CP% is an env variable that tells my class the classpath it runs with, and XYZ, "my message text", the IP address, and the port are the arguments I must pass from mxml to my java class. How do I accomplish this?
    How do I make known to the java class I call from mxml the %CP% class path? It tells my java class where to find various rabbitMQ jars.

    Hi,
    You need to use Integration technology like BlazeDS or LCDS.

  • How to launch a Java WebStart application with older JREs when Java 7u25 is on the client?

    How can I launch older versions of my Java WebStart application, that are built and run with Java 7u21 or earlier, even if Java 7u25 is installed locally on the client? Application launch and behaviour must be reliable and consistent.
    Background:
    As of 7u25 (and later), Java Webstart applications launch with a different class loader than pre-7u25.
    My Java Webstart application has supported versions that were built with older versions of the JDK (e.g. Java 5, 6, 7u21 or earlier). These applications run with their required JRE version, enforced through JNLP. Once Java 7u25 is installed locally, these older applications fail to launch, due to classloader differences.
    The question is: what is required to run older Java WebStart applications even if 7u25 (or later) Java Webstart is installed locally on the client?

    I confirm your findings when using shortcuts to try specific versions of JavaWS with 7u25 or later installed:
    JRE 5u14 launched and the classloader was as pre 7u25
    JRE 6u43 would not launch
    JRE 7u21 launched but the classloader was not as pre 7u25
    You can launch the shortcut with the JavaWS -verbose option to display a messagebox with valuable information.
    I am keeping a close watch on this thread.

  • How can I call a nonstatic class

    Hello All,
    I've wrote a simple bean for my testcase that count a value (e.g. site access):
    public class Bean1 {
    private int accessCount = 1;
    public int getAccessCount() {
    return (accessCount++);
    If I call the bean with a jsp-site, it works fine with different scope. e.g. session and application.
    With session scope different browser count different. With application scope different bowser count together. Thats the normal attitude.
    My jsp code:
    <jsp:useBean id="counter" class="ml.view.Bean1" scope="session" />
    <jsp:getProperty name="counter" property="accessCount" />
    This don't work with a static bean (normal too), but I can only call a static class in my UIX site.
    I call the bean from uix with the invoke element. Is that correct? How can I call a nonstatic class with a special scope? Which other solution ist possible?
    My uix code:
    <invoke method="getAccessCount" result="${uix.eventResult.getAccessCount}" instance="${sessionScope.myBean.getAccessCount}" exception="${uix.eventResult.error}" javaType="ml.view.myBean"/>
    Thank you for any solution!
    The error messages are:
    java.lang.NullPointerException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java)
    at oracle.cabo.servlet.event.InvokeEventHandler._invoke(Unknown Source)
    at
    and so forth...

    false in my uix code example: javaType="ml.view.myBean"
    correct: javaType="ml.view.Bean1"
    Sorry :-) that was only an error in my post not in the really example.

  • Eclipse - how to share a package/class with 3 diff projects

    Hi all,
    I have 3 projects that are customized diffrently but one package is same for everyone (sharedClass). The problem is when I add/delete/update the SharedClass I have to do it 3 times (for each project)
    Question: How can I share the package/Class with the 3 projects? I mean, I want to change it once and the effect will take place to all 3 PROJECTS.
    Thanks
    Ppr

    This is an Eclipse question and doesn't really belong here, but:
    I would put the shared package into its own project. Then for the three projects (after removing the shared package) I would use the Project menu and choose properties. Choose Java Build Path snd select Projects. Choose Add and select the project containing the shared package.

  • How to launch Jar file in Mac Os using java code??

    can anyone tell me how can i launch another jar file in my apllication using java code.

    define "launch".
    - You want to run a new java program in a separate process? (see Runtime.exec())
    - You want to run a method in a specific class in the jar? (add jar to application classpath and then simply instantiate the class and call the method)

  • Launching classes with java -jar option

    hi all,
    i have read how to launch a class using the -jar option.
    Now i have one additional question.
    Suppose that the class that i want to launch contains packages from other jar files.
    Can i pack all the other jar files in the same jar, and have the code run by simply calling
    java -jar MyClass?
    if different jar packages are in the same jar file, can the main class that i want to launch see them?? or do i still
    have to specify the -cp option??
    thanx in advance and regars
    marco

    I don't know about having jar files in a jar file, but if you have class files in a jar file, you can make it so you just have to run it as
    java -jar MyJar.jar
    To make the jar file, you need to add an attribute to the manifest file. Make a text file and call it whatever you want, e.g. manifest.mf or manifest.txt.
    Add this line to it:
    Main-Class: MyMain
    if MyMain is your class with the main method. If MyMain is in a package, then you need to add that too, e.g. mypackage.MyMain.
    Now create your jar file as
    jar cfm MyJar.jar manifest.mf *.class
    After manifest.mf you add all the classes you have with spaces to separate them, or use wildcards.

  • How to load a Jar file in the class path?

    How to load a Jar file which contains class files, images, etc.. in the classpath without using URLClassLoader.

    You don't "load" jars. If it's on the classpath, you can obtain individual resources from it using various methods on either Class or ClassLoader. Do you mean "how to add a jar to the classpath at runtime"? Can't be done without using a classloader, typically URLClassLoader or a subclass thereof. Why you want to not use the proven method is beyond me. Presumably because you don't understand classloading. In which case, forget it.

  • How to create a Jar with only class files?

    Dear all,
    I want to create a jar file with only classes.My class files and java files are in different folders under com .
    say
    com
    in com there are two folders
    folder 1 -- subfolder 1
    folder 2 -- subfolder 2
    like this.
    If i want to create a jar file from com directory how should i give the jar command.Again my jar should contain only .class files.
    Any help will be appreciated
    Thanks
    lekshmi

    It doesn't work.Says "No such class or directory"
    Any other way Or is it possible to do so?Read the link I posted and create the statement to make your structure. I was thinking you were inside the com directory but if you are above it you will need something like this instead:
    jar -cf test.jar com\*.class com\subfolder1\*.class com\subfoler2\*.class
    But either way don't just copy and past this. Think about what is does so that you can make it work for you.
    Also, you might want to look into using Ant if you are going to be building this a lot.

  • How to launch a new JVM from a java class?

    I want to update a runing java applicaton. Before updating it, I have to shut down this application and open a new JVM (launch another java class with main method inside another JVM). Then update this application. After updating, restart this application. How to do it?? Thanks. Gary

    Hi!
    I'm using an applet to upload a library in the ext directory and then opening another applet that uses that library...
    If I manually upload the library the second applet works
    but if I try to load it at runtime with the first applet the file is saved correctly but the second applet doesn,t work :((
    the second applet works only if I close the browser and open it again...:((
    I need to reaload the JVM at runtime or maybe opening a new one...
    can anyone help me?
    please reply me if you found anything similar,
    ciao!
    fabibu

  • How should I create JAR file which  contain JMF library and project classes

    Hi,
    I installed the JMF windows pack. I compiled and ran successfully myApplet (which use JMF librarie) in Internet Explorer on my machine. When I run this applet on some different machine, where JMF isn�t installed- it�s not running.
    There is an error:
    java.lang.NoClassDefFoundError: javax/media/ControllerListener
    I was trying to create jar file, which contain librarie JMF.jar and all other files which are require to run myApplet (*.jar, *.class, the files from folder �MyApplet�) and run it on the other computer. It still doesn�t work.
    Also I ran a JMF Customizer and created customize.jar but this file contains only JMF classes. I don�t know how add other files to it.
    How should I create a jar file which will contains all essential files to run myApplet on other machine (something like �All In One� J )
    I�m using Eclipse.
    Can somebody help me?.
    Thank You!
    Best regards:
    Peter

    Hi
    i want to make a jar file of application which is using JMF to play audio
    and video. it works well during compilation and execution but doesn't
    works in jar file.
    please help me how i make a jar file whic will run audio and video too
    your's truely
    abdul

Maybe you are looking for