Can we save java file without .java extension? [closed] - java

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
If we have file sample, instead of saving sample. Java if we save it as
sample.j or
sample.ja or
sample.jav
Will the program work or not?

No, the java-compiler only works with .java extensions.
why would you want to do that anyways?

Related

How to use a java function in libgdx [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
Hi, I wanna use a java (in AndroidLauncher) function in libgdx. Please help me.
Hopefully you're trying to call method of AndroidLauncher class which is in android module.
You can use interfacing for your requirement.
https://github.com/libgdx/libgdx/wiki/Interfacing-with-platform-specific-code

How to generate VirtualMachineError in java? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
I just wanted to do some research and wanted to generate the VirtualMachineError.
Can any one tell me how can I generate VirtualMachineError?
A StackOverflowError is a VirtualMachineError, so you can provoke such an error by running a recursion without a basecase. (But why?)

What is the package in which the Email class resides? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
What is the package in which the Email class resides? I need the jar or the package to be imported to my Java application. Appreciated your help in advance.
You're looking for JavaMail: http://www.oracle.com/technetwork/java/javamail/index.html
It's not part of Java SE, you have to download it separately.

Update com.sun.rowset.CachedRowSetImpl [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I'm using the Java package com.sun.rowset.CachedRowSetImpl. Can you tell me is there a new Java package in Java 7 which I can use instead of this package?
You should be using the javax.sql.* package directly. Read the javadoc, and consider implementations of CachedRowSet here

Usage of Thread.currentThread().getContextClassLoader().getResourceAsStream("system.properties") [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
In my web application, I have kept system.properties file in the web-inf/classes folder.
To Access that file's inputstream, I am using the code snippet below:
InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream(SYSTEM_PROPERTIES_FILE)
Is there any other way to access that file?
It simply means: Return the property file as InputStream from the ClassLoader the current thread of my application is running from (in loose english).

Categories