using JavaArgs from JavaLauncher throws error
Grigory Ptashko
grigory.ptashko at gmail.com
Fri Mar 11 09:44:25 UTC 2016
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
More information about the mobile-dev
mailing list