using JavaArgs from JavaLauncher throws error

Grigory Ptashko grigory.ptashko at gmail.com
Fri Mar 11 14:49:27 UTC 2016


Indeed I get the NoClassDefFound if I try JShell on ios openjdk9.

It might be a silly question but may be there is a somwhat simple
way to include the building of the jdk.jshell in the ios openjdk9 build?
Some switches in the makefiles maybe?
I’d like to try it if it’s possible.

Thank you.

> On 11 марта 2016 г., at 15:58, Gary Adams <gary.adams at oracle.com> wrote:
> 
> That's good news.
> 
> I haven't looked at the jdk9 docs, but you should be able to generate your own,
> see make/{Maiin.gmk,JavaDoc.gmk}
> 
>   make docs-image
> 
> The mobile project has only ported up to compact2 profile functionality.
> If higher level modules have additional native functionality that needs to be
> ported it may be a larger effort.
> 
> On 03/11/16 04:44, Grigory Ptashko wrote:
>> Gary, thank you.
>> 
>> I’ve managed to launch java both on the simulator and on the iphone 6s (arm64).
>> 
>> 
>> One more question. Is there a javadoc on the for openjdk9?
>> Especially, I’m interested in the documentation on jshell API.
>> 
>> I googled but did not find it. I alse looked at the jdk9 source tree but there
>> are no javadoc after building the jdk.
>> 
>> Thank you!
>> 
>>> On 10 марта 2016 г., at 16:19, Gary Adams <gary.adams at oracle.com> wrote:
>>> 
>>> If you look in jdk/src/java.base/ios/native/JavaLauncher/JavaArgs.m
>>> source file you'll see several init functions that are layered.
>>> It was originally designed to be able to swap between different properties.
>>> e.g. initWithDebug could take release or debug property files, which calls
>>> into initWithProperties.
>>> 
>>> If you add JavaLauncherArgs.properties file to your xcode project and
>>> deploy it into your bundle it will be read & parsed when you call init. e.g.
>>> 
>>> JavaLauncherArgs.properties:
>>>  appArgs= ...
>>>  mainClass= ...
>>>  jvmArgs= ...
>>> 
>>> If you bypass the init calls you can use the explicit calls to addJavaArg and
>>> addAppArg. See the JavaArgs.h for some additional information. There
>>> are some doxygen comments in the header files.
>>> 
>>> There are some tools and template projects with some better use cases, but
>>> they still need to be updated for jdk9 before they are ready to be pushed.
>>> 
>>> On 03/09/16 14:29, Grigory Ptashko wrote:
>>>> I see.
>>>> So how exactly should I initialize the JavaArgs when I bundle
>>>> the JavaLauncherArgs.properties file inside my app?
>>>> 
>>>> with -init or with -initWithProperties: ?
>>>> 
>>>>> On 9 марта 2016 г., at 19:12, Gary Adams <gary.adams at oracle.com> wrote:
>>>>> 
>>>>> There's an old RFE about using JavaArgs without a properties file.
>>>>> 
>>>>> You should be OK with just
>>>>>   JavaArgs * javaArgs = [JavaArgs alloc] ;
>>>>> 
>>>>> if you intend to populate it directly.
>>>>> 
>>>>> On 03/09/16 10:02, Grigory Ptashko wrote:
>>>>>> Hello.
>>>>>> 
>>>>>> I’m starting to use openjdk9 on ios.
>>>>>> I’ve managed to compile it for use on a simulator.
>>>>>> 
>>>>>> My goal is to create an empty JavaArgs object.
>>>>>> I did not create JavaLauncherArgs.properties file.
>>>>>> 
>>>>>> So I’m doing just this:
>>>>>> 
>>>>>> _javaArgs = [[JavaArgs alloc] init];
>>>>>> 
>>>>>> And I get the following error thrown:
>>>>>> 
>>>>>> -[NSPathStore2 pathForResource:ofType:]: unrecognized selector sent to instance 0x7a643040
>>>>>> 
>>>>>> I debugged and saw that the exception occurs in the JavaArgs.m here:
>>>>>> 
>>>>>>       propfile = [[JavaArgs documentsDirectory]
>>>>>> 		   pathForResource:propertiesfile ofType:@"properties”];
>>>>>> 
>>>>>> In my source tree it is line 592.
>>>>>> 
>>>>>> Am I doing something wrong?
>>>>>> Maybe I’m using the JavaArgs in the wrong way?
>>>>>> 
>>>>>> Thank you.
>>>>>> 
>>>>>> --
>>>>>> Best regards,
>>>>>> Grigory Ptashko
>>>>>> 
>>>>>> +7 (916) 1489766
>>>>>> grigory.ptashko at gmail.com
>>>>>> facebook.com/GrigoryPtashko
>>>>>> 
>>>> --
>>>> Best regards,
>>>> Grigory Ptashko
>>>> 
>>>> +7 (916) 1489766
>>>> grigory.ptashko at gmail.com
>>>> facebook.com/GrigoryPtashko
>>>> 
>> 
>> --
>> Best regards,
>> Grigory Ptashko
>> 
>> +7 (916) 1489766
>> grigory.ptashko at gmail.com
>> facebook.com/GrigoryPtashko
>> 
> 


--
Best regards,
Grigory Ptashko

+7 (916) 1489766
grigory.ptashko at gmail.com
facebook.com/GrigoryPtashko



More information about the mobile-dev mailing list